From 1bced907ff4d1a6e280198aa070602d0337096bb Mon Sep 17 00:00:00 2001 From: lubronzhan Date: Mon, 10 Jan 2022 11:09:57 -0800 Subject: [PATCH] v1.23.0-alpha.1 release --- README.md | 3 +- charts/vsphere-cpi/Chart.yaml | 2 +- charts/vsphere-cpi/README.md | 2 +- charts/vsphere-cpi/values.yaml | 2 +- cluster/images/controller-manager/Dockerfile | 2 +- docs/book/tutorials/deploying-cpi-with-k3s.md | 2 +- .../book/tutorials/disable-node-deletion.yaml | 2 +- releases/README.md | 2 +- .../vsphere-cloud-controller-manager.yaml | 253 ++++++++++++++++++ test/e2e/config/vsphere-dev.yaml | 2 +- 10 files changed, 263 insertions(+), 9 deletions(-) create mode 100644 releases/v1.23/vsphere-cloud-controller-manager.yaml diff --git a/README.md b/README.md index 2a85e8472..bd7f6899f 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,14 @@ Version matrix: | Kubernetes Version | vSphere Cloud Provider Release Version | Cloud Provider Branch | | ----------- | ----------- | ----------- | +| v1.23.X | v1.23.X | release-1.23 | | v1.22.X | v1.22.X | release-1.22 | | v1.21.X | v1.21.X | release-1.21 | | v1.20.X | v1.20.X | release-1.20 | | v1.19.X | v1.19.X | release-1.19 | | v1.18.X | v1.18.X | release-1.18 | -Our current support policy is that when a new Kubernetes release comes out, we will bump our k8s dependencies to the new version and cut a new release for CPI, e.g. CPI v1.22.x was released after k8s v1.22 comes out. +Our current support policy is that when a new Kubernetes release comes out, we will bump our k8s dependencies to the new version and cut a new release for CPI, e.g. CPI v1.23.x was released after k8s v1.23 comes out. The latest CPI version is ![GitHub release (latest SemVer including pre-releases](https://img.shields.io/github/v/release/kubernetes/cloud-provider-vsphere?include_prereleases). The recommended way to upgrade CPI can be found on [this page](https://github.com/kubernetes/cloud-provider-vsphere/blob/master/releases/README.md). diff --git a/charts/vsphere-cpi/Chart.yaml b/charts/vsphere-cpi/Chart.yaml index b9b8de66a..972b8c31e 100644 --- a/charts/vsphere-cpi/Chart.yaml +++ b/charts/vsphere-cpi/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 1.22.2 +appVersion: 1.22.4 description: A Helm chart for vSphere Cloud Provider Interface Manager (CPI) name: vsphere-cpi version: 1.0.0 diff --git a/charts/vsphere-cpi/README.md b/charts/vsphere-cpi/README.md index c88c38493..772abf13d 100644 --- a/charts/vsphere-cpi/README.md +++ b/charts/vsphere-cpi/README.md @@ -8,7 +8,7 @@ This chart deploys all components required to run the external vSphere CPI as de ## Prerequisites -- Has been tested on Kubernetes 1.22.X+ +- Has been tested on Kubernetes 1.23.X+ - Assumes your Kubernetes cluster has been configured to use the external cloud provider. Please take a look at configuration guidelines located in the [Kubernetes documentation](https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller/#running-cloud-controller-manager). ## Installing the Chart using Helm 3.0+ diff --git a/charts/vsphere-cpi/values.yaml b/charts/vsphere-cpi/values.yaml index b966e4a53..fa424e8b8 100644 --- a/charts/vsphere-cpi/values.yaml +++ b/charts/vsphere-cpi/values.yaml @@ -58,7 +58,7 @@ serviceAccount: daemonset: annotations: {} image: gcr.io/cloud-provider-vsphere/cpi/release/manager - tag: v1.22.2 + tag: v1.23.0-alpha.1 pullPolicy: IfNotPresent dnsPolicy: ClusterFirst cmdline: diff --git a/cluster/images/controller-manager/Dockerfile b/cluster/images/controller-manager/Dockerfile index 7da12f67c..ada08cbcf 100644 --- a/cluster/images/controller-manager/Dockerfile +++ b/cluster/images/controller-manager/Dockerfile @@ -33,7 +33,7 @@ ARG DISTROLESS_IMAGE=gcr.io/distroless/static@sha256:9b60270ec0991bc4f14bda475e8 FROM ${GOLANG_IMAGE} as builder # This build arg is the version to embed in the CPI binary -ARG VERSION=1.22.3 +ARG VERSION=1.23.0-alpha.1 # This build arg controls the GOPROXY setting ARG GOPROXY diff --git a/docs/book/tutorials/deploying-cpi-with-k3s.md b/docs/book/tutorials/deploying-cpi-with-k3s.md index a3a47b15e..b5a1a3f01 100644 --- a/docs/book/tutorials/deploying-cpi-with-k3s.md +++ b/docs/book/tutorials/deploying-cpi-with-k3s.md @@ -4,7 +4,7 @@ This document is designed to show you how to integrate k3s with cloud provider v When running with a cloud-controller-manager, it is expected to pass the node provider ID to a CCM as `://`, in our case, `vsphere://1234567`. However, k3s passes it as `k3s://`, which makes vsphere CCM not be able to find the node. -We only support `vsphere` as the provider name that is used for constructing **providerID** for both [vsphere](https://github.com/kubernetes/cloud-provider-vsphere/blob/v1.22.2/pkg/cloudprovider/vsphere/cloud.go#L51) and [vsphere-paravirtual](https://github.com/kubernetes/cloud-provider-vsphere/blob/v1.22.2/pkg/cloudprovider/vsphereparavirtual/cloud.go#L42). +We only support `vsphere` as the provider name that is used for constructing **providerID** for both [vsphere](https://github.com/kubernetes/cloud-provider-vsphere/blob/v1.23.0-alpha.1/pkg/cloudprovider/vsphere/cloud.go#L51) and [vsphere-paravirtual](https://github.com/kubernetes/cloud-provider-vsphere/blob/1.23.0-alpha.1/pkg/cloudprovider/vsphereparavirtual/cloud.go#L42). ## How to integrate k3s with cloud provider vsphere diff --git a/docs/book/tutorials/disable-node-deletion.yaml b/docs/book/tutorials/disable-node-deletion.yaml index 6ce0c8cdf..adbe2276e 100644 --- a/docs/book/tutorials/disable-node-deletion.yaml +++ b/docs/book/tutorials/disable-node-deletion.yaml @@ -234,7 +234,7 @@ spec: serviceAccountName: cloud-controller-manager containers: - name: vsphere-cloud-controller-manager - image: gcr.io/cloud-provider-vsphere/cpi/release/manager:v1.22.2 + image: gcr.io/cloud-provider-vsphere/cpi/release/manager:v1.23.0-alpha.1 args: - --cloud-provider=vsphere - --v=2 diff --git a/releases/README.md b/releases/README.md index be0544fd4..d0f7e3edc 100644 --- a/releases/README.md +++ b/releases/README.md @@ -8,7 +8,7 @@ Note that YAML files from [manifests/controller-manager repo](https://github.com ## Example workflow -In this tutorial, we will be installing the latest version of cloud provider vsphere(v1.22.3) freshly. If you have an older version of CPI already installed, the steps to deploy and upgrade CPI stay the same. With our `RollingUpdate` update strategy, after you update a DaemonSet template, old DaemonSet pods will be killed, and new DaemonSet pods will be created automatically. +In this tutorial, we will be installing the latest version of cloud provider vsphere(v1.23.0-alpha.1) freshly. If you have an older version of CPI already installed, the steps to deploy and upgrade CPI stay the same. With our `RollingUpdate` update strategy, after you update a DaemonSet template, old DaemonSet pods will be killed, and new DaemonSet pods will be created automatically. ### Step 1: find the kubernetes major version you are using diff --git a/releases/v1.23/vsphere-cloud-controller-manager.yaml b/releases/v1.23/vsphere-cloud-controller-manager.yaml new file mode 100644 index 000000000..25e4f70d3 --- /dev/null +++ b/releases/v1.23/vsphere-cloud-controller-manager.yaml @@ -0,0 +1,253 @@ +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: cloud-controller-manager + labels: + vsphere-cpi-infra: service-account + component: cloud-controller-manager + namespace: kube-system +--- +apiVersion: v1 +kind: Secret +metadata: + name: vsphere-cloud-secret + labels: + vsphere-cpi-infra: secret + component: cloud-controller-manager + namespace: kube-system + # NOTE: this is just an example configuration, update with real values based on your environment +stringData: + 10.0.0.1.username: "" + 10.0.0.1.password: "" + 1.2.3.4.username: "" + 1.2.3.4.password: "" +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: vsphere-cloud-config + labels: + vsphere-cpi-infra: config + component: cloud-controller-manager + namespace: kube-system +data: + # NOTE: this is just an example configuration, update with real values based on your environment + vsphere.conf: | + # Global properties in this section will be used for all specified vCenters unless overriden in VirtualCenter section. + global: + port: 443 + # set insecureFlag to true if the vCenter uses a self-signed cert + insecureFlag: true + # settings for using k8s secret + secretName: vsphere-cloud-secret + secretNamespace: kube-system + + # vcenter section + vcenter: + your-vcenter-name-here: + server: 10.0.0.1 + user: use-your-vcenter-user-here + password: use-your-vcenter-password-here + datacenters: + - hrwest + - hreast + could-be-a-tenant-label: + server: 1.2.3.4 + datacenters: + - mytenantdc + secretName: cpi-engineering-secret + secretNamespace: kube-system + + # labels for regions and zones + labels: + region: k8s-region + zone: k8s-zone +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: servicecatalog.k8s.io:apiserver-authentication-reader + labels: + vsphere-cpi-infra: role-binding + component: cloud-controller-manager + namespace: kube-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: extension-apiserver-authentication-reader +subjects: + - apiGroup: "" + kind: ServiceAccount + name: cloud-controller-manager + namespace: kube-system + - apiGroup: "" + kind: User + name: cloud-controller-manager +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: system:cloud-controller-manager + labels: + vsphere-cpi-infra: cluster-role-binding + component: cloud-controller-manager +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:cloud-controller-manager +subjects: + - kind: ServiceAccount + name: cloud-controller-manager + namespace: kube-system + - kind: User + name: cloud-controller-manager +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: system:cloud-controller-manager + labels: + vsphere-cpi-infra: role + component: cloud-controller-manager +rules: + - apiGroups: + - "" + resources: + - events + verbs: + - create + - patch + - update + - apiGroups: + - "" + resources: + - nodes + verbs: + - "*" + - apiGroups: + - "" + resources: + - nodes/status + verbs: + - patch + - apiGroups: + - "" + resources: + - services + verbs: + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - services/status + verbs: + - patch + - apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - create + - get + - list + - watch + - update + - apiGroups: + - "" + resources: + - persistentvolumes + verbs: + - get + - list + - update + - watch + - apiGroups: + - "" + resources: + - endpoints + verbs: + - create + - get + - list + - watch + - update + - apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - watch + - apiGroups: + - "coordination.k8s.io" + resources: + - leases + verbs: + - create + - get + - list + - watch + - update +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: vsphere-cloud-controller-manager + labels: + component: cloud-controller-manager + tier: control-plane + namespace: kube-system + annotations: + scheduler.alpha.kubernetes.io/critical-pod: "" +spec: + selector: + matchLabels: + name: vsphere-cloud-controller-manager + updateStrategy: + type: RollingUpdate + template: + metadata: + labels: + name: vsphere-cloud-controller-manager + component: cloud-controller-manager + tier: control-plane + spec: + nodeSelector: + node-role.kubernetes.io/master: "" + tolerations: + - key: node.cloudprovider.kubernetes.io/uninitialized + value: "true" + effect: NoSchedule + - key: node-role.kubernetes.io/master + effect: NoSchedule + operator: Exists + - key: node.kubernetes.io/not-ready + effect: NoSchedule + operator: Exists + securityContext: + runAsUser: 1001 + serviceAccountName: cloud-controller-manager + containers: + - name: vsphere-cloud-controller-manager + image: gcr.io/cloud-provider-vsphere/cpi/release/manager:v1.23.0-alpha.1 + args: + - --cloud-provider=vsphere + - --v=2 + - --cloud-config=/etc/cloud/vsphere.conf + volumeMounts: + - mountPath: /etc/cloud + name: vsphere-config-volume + readOnly: true + resources: + requests: + cpu: 200m + hostNetwork: true + volumes: + - name: vsphere-config-volume + configMap: + name: vsphere-cloud-config diff --git a/test/e2e/config/vsphere-dev.yaml b/test/e2e/config/vsphere-dev.yaml index 7bc9e0f4b..ec56a5f2f 100644 --- a/test/e2e/config/vsphere-dev.yaml +++ b/test/e2e/config/vsphere-dev.yaml @@ -141,7 +141,7 @@ providers: - sourcePath: "../data/infrastructure-vsphere/capi-upgrades/v1alpha4/cluster-template.yaml" variables: - KUBERNETES_VERSION: "v1.22.3" + KUBERNETES_VERSION: "1.23.0-alpha.1" CNI: "./data/cni/calico/calico.yaml" EXP_CLUSTER_RESOURCE_SET: "true" CONTROL_PLANE_MACHINE_COUNT: 1