Skip to content

Commit

Permalink
Merge pull request #97 from RainbowMango/pr_bump_k8s_version
Browse files Browse the repository at this point in the history
Bump k8s version to v1.18.14
  • Loading branch information
k8s-ci-robot authored Dec 28, 2020
2 parents 7b720b6 + c069d9f commit a6e0b2b
Show file tree
Hide file tree
Showing 920 changed files with 38,179 additions and 15,904 deletions.
54 changes: 27 additions & 27 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,35 @@ require (
github.com/fsnotify/fsnotify v1.4.7
github.com/hashicorp/golang-lru v0.5.1
github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.0.6-beta
k8s.io/api v0.17.5
k8s.io/apimachinery v0.17.5
k8s.io/client-go v0.17.5
k8s.io/cloud-provider v0.17.5
k8s.io/component-base v0.17.5
k8s.io/api v0.18.14
k8s.io/apimachinery v0.18.14
k8s.io/client-go v0.18.14
k8s.io/cloud-provider v0.18.14
k8s.io/component-base v0.18.14
k8s.io/klog v1.0.0
k8s.io/kubernetes v1.17.5
k8s.io/kubernetes v1.18.14
)

replace (
k8s.io/api => k8s.io/api v0.17.5
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.17.5
k8s.io/apimachinery => k8s.io/apimachinery v0.17.5
k8s.io/apiserver => k8s.io/apiserver v0.17.5
k8s.io/cli-runtime => k8s.io/cli-runtime v0.17.5
k8s.io/client-go => k8s.io/client-go v0.17.5
k8s.io/cloud-provider => k8s.io/cloud-provider v0.17.5
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.17.5
k8s.io/code-generator => k8s.io/code-generator v0.17.5
k8s.io/component-base => k8s.io/component-base v0.17.5
k8s.io/cri-api => k8s.io/cri-api v0.17.5
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.17.5
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.17.5
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.17.5
k8s.io/kube-proxy => k8s.io/kube-proxy v0.17.5
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.17.5
k8s.io/kubectl => k8s.io/kubectl v0.17.5
k8s.io/kubelet => k8s.io/kubelet v0.17.5
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.17.5
k8s.io/metrics => k8s.io/metrics v0.17.5
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.17.5
k8s.io/api => k8s.io/api v0.18.14
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.18.14
k8s.io/apimachinery => k8s.io/apimachinery v0.18.14
k8s.io/apiserver => k8s.io/apiserver v0.18.14
k8s.io/cli-runtime => k8s.io/cli-runtime v0.18.14
k8s.io/client-go => k8s.io/client-go v0.18.14
k8s.io/cloud-provider => k8s.io/cloud-provider v0.18.14
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.18.14
k8s.io/code-generator => k8s.io/code-generator v0.18.14
k8s.io/component-base => k8s.io/component-base v0.18.14
k8s.io/cri-api => k8s.io/cri-api v0.18.14
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.18.14
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.18.14
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.18.14
k8s.io/kube-proxy => k8s.io/kube-proxy v0.18.14
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.18.14
k8s.io/kubectl => k8s.io/kubectl v0.18.14
k8s.io/kubelet => k8s.io/kubelet v0.18.14
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.18.14
k8s.io/metrics => k8s.io/metrics v0.18.14
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.18.14
)
88 changes: 88 additions & 0 deletions go.sum

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions pkg/cloudprovider/huaweicloud/alb.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ func (alb *ALBCloud) getSecret(namespace, secretName string) (*Secret, error) {
if ok {
kubeSecret = obj.(*v1.Secret)
} else {
secret, err := alb.kubeClient.Secrets(namespace).Get(secretName, metav1.GetOptions{})
secret, err := alb.kubeClient.Secrets(namespace).Get(context.TODO(), secretName, metav1.GetOptions{})
if err != nil {
return nil, err
}
Expand All @@ -526,7 +526,7 @@ func (alb *ALBCloud) getSecret(namespace, secretName string) (*Secret, error) {
}

func (alb *ALBCloud) getPods(name, namespace string) (*v1.PodList, error) {
service, err := alb.kubeClient.Services(namespace).Get(name, metav1.GetOptions{})
service, err := alb.kubeClient.Services(namespace).Get(context.TODO(), name, metav1.GetOptions{})
if err != nil {
return nil, err
}
Expand All @@ -539,7 +539,7 @@ func (alb *ALBCloud) getPods(name, namespace string) (*v1.PodList, error) {
set = service.Spec.Selector
labelSelector := set.AsSelector()
opts := metav1.ListOptions{LabelSelector: labelSelector.String()}
return alb.kubeClient.Pods(namespace).List(opts)
return alb.kubeClient.Pods(namespace).List(context.TODO(), opts)
}

func (alb *ALBCloud) ensureCreateLoadbalancer(albProvider *ALBClient, elbAC ElbAutoCreate, service *v1.Service) (*ALB, error) {
Expand Down Expand Up @@ -1513,7 +1513,7 @@ func (alb *ALBCloud) updateService(service *v1.Service) (*v1.Service, error) {
serviceCopy := service.DeepCopy()
for i := 0; i < MaxRetry; i++ {
toUpdate := service.DeepCopy()
toUpdate, err = alb.kubeClient.Services(toUpdate.Namespace).Update(toUpdate)
toUpdate, err = alb.kubeClient.Services(toUpdate.Namespace).Update(context.TODO(), toUpdate, metav1.UpdateOptions{})
if err == nil {
return toUpdate, nil
}
Expand All @@ -1525,7 +1525,7 @@ func (alb *ALBCloud) updateService(service *v1.Service) (*v1.Service, error) {
}

if apierrors.IsConflict(err) {
service, err = alb.kubeClient.Services(service.Namespace).Get(service.Name, metav1.GetOptions{})
service, err = alb.kubeClient.Services(service.Namespace).Get(context.TODO(), service.Name, metav1.GetOptions{})
if err != nil {
service = serviceCopy
klog.Warningf("Get service(%s/%s) error: %v", service.Namespace, service.Name, err)
Expand Down
8 changes: 4 additions & 4 deletions pkg/cloudprovider/huaweicloud/elb.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (elb *ELBCloud) getSecret(namespace, secretName string) (*Secret, error) {
if ok {
kubeSecret = obj.(*v1.Secret)
} else {
secret, err := elb.kubeClient.Secrets(namespace).Get(secretName, metav1.GetOptions{})
secret, err := elb.kubeClient.Secrets(namespace).Get(context.TODO(), secretName, metav1.GetOptions{})
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -239,7 +239,7 @@ func (elb *ELBCloud) ensureCreateListener(
}

func (elb *ELBCloud) getPods(name, namespace string) (*v1.PodList, error) {
service, err := elb.kubeClient.Services(namespace).Get(name, metav1.GetOptions{})
service, err := elb.kubeClient.Services(namespace).Get(context.TODO(), name, metav1.GetOptions{})
if err != nil {
return nil, err
}
Expand All @@ -252,7 +252,7 @@ func (elb *ELBCloud) getPods(name, namespace string) (*v1.PodList, error) {
set = service.Spec.Selector
labelSelector := set.AsSelector()
opts := metav1.ListOptions{LabelSelector: labelSelector.String()}
return elb.kubeClient.Pods(namespace).List(opts)
return elb.kubeClient.Pods(namespace).List(context.TODO(), opts)
}

// Not implemented
Expand Down Expand Up @@ -586,7 +586,7 @@ func (elb *ELBCloud) generateMembers(service *v1.Service) ([]*Member, error) {
continue
}

node, err := elb.kubeClient.Nodes().Get(item.Spec.NodeName, metav1.GetOptions{})
node, err := elb.kubeClient.Nodes().Get(context.TODO(), item.Spec.NodeName, metav1.GetOptions{})
if err != nil {
klog.Warningf("Get node(%s) error: %v", item.Spec.NodeName, err)
continue
Expand Down
12 changes: 6 additions & 6 deletions pkg/cloudprovider/huaweicloud/huaweicloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,10 @@ func NewHWSCloud(config io.Reader) (*HWSCloud, error) {
secretInformer := cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
return kubeClient.Secrets(metav1.NamespaceAll).List(options)
return kubeClient.Secrets(metav1.NamespaceAll).List(context.TODO(), options)
},
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
return kubeClient.Secrets(metav1.NamespaceAll).Watch(options)
return kubeClient.Secrets(metav1.NamespaceAll).Watch(context.TODO(), options)
},
},
&v1.Secret{},
Expand Down Expand Up @@ -844,7 +844,7 @@ func updateServiceStatus(
}
}
toUpdate.Annotations[ELBMarkAnnotation] = mark
_, err := kubeClient.Services(service.Namespace).Update(toUpdate)
_, err := kubeClient.Services(service.Namespace).Update(context.TODO(), toUpdate, metav1.UpdateOptions{})
if err == nil {
return
}
Expand All @@ -858,7 +858,7 @@ func updateServiceStatus(
}

if apierrors.IsConflict(err) {
service, err = kubeClient.Services(service.Namespace).Get(service.Name, metav1.GetOptions{})
service, err = kubeClient.Services(service.Namespace).Get(context.TODO(), service.Name, metav1.GetOptions{})
if err != nil {
klog.Warningf("Get service(%s/%s) error: %v", service.Namespace, service.Name, err)
continue
Expand Down Expand Up @@ -888,7 +888,7 @@ func updateServiceMarkIfNeeded(
delete(toUpdate.Annotations, ELBMarkAnnotation)
}

_, err := kubeClient.Services(service.Namespace).Update(toUpdate)
_, err := kubeClient.Services(service.Namespace).Update(context.TODO(), toUpdate, metav1.UpdateOptions{})
if err == nil {
return
}
Expand All @@ -903,7 +903,7 @@ func updateServiceMarkIfNeeded(
}

if apierrors.IsConflict(err) {
service, err = kubeClient.Services(service.Namespace).Get(service.Name, metav1.GetOptions{})
service, err = kubeClient.Services(service.Namespace).Get(context.TODO(), service.Name, metav1.GetOptions{})
if err != nil {
klog.Warningf("Get service(%s/%s) error: %v", service.Namespace, service.Name, err)
continue
Expand Down
10 changes: 5 additions & 5 deletions pkg/cloudprovider/huaweicloud/nat.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (nat *NATCloud) EnsureLoadBalancer(ctx context.Context, clusterName string,
}

//get service with loadbalancer type and loadbalancer ip
lbServers, err := nat.kubeClient.Services("").List(metav1.ListOptions{})
lbServers, err := nat.kubeClient.Services("").List(context.TODO(), metav1.ListOptions{})
var lbPorts []v1.ServicePort
for _, svc := range lbServers.Items {
lbType := svc.Annotations[ELBClassAnnotation]
Expand Down Expand Up @@ -362,7 +362,7 @@ func (nat *NATCloud) UpdateLoadBalancer(ctx context.Context, clusterName string,
errs = append(errs, fmt.Errorf("The port has no ipAddress binded "))
continue
}
node, err := nat.kubeClient.Nodes().Get(networkPort.FixedIps[0].IpAddress, metav1.GetOptions{})
node, err := nat.kubeClient.Nodes().Get(context.TODO(), networkPort.FixedIps[0].IpAddress, metav1.GetOptions{})
if err != nil {
klog.Errorf("Get node(%s) error: %v", networkPort.FixedIps[0].IpAddress, err)
continue
Expand Down Expand Up @@ -475,7 +475,7 @@ func (nat *NATCloud) getSecret(namespace, secretName string) (*Secret, error) {
if ok {
kubeSecret = obj.(*v1.Secret)
} else {
secret, err := nat.kubeClient.Secrets(namespace).Get(secretName, metav1.GetOptions{})
secret, err := nat.kubeClient.Secrets(namespace).Get(context.TODO(), secretName, metav1.GetOptions{})
if err != nil {
return nil, err
}
Expand All @@ -502,7 +502,7 @@ func (nat *NATCloud) getSecret(namespace, secretName string) (*Secret, error) {
}

func (nat *NATCloud) getPods(name, namespace string) (*v1.PodList, error) {
service, err := nat.kubeClient.Services(namespace).Get(name, metav1.GetOptions{})
service, err := nat.kubeClient.Services(namespace).Get(context.TODO(), name, metav1.GetOptions{})
if err != nil {
return nil, err
}
Expand All @@ -515,7 +515,7 @@ func (nat *NATCloud) getPods(name, namespace string) (*v1.PodList, error) {
set = service.Spec.Selector
labelSelector := set.AsSelector()
opts := metav1.ListOptions{LabelSelector: labelSelector.String()}
return nat.kubeClient.Pods(namespace).List(opts)
return nat.kubeClient.Pods(namespace).List(context.TODO(), opts)
}

func genDNATRuleDescription() string {
Expand Down
7 changes: 5 additions & 2 deletions vendor/github.com/evanphx/json-patch/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/evanphx/json-patch/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions vendor/github.com/evanphx/json-patch/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions vendor/github.com/evanphx/json-patch/merge.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a6e0b2b

Please sign in to comment.