Skip to content

Commit b8a3528

Browse files
committed
Bump oneinfra dependency
1 parent 04ffd68 commit b8a3528

File tree

447 files changed

+29841
-10606
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

447 files changed

+29841
-10606
lines changed

api/go.mod

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ go 1.14
55
require (
66
github.com/dgrijalva/jwt-go v3.2.0+incompatible
77
github.com/gorilla/mux v1.7.4
8-
github.com/oneinfra/oneinfra v0.0.0-20200511213016-abeecf2a76ac
8+
github.com/oneinfra/oneinfra v0.0.0-20200512173005-c13efb1384f6
99
github.com/pkg/errors v0.9.1
1010
github.com/urfave/cli/v2 v2.2.0
1111
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37
12-
k8s.io/api v0.17.4
13-
k8s.io/apimachinery v0.17.4
14-
k8s.io/client-go v0.0.0-20190918160344-1fbdaa4c8d90
15-
k8s.io/cluster-bootstrap v0.17.4
12+
k8s.io/api v0.18.2
13+
k8s.io/apimachinery v0.18.2
14+
k8s.io/client-go v0.18.2
15+
k8s.io/cluster-bootstrap v0.18.2
1616
k8s.io/klog v1.0.0
1717
sigs.k8s.io/yaml v1.2.0
1818
)

api/go.sum

+83-95
Large diffs are not rendered by default.

api/internal/constants.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package internal
1919
import (
2020
"k8s.io/client-go/kubernetes"
2121

22-
oneinfra "github.com/oneinfra/oneinfra/pkg/clientset/manager"
22+
oneinfra "github.com/oneinfra/oneinfra/pkg/clientsets/manager"
2323
)
2424

2525
var (

api/internal/kubernetes.go

+4
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,22 @@
1717
package internal
1818

1919
import (
20+
"context"
21+
2022
v1 "k8s.io/api/core/v1"
2123
apierrors "k8s.io/apimachinery/pkg/api/errors"
2224
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2325
)
2426

2527
func EnsureUserNamespace(userNamespace string) error {
2628
_, err := KubernetesClientset.CoreV1().Namespaces().Create(
29+
context.TODO(),
2730
&v1.Namespace{
2831
ObjectMeta: metav1.ObjectMeta{
2932
Name: userNamespace,
3033
},
3134
},
35+
metav1.CreateOptions{},
3236
)
3337
if err != nil && !apierrors.IsAlreadyExists(err) {
3438
return err

api/internal/kubernetes/user.go

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package kubernetes
1818

1919
import (
20+
"context"
2021
"errors"
2122
"fmt"
2223

@@ -36,6 +37,7 @@ func RetrieveUser(loginRequest LoginRequest) (internal.User, error) {
3637
userSecret, err := internal.KubernetesClientset.CoreV1().Secrets(
3738
constants.OneInfraUsersNamespace,
3839
).Get(
40+
context.TODO(),
3941
loginRequest.Username,
4042
metav1.GetOptions{},
4143
)

api/internal/oneinfra.go

+9-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package internal
1818

1919
import (
20+
"context"
2021
"fmt"
2122

2223
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -30,6 +31,7 @@ func (user User) Clusters() (*clusterv1alpha1.ClusterList, error) {
3031
return OneInfraClientset.ClusterV1alpha1().Clusters(
3132
user.Namespace(),
3233
).List(
34+
context.TODO(),
3335
metav1.ListOptions{},
3436
)
3537
}
@@ -38,6 +40,7 @@ func (user User) CreateCluster(name, kubernetesVersion string, replicas int) err
3840
_, err := OneInfraClientset.ClusterV1alpha1().Clusters(
3941
user.Namespace(),
4042
).Create(
43+
context.TODO(),
4144
&clusterv1alpha1.Cluster{
4245
ObjectMeta: metav1.ObjectMeta{
4346
Name: name,
@@ -48,6 +51,7 @@ func (user User) CreateCluster(name, kubernetesVersion string, replicas int) err
4851
ControlPlaneReplicas: replicas,
4952
},
5053
},
54+
metav1.CreateOptions{},
5155
)
5256
return err
5357
}
@@ -69,7 +73,9 @@ func (user User) UpdateCluster(cluster *clusterv1alpha1.Cluster) error {
6973
_, err := OneInfraClientset.ClusterV1alpha1().Clusters(
7074
user.Namespace(),
7175
).Update(
76+
context.TODO(),
7277
cluster,
78+
metav1.UpdateOptions{},
7379
)
7480
return err
7581
}
@@ -78,15 +84,17 @@ func (user User) DeleteCluster(clusterName string) error {
7884
return OneInfraClientset.ClusterV1alpha1().Clusters(
7985
user.Namespace(),
8086
).Delete(
87+
context.TODO(),
8188
clusterName,
82-
&metav1.DeleteOptions{},
89+
metav1.DeleteOptions{},
8390
)
8491
}
8592

8693
func (user User) ClusterComponents(clusterName string) (*clusterv1alpha1.ComponentList, error) {
8794
return OneInfraClientset.ClusterV1alpha1().Components(
8895
user.Namespace(),
8996
).List(
97+
context.TODO(),
9098
metav1.ListOptions{
9199
LabelSelector: fmt.Sprintf("%s=%s", constants.OneInfraClusterNameLabelName, clusterName),
92100
},

api/main.go

+8-6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package main
1818

1919
import (
20+
"context"
2021
"encoding/json"
2122
"fmt"
2223
"log"
@@ -38,7 +39,7 @@ import (
3839
"github.com/oneinfra/console/api/handlers"
3940
"github.com/oneinfra/console/api/internal"
4041
"github.com/oneinfra/console/api/internal/endpoints/auth"
41-
oneinfra "github.com/oneinfra/oneinfra/pkg/clientset/manager"
42+
oneinfra "github.com/oneinfra/oneinfra/pkg/clientsets/manager"
4243
constantsapi "github.com/oneinfra/oneinfra/pkg/constants"
4344
"github.com/oneinfra/oneinfra/pkg/versions"
4445
)
@@ -119,18 +120,19 @@ func initializeClientsets() {
119120
}
120121

121122
func initializeKubernetesVersions() {
122-
configMap, err := internal.KubernetesClientset.CoreV1().ConfigMaps(
123+
versionsConfigMap, err := internal.KubernetesClientset.CoreV1().ConfigMaps(
123124
constantsapi.OneInfraNamespace,
124125
).Get(
125-
constantsapi.OneInfraVersionConfigMap,
126+
context.TODO(),
127+
constantsapi.OneInfraVersionsConfigMap,
126128
metav1.GetOptions{},
127129
)
128130
if err != nil {
129-
klog.Fatalf("could not read versions from ConfigMap %q", constantsapi.OneInfraVersionConfigMap)
131+
klog.Fatalf("could not read versions from ConfigMap %q", constantsapi.OneInfraVersionsConfigMap)
130132
}
131-
rawReleaseInfo, exists := configMap.Data[constantsapi.OneInfraVersionsKeyName]
133+
rawReleaseInfo, exists := versionsConfigMap.Data[constantsapi.OneInfraVersionsKeyName]
132134
if !exists {
133-
klog.Fatalf("ConfigMap %q does not contain a %q key", constantsapi.OneInfraVersionConfigMap, constantsapi.OneInfraVersionsKeyName)
135+
klog.Fatalf("ConfigMap %q does not contain a %q key", constantsapi.OneInfraVersionsConfigMap, constantsapi.OneInfraVersionsKeyName)
134136
}
135137
var releaseInfo versions.ReleaseInfo
136138
if err := yaml.Unmarshal([]byte(rawReleaseInfo), &releaseInfo); err != nil {

api/vendor/github.com/gogo/protobuf/proto/encode.go

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/vendor/github.com/gogo/protobuf/proto/lib.go

+13-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/vendor/github.com/gogo/protobuf/proto/properties.go

+41-30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/vendor/github.com/gogo/protobuf/proto/table_marshal.go

+10-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/vendor/github.com/gogo/protobuf/proto/table_merge.go

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)