From 41814cf7e4f3ac2119b22cc12995334c19c4a832 Mon Sep 17 00:00:00 2001 From: Joe Kratzat Date: Thu, 29 Jun 2023 13:45:25 -0400 Subject: [PATCH 1/4] feat: Upgrade to Kubernetes 1.26 --- templates/cluster-template-oci-addons.yaml | 4 ++-- test/e2e/config/e2e_conf.yaml | 6 +++--- test/e2e/data/ccm/ccm.yaml | 6 +++--- test/e2e/data/infrastructure-oci/bases/ccm.yaml | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/templates/cluster-template-oci-addons.yaml b/templates/cluster-template-oci-addons.yaml index f5b83118..46805126 100644 --- a/templates/cluster-template-oci-addons.yaml +++ b/templates/cluster-template-oci-addons.yaml @@ -234,7 +234,7 @@ data: path: /etc/kubernetes containers: - name: oci-cloud-controller-manager - image: ghcr.io/oracle/cloud-provider-oci:v1.25.0 + image: ghcr.io/oracle/cloud-provider-oci:v1.26.0 command: ["/usr/local/bin/oci-cloud-controller-manager"] args: - --cloud-config=/etc/oci/cloud-provider.yaml @@ -522,7 +522,7 @@ data: - --fss-csi-endpoint=unix://var/run/shared-tmpfs/csi-fss.sock command: - /usr/local/bin/oci-csi-controller-driver - image: ghcr.io/oracle/cloud-provider-oci:v1.25.0 + image: ghcr.io/oracle/cloud-provider-oci:v1.26.0 imagePullPolicy: IfNotPresent volumeMounts: - name: config diff --git a/test/e2e/config/e2e_conf.yaml b/test/e2e/config/e2e_conf.yaml index 612cfcad..c8a0bfdb 100644 --- a/test/e2e/config/e2e_conf.yaml +++ b/test/e2e/config/e2e_conf.yaml @@ -80,7 +80,7 @@ providers: - sourcePath: "../data/infrastructure-oci/v1beta2/metadata.yaml" variables: - KUBERNETES_VERSION: "v1.25.6" + KUBERNETES_VERSION: "v1.26.6" OCI_MANAGED_KUBERNETES_VERSION: "v1.25.4" OCI_MANAGED_KUBERNETES_VERSION_UPGRADE: "v1.26.2" EXP_MACHINE_POOL: "true" @@ -92,8 +92,8 @@ variables: CCM_PATH: "${PWD}/test/e2e/data/ccm/ccm.yaml" CONFORMANCE_WORKER_MACHINE_COUNT: "2" CONFORMANCE_CONTROL_PLANE_MACHINE_COUNT: "1" - KUBERNETES_VERSION_UPGRADE_TO: "v1.25.6" - KUBERNETES_VERSION_UPGRADE_FROM: "v1.24.4" + KUBERNETES_VERSION_UPGRADE_TO: "v1.26.6" + KUBERNETES_VERSION_UPGRADE_FROM: "v1.25.6" KUBERNETES_UPGRADE_OCI_IMAGE_ID: "${KUBERNETES_UPGRADE_OCI_IMAGE_ID}" IP_FAMILY: "IPv4" CLUSTER_TOPOLOGY: "true" diff --git a/test/e2e/data/ccm/ccm.yaml b/test/e2e/data/ccm/ccm.yaml index 790c5155..fc7402c3 100644 --- a/test/e2e/data/ccm/ccm.yaml +++ b/test/e2e/data/ccm/ccm.yaml @@ -63,7 +63,7 @@ spec: path: /etc/kubernetes containers: - name: oci-cloud-controller-manager - image: ghcr.io/oracle/cloud-provider-oci:v1.25.0 + image: ghcr.io/oracle/cloud-provider-oci:v1.26.0 command: ["/usr/local/bin/oci-cloud-controller-manager"] args: - --cloud-config=/etc/oci/cloud-provider.yaml @@ -343,7 +343,7 @@ spec: - --fss-csi-endpoint=unix://var/run/shared-tmpfs/csi-fss.sock command: - /usr/local/bin/oci-csi-controller-driver - image: ghcr.io/oracle/cloud-provider-oci:v1.25.0 + image: ghcr.io/oracle/cloud-provider-oci:v1.26.0 imagePullPolicy: IfNotPresent volumeMounts: - name: config @@ -494,7 +494,7 @@ spec: fieldPath: spec.nodeName - name: PATH value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/host/usr/bin:/host/sbin - image: ghcr.io/oracle/cloud-provider-oci:v1.25.0 + image: ghcr.io/oracle/cloud-provider-oci:v1.26.0 securityContext: privileged: true volumeMounts: diff --git a/test/e2e/data/infrastructure-oci/bases/ccm.yaml b/test/e2e/data/infrastructure-oci/bases/ccm.yaml index cb9b46a9..3870385c 100644 --- a/test/e2e/data/infrastructure-oci/bases/ccm.yaml +++ b/test/e2e/data/infrastructure-oci/bases/ccm.yaml @@ -94,7 +94,7 @@ data: path: /etc/kubernetes containers: - name: oci-cloud-controller-manager - image: ghcr.io/oracle/cloud-provider-oci:v1.25.0 + image: ghcr.io/oracle/cloud-provider-oci:v1.26.0 command: ["/usr/local/bin/oci-cloud-controller-manager"] args: - --cloud-config=/etc/oci/cloud-provider.yaml @@ -385,7 +385,7 @@ data: - --fss-csi-endpoint=unix://var/run/shared-tmpfs/csi-fss.sock command: - /usr/local/bin/oci-csi-controller-driver - image: ghcr.io/oracle/cloud-provider-oci:v1.25.0 + image: ghcr.io/oracle/cloud-provider-oci:v1.26.0 imagePullPolicy: IfNotPresent volumeMounts: - name: config @@ -536,7 +536,7 @@ data: fieldPath: spec.nodeName - name: PATH value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/host/usr/bin:/host/sbin - image: ghcr.io/oracle/cloud-provider-oci:v1.25.0 + image: ghcr.io/oracle/cloud-provider-oci:v1.26.0 securityContext: privileged: true volumeMounts: From e1f31ca2c7f65d2bb17949f0cec85a627c76f9a4 Mon Sep 17 00:00:00 2001 From: Joe Kratzat Date: Fri, 7 Jul 2023 10:41:00 -0400 Subject: [PATCH 2/4] udpated e2e ccm.yaml --- test/e2e/data/ccm/ccm.yaml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/test/e2e/data/ccm/ccm.yaml b/test/e2e/data/ccm/ccm.yaml index fc7402c3..a8b50b77 100644 --- a/test/e2e/data/ccm/ccm.yaml +++ b/test/e2e/data/ccm/ccm.yaml @@ -132,8 +132,6 @@ rules: - "extension-apiserver-authentication" verbs: - get - - list - - watch - apiGroups: - "" @@ -385,6 +383,14 @@ spec: --- apiVersion: storage.k8s.io/v1 kind: CSIDriver +metadata: + name: fss.csi.oraclecloud.com +spec: + attachRequired: false + podInfoOnMount: false +--- +apiVersion: storage.k8s.io/v1 +kind: CSIDriver metadata: name: blockvolume.csi.oraclecloud.com spec: @@ -655,6 +661,21 @@ rules: - apiGroups: [""] resources: ["persistentvolumeclaims/status"] verbs: ["patch"] + - apiGroups: [ "snapshot.storage.k8s.io" ] + resources: [ "volumesnapshotclasses" ] + verbs: [ "get", "list", "watch" ] + - apiGroups: [ "snapshot.storage.k8s.io" ] + resources: [ "volumesnapshotcontents" ] + verbs: [ "create", "get", "list", "watch", "update", "delete", "patch" ] + - apiGroups: [ "snapshot.storage.k8s.io" ] + resources: [ "volumesnapshotcontents/status" ] + verbs: [ "update", "patch" ] + - apiGroups: [ "snapshot.storage.k8s.io" ] + resources: [ "volumesnapshots" ] + verbs: [ "get", "list", "watch", "update", "patch" ] + - apiGroups: [ "snapshot.storage.k8s.io" ] + resources: [ "volumesnapshots/status" ] + verbs: [ "update", "patch" ] --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 From 861e2039701097b5eec4511bc94c215f88349923 Mon Sep 17 00:00:00 2001 From: Joe Kratzat Date: Mon, 10 Jul 2023 10:13:16 -0400 Subject: [PATCH 3/4] Update cluster-template-oci-addons to 1.26 --- templates/cluster-template-oci-addons.yaml | 40 +++++++++++++++++++--- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/templates/cluster-template-oci-addons.yaml b/templates/cluster-template-oci-addons.yaml index 46805126..bdadacc0 100644 --- a/templates/cluster-template-oci-addons.yaml +++ b/templates/cluster-template-oci-addons.yaml @@ -465,7 +465,7 @@ data: node-role.kubernetes.io/control-plane: "" containers: - name: csi-volume-provisioner - image: k8s.gcr.io/sig-storage/csi-provisioner:v3.2.1 + image: registry.k8s.io/sig-storage/csi-provisioner:v3.5.0 args: - --csi-address=/var/run/shared-tmpfs/csi.sock - --volume-name-prefix=csi @@ -480,7 +480,7 @@ data: - mountPath: /var/run/shared-tmpfs name: shared-tmpfs - name: csi-fss-volume-provisioner - image: k8s.gcr.io/sig-storage/csi-provisioner:v3.2.1 + image: registry.k8s.io/sig-storage/csi-provisioner:v3.5.0 args: - --csi-address=/var/run/shared-tmpfs/csi-fss.sock - --volume-name-prefix=csi-fss @@ -516,6 +516,23 @@ data: volumeMounts: - mountPath: /var/run/shared-tmpfs name: shared-tmpfs + - name: snapshot-controller + image: registry.k8s.io/sig-storage/snapshot-controller:v6.2.0 + args: + - --leader-election + imagePullPolicy: "IfNotPresent" + volumeMounts: + - mountPath: /var/run/shared-tmpfs + name: shared-tmpfs + - name: csi-snapshotter + image: registry.k8s.io/sig-storage/csi-snapshotter:v6.2.0 + args: + - --csi-address=/var/run/shared-tmpfs/csi.sock + - --leader-election + imagePullPolicy: "IfNotPresent" + volumeMounts: + - mountPath: /var/run/shared-tmpfs + name: shared-tmpfs - name: oci-csi-controller-driver args: - --endpoint=unix://var/run/shared-tmpfs/csi.sock @@ -673,7 +690,7 @@ data: fieldPath: spec.nodeName - name: PATH value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/host/usr/bin:/host/sbin - image: ghcr.io/oracle/cloud-provider-oci:v1.25.0 + image: ghcr.io/oracle/cloud-provider-oci:v1.26.0 securityContext: privileged: true volumeMounts: @@ -835,8 +852,23 @@ data: - apiGroups: [""] resources: ["persistentvolumeclaims/status"] verbs: ["patch"] + - apiGroups: [ "snapshot.storage.k8s.io" ] + resources: [ "volumesnapshotclasses" ] + verbs: [ "get", "list", "watch" ] + - apiGroups: [ "snapshot.storage.k8s.io" ] + resources: [ "volumesnapshotcontents" ] + verbs: [ "create", "get", "list", "watch", "update", "delete", "patch" ] + - apiGroups: [ "snapshot.storage.k8s.io" ] + resources: [ "volumesnapshotcontents/status" ] + verbs: [ "update", "patch" ] + - apiGroups: [ "snapshot.storage.k8s.io" ] + resources: [ "volumesnapshots" ] + verbs: [ "get", "list", "watch", "update", "patch" ] + - apiGroups: [ "snapshot.storage.k8s.io" ] + resources: [ "volumesnapshots/status" ] + verbs: [ "update", "patch" ] --- - + kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: From 5e2d9c1136ab0fccd8ff89098ca1377a52ba1e36 Mon Sep 17 00:00:00 2001 From: Joe Kratzat Date: Mon, 10 Jul 2023 21:15:49 -0400 Subject: [PATCH 4/4] remove the snapshot-controller and csi-snapshotter from addons template --- templates/cluster-template-oci-addons.yaml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/templates/cluster-template-oci-addons.yaml b/templates/cluster-template-oci-addons.yaml index bdadacc0..3f3829c0 100644 --- a/templates/cluster-template-oci-addons.yaml +++ b/templates/cluster-template-oci-addons.yaml @@ -516,23 +516,6 @@ data: volumeMounts: - mountPath: /var/run/shared-tmpfs name: shared-tmpfs - - name: snapshot-controller - image: registry.k8s.io/sig-storage/snapshot-controller:v6.2.0 - args: - - --leader-election - imagePullPolicy: "IfNotPresent" - volumeMounts: - - mountPath: /var/run/shared-tmpfs - name: shared-tmpfs - - name: csi-snapshotter - image: registry.k8s.io/sig-storage/csi-snapshotter:v6.2.0 - args: - - --csi-address=/var/run/shared-tmpfs/csi.sock - - --leader-election - imagePullPolicy: "IfNotPresent" - volumeMounts: - - mountPath: /var/run/shared-tmpfs - name: shared-tmpfs - name: oci-csi-controller-driver args: - --endpoint=unix://var/run/shared-tmpfs/csi.sock