diff --git a/.gcloudignore b/.gcloudignore index d72fc90b8..19aad35e6 100644 --- a/.gcloudignore +++ b/.gcloudignore @@ -4,10 +4,11 @@ # Ignore tooling binaries. /hack/tools/bin -# Ignore vendor at the root of the project. Please note that +# Ignore vendor at the root and test of the project. Please note that # /vendor/bitbucket.org/ww/goautoneg is versioned forcefully in order to # bypass a build issue. /vendor +/test/e2e/vendor *.json *.sublime-project diff --git a/.gitignore b/.gitignore index a4186bd20..44328397a 100644 --- a/.gitignore +++ b/.gitignore @@ -21,10 +21,11 @@ # Ignore the binaries copied into the staging areas. /cluster/images/controller-manager/vsphere-cloud-controller-manager* -# Ignore vendor at the root of the project. Please note that +# Ignore vendor at the root and test of the project. Please note that # /vendor/bitbucket.org/ww/goautoneg is versioned forcefully in order to # bypass a build issue. /vendor +/test/e2e/vendor *.json *.sublime-project diff --git a/README.md b/README.md index 4a88e2f10..52cdd025c 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Version matrix: | Kubernetes Version | vSphere Cloud Provider Release Version | Cloud Provider Branch | |--------------------|----------------------------------------|-----------------------| +| v1.32.X | v1.32.X | release-1.32 | | v1.31.X | v1.31.X | release-1.31 | | v1.30.X | v1.30.X | release-1.30 | | v1.29.X | v1.29.X | release-1.29 | @@ -107,7 +108,7 @@ registry.k8s.io/cloud-pv-vsphere/cloud-provider-vsphere:v1.30.1 Official releases of the vSphere Cloud Controller Manager container image can be found at: ```bash -registry.k8s.io/cloud-pv-vsphere/cloud-provider-vsphere:v1.31.0 # <== latest version +registry.k8s.io/cloud-pv-vsphere/cloud-provider-vsphere:v1.32.0 # <== latest version ``` The very latest builds from the tip of master, which may not be stable, can be found at: diff --git a/charts/vsphere-cpi-1.32.0.tgz b/charts/vsphere-cpi-1.32.0.tgz new file mode 100644 index 000000000..fe45bd2f7 Binary files /dev/null and b/charts/vsphere-cpi-1.32.0.tgz differ diff --git a/charts/vsphere-cpi/Chart.yaml b/charts/vsphere-cpi/Chart.yaml index d961b867f..3cbc91e2b 100644 --- a/charts/vsphere-cpi/Chart.yaml +++ b/charts/vsphere-cpi/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 -appVersion: 1.31.0 +appVersion: 1.32.0 description: A Helm chart for vSphere Cloud Provider Interface Manager (CPI) name: vsphere-cpi -version: 1.31.0 +version: 1.32.0 keywords: - vsphere - vmware diff --git a/charts/vsphere-cpi/values.yaml b/charts/vsphere-cpi/values.yaml index 5cc04ca96..fc3aca07f 100644 --- a/charts/vsphere-cpi/values.yaml +++ b/charts/vsphere-cpi/values.yaml @@ -49,7 +49,7 @@ serviceAccount: daemonset: annotations: {} image: registry.k8s.io/cloud-pv-vsphere/cloud-provider-vsphere - tag: v1.31.0 + tag: v1.32.0 pullPolicy: IfNotPresent dnsPolicy: ClusterFirst cmdline: diff --git a/cluster/images/controller-manager/Dockerfile b/cluster/images/controller-manager/Dockerfile index 92119f8e3..52362088b 100644 --- a/cluster/images/controller-manager/Dockerfile +++ b/cluster/images/controller-manager/Dockerfile @@ -27,7 +27,7 @@ ARG DISTROLESS_IMAGE=gcr.io/distroless/static-debian11:latest FROM ${GOLANG_IMAGE} as builder # This build arg is the version to embed in the CPI binary -ARG VERSION=1.31.0 +ARG VERSION=1.32.0 # This build arg controls the GOPROXY setting ARG GOPROXY diff --git a/docs/book/tutorials/disable-node-deletion.yaml b/docs/book/tutorials/disable-node-deletion.yaml index 9bdc6159f..2d3e0ed21 100644 --- a/docs/book/tutorials/disable-node-deletion.yaml +++ b/docs/book/tutorials/disable-node-deletion.yaml @@ -233,7 +233,7 @@ spec: priorityClassName: system-node-critical containers: - name: vsphere-cloud-controller-manager - image: registry.k8s.io/cloud-pv-vsphere/cloud-provider-vsphere:v1.31.0 + image: registry.k8s.io/cloud-pv-vsphere/cloud-provider-vsphere:v1.32.0 args: - --cloud-provider=vsphere - --v=2 diff --git a/hack/update-docs.sh b/hack/update-docs.sh index cc6e805be..b1dc7791e 100755 --- a/hack/update-docs.sh +++ b/hack/update-docs.sh @@ -119,7 +119,7 @@ submit_pr() { git add . - git commit -m "update docuemnt for ${release_version} release" + git commit -m "update documents for ${release_version} release" git push -u origin "${NEW_BRANCH}" diff --git a/index.yaml b/index.yaml index def6b9d27..7638761c9 100644 --- a/index.yaml +++ b/index.yaml @@ -1,9 +1,28 @@ apiVersion: v1 entries: vsphere-cpi: + - apiVersion: v2 + appVersion: 1.32.0 + created: "2024-12-12T16:59:11.419195+08:00" + description: A Helm chart for vSphere Cloud Provider Interface Manager (CPI) + digest: 963cc60e62a788f6f0bfa3e4bdd702081ee96c624dbc2417ed316da96485faf0 + home: https://github.com/kubernetes/cloud-provider-vsphere + icon: https://raw.githubusercontent.com/kubernetes/cloud-provider-vsphere/master/docs/vmware_logo.png + keywords: + - vsphere + - vmware + - cloud + - provider + - cpi + name: vsphere-cpi + sources: + - https://github.com/kubernetes/cloud-provider-vsphere + urls: + - https://kubernetes.github.io/cloud-provider-vsphere/charts/vsphere-cpi-1.32.0.tgz + version: 1.32.0 - apiVersion: v2 appVersion: v1.31.0 - created: "2024-08-14T09:37:55.809881716+05:30" + created: "2024-12-12T16:59:11.421395+08:00" description: A Helm chart for vSphere Cloud Provider Interface Manager (CPI) digest: e2855b10483653a56451c1dff2b08344e7d09354da07cf341998436f48d09e97 home: https://github.com/kubernetes/cloud-provider-vsphere @@ -22,7 +41,7 @@ entries: version: v1.31.0 - apiVersion: v2 appVersion: v1.30.1 - created: "2024-08-14T09:37:55.808919104+05:30" + created: "2024-12-12T16:59:11.420642+08:00" description: A Helm chart for vSphere Cloud Provider Interface Manager (CPI) digest: 7ce235ded9ebd341170d8285615df00d2df565a181c7735ec3454001315f866e home: https://github.com/kubernetes/cloud-provider-vsphere @@ -41,7 +60,7 @@ entries: version: v1.30.1 - apiVersion: v2 appVersion: v1.30.0 - created: "2024-08-14T09:37:55.80800639+05:30" + created: "2024-12-12T16:59:11.419916+08:00" description: A Helm chart for vSphere Cloud Provider Interface Manager (CPI) digest: 86719831dd7d9edeff9b54e2854a36ac3c13d23fa959d56e93bba681e55d65d6 home: https://github.com/kubernetes/cloud-provider-vsphere @@ -60,7 +79,7 @@ entries: version: v1.30.0 - apiVersion: v2 appVersion: 1.29.0 - created: "2024-08-14T09:37:55.805766352+05:30" + created: "2024-12-12T16:59:11.418485+08:00" description: A Helm chart for vSphere Cloud Provider Interface Manager (CPI) digest: 68bcac15c329570ff41ab5f7c6c4387e40eede03eca6b95fea73e3667b194564 home: https://github.com/kubernetes/cloud-provider-vsphere @@ -79,7 +98,7 @@ entries: version: 1.29.0 - apiVersion: v2 appVersion: 1.28.0 - created: "2024-08-14T09:37:55.803517868+05:30" + created: "2024-12-12T16:59:11.417666+08:00" description: A Helm chart for vSphere Cloud Provider Interface Manager (CPI) digest: 2cb4772b757548de51481089706e6c2f1a2cbfe72eef9c8e673b9e22e8e1e9e0 home: https://github.com/kubernetes/cloud-provider-vsphere @@ -98,7 +117,7 @@ entries: version: 1.28.0 - apiVersion: v2 appVersion: 1.27.0 - created: "2024-08-14T09:37:55.800375931+05:30" + created: "2024-12-12T16:59:11.415876+08:00" description: A Helm chart for vSphere Cloud Provider Interface Manager (CPI) digest: 4b70f3e1ac580079f4600703bef4fc2007e87e96e587c866657a6e91fad83a1c home: https://github.com/kubernetes/cloud-provider-vsphere @@ -117,7 +136,7 @@ entries: version: 1.27.0 - apiVersion: v2 appVersion: 1.26.0 - created: "2024-08-14T09:37:55.796636061+05:30" + created: "2024-12-12T16:59:11.415116+08:00" description: A Helm chart for vSphere Cloud Provider Interface Manager (CPI) digest: 2ecf416700c819f408eedf9263d08dbc04cd61969576be13d8935f15605f4a69 home: https://github.com/kubernetes/cloud-provider-vsphere @@ -136,7 +155,7 @@ entries: version: 1.26.0 - apiVersion: v2 appVersion: 1.25.0 - created: "2024-08-14T09:37:55.795869262+05:30" + created: "2024-12-12T16:59:11.412058+08:00" description: A Helm chart for vSphere Cloud Provider Interface Manager (CPI) digest: 3d48df49fdfb8bda6b5cec1d9e9f566183a150c8c01e111eec5e22ab1f557e31 home: https://github.com/kubernetes/cloud-provider-vsphere @@ -155,7 +174,7 @@ entries: version: 1.25.0 - apiVersion: v2 appVersion: 1.24.2 - created: "2024-08-14T09:37:55.795131865+05:30" + created: "2024-12-12T16:59:11.410745+08:00" description: A Helm chart for vSphere Cloud Provider Interface Manager (CPI) digest: d0bfaf8a081128f9477b8d8ff00079f8506d4aa2ea899f55511d06400179b159 home: https://github.com/kubernetes/cloud-provider-vsphere @@ -174,7 +193,7 @@ entries: version: 1.24.2 - apiVersion: v2 appVersion: 1.24.1 - created: "2024-08-14T09:37:55.794448337+05:30" + created: "2024-12-12T16:59:11.409673+08:00" description: A Helm chart for vSphere Cloud Provider Interface Manager (CPI) digest: 6e9dec3e4c6aaeed0d7f95aa2beade986d5a0a2261509b11479ceb1a51312096 home: https://github.com/kubernetes/cloud-provider-vsphere @@ -191,4 +210,4 @@ entries: urls: - https://kubernetes.github.io/cloud-provider-vsphere/charts/vsphere-cpi-1.24.1.tgz version: 1.24.1 -generated: "2024-08-14T09:37:55.792976716+05:30" +generated: "2024-12-12T16:59:11.39919+08:00" diff --git a/manifests/controller-manager/vsphere-cloud-controller-manager-ds.yaml b/manifests/controller-manager/vsphere-cloud-controller-manager-ds.yaml index 864dc07e0..e73658977 100644 --- a/manifests/controller-manager/vsphere-cloud-controller-manager-ds.yaml +++ b/manifests/controller-manager/vsphere-cloud-controller-manager-ds.yaml @@ -43,7 +43,7 @@ spec: serviceAccountName: cloud-controller-manager containers: - name: vsphere-cloud-controller-manager - image: registry.k8s.io/cloud-pv-vsphere/cloud-provider-vsphere:v1.31.0 + image: registry.k8s.io/cloud-pv-vsphere/cloud-provider-vsphere:v1.32.0 args: - --v=2 - --cloud-provider=vsphere diff --git a/manifests/controller-manager/vsphere-cloud-controller-manager-pod.yaml b/manifests/controller-manager/vsphere-cloud-controller-manager-pod.yaml index 6cf266a36..8934618be 100644 --- a/manifests/controller-manager/vsphere-cloud-controller-manager-pod.yaml +++ b/manifests/controller-manager/vsphere-cloud-controller-manager-pod.yaml @@ -19,7 +19,7 @@ metadata: spec: containers: - name: vsphere-cloud-controller-manager - image: registry.k8s.io/cloud-pv-vsphere/cloud-provider-vsphere:v1.31.0 + image: registry.k8s.io/cloud-pv-vsphere/cloud-provider-vsphere:v1.32.0 args: - --v=2 - --cloud-config=/etc/cloud/vsphere.conf diff --git a/releases/README.md b/releases/README.md index 116f4c88f..cad97a3c8 100644 --- a/releases/README.md +++ b/releases/README.md @@ -8,14 +8,14 @@ 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.31.0) 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.32.0) 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 -For example, the major version of '1.31.x' is '1.31', then run: +For example, the major version of '1.32.x' is '1.32', then run: ```bash -VERSION=1.31 +VERSION=1.32 wget https://raw.githubusercontent.com/kubernetes/cloud-provider-vsphere/release-$VERSION/releases/v$VERSION/vsphere-cloud-controller-manager.yaml ``` diff --git a/releases/v1.32/vsphere-cloud-controller-manager.yaml b/releases/v1.32/vsphere-cloud-controller-manager.yaml new file mode 100644 index 000000000..fb3f94e8a --- /dev/null +++ b/releases/v1.32/vsphere-cloud-controller-manager.yaml @@ -0,0 +1,263 @@ +--- +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: "<ENTER_YOUR_VCENTER_USERNAME>" + 10.0.0.1.password: "<ENTER_YOUR_VCENTER_PASSWORD>" + 1.2.3.4.username: "<ENTER_YOUR_VCENTER_USERNAME>" + 1.2.3.4.password: "<ENTER_YOUR_VCENTER_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 +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: + tolerations: + - key: node.cloudprovider.kubernetes.io/uninitialized + value: "true" + effect: NoSchedule + - key: node-role.kubernetes.io/master + effect: NoSchedule + operator: Exists + - key: node-role.kubernetes.io/control-plane + effect: NoSchedule + operator: Exists + - key: node.kubernetes.io/not-ready + effect: NoSchedule + operator: Exists + securityContext: + runAsUser: 1001 + serviceAccountName: cloud-controller-manager + priorityClassName: system-node-critical + containers: + - name: vsphere-cloud-controller-manager + image: registry.k8s.io/cloud-pv-vsphere/cloud-provider-vsphere:v1.32.0 + 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 + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: node-role.kubernetes.io/control-plane + operator: Exists + - matchExpressions: + - key: node-role.kubernetes.io/master + operator: Exists