From 42ada2b2c7872b4918c865d8b9c20ed134a7575d Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Tue, 25 Apr 2023 11:01:46 +0000 Subject: [PATCH] Minor bug fixes --- .../templates/tests/helm-tester.yaml | 223 ------------------ .../jsonnet/jsonnetfile.lock.json | 4 +- charts/kubezero-storage/update.sh | 2 +- 3 files changed, 3 insertions(+), 226 deletions(-) delete mode 100644 charts/kubezero-storage/charts/aws-ebs-csi-driver/templates/tests/helm-tester.yaml diff --git a/charts/kubezero-storage/charts/aws-ebs-csi-driver/templates/tests/helm-tester.yaml b/charts/kubezero-storage/charts/aws-ebs-csi-driver/templates/tests/helm-tester.yaml deleted file mode 100644 index 217db101..00000000 --- a/charts/kubezero-storage/charts/aws-ebs-csi-driver/templates/tests/helm-tester.yaml +++ /dev/null @@ -1,223 +0,0 @@ ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: ebs-csi-driver-test - annotations: - "helm.sh/hook": test - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: ebs-csi-driver-test - annotations: - "helm.sh/hook": test - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed -rules: - - apiGroups: [ "" ] - resources: - - events - - nodes - - pods - - replicationcontrollers - - serviceaccounts - - configmaps - - persistentvolumes - - persistentvolumeclaims - verbs: [ "list" ] - - apiGroups: [ "" ] - resources: - - services - - nodes - - nodes/proxy - - persistentvolumes - - persistentvolumeclaims - - pods - - pods/log - verbs: [ "get" ] - - apiGroups: [ "" ] - resources: - - namespaces - - persistentvolumes - - persistentvolumeclaims - - pods - - pods/exec - verbs: [ "create" ] - - apiGroups: [ "" ] - resources: - - namespaces - - persistentvolumes - - persistentvolumeclaims - - pods - verbs: [ "delete" ] - - apiGroups: [ "" ] - resources: - - persistentvolumeclaims - verbs: [ "update" ] - - apiGroups: [ "" ] - resources: - - pods/ephemeralcontainers - verbs: [ "patch" ] - - apiGroups: [ "" ] - resources: - - serviceaccounts - - configmaps - verbs: [ "watch" ] - - apiGroups: [ "apps" ] - resources: - - replicasets - - daemonsets - verbs: [ "list" ] - - apiGroups: [ "storage.k8s.io" ] - resources: - - storageclasses - verbs: [ "create" ] - - apiGroups: [ "storage.k8s.io" ] - resources: - - storageclasses - - csinodes - verbs: [ "get" ] - - apiGroups: [ "storage.k8s.io" ] - resources: - - storageclasses - verbs: [ "delete" ] - - apiGroups: [ "snapshot.storage.k8s.io" ] - resources: - - volumesnapshots - - volumesnapshotclasses - - volumesnapshotcontents - verbs: [ "create" ] - - apiGroups: [ "snapshot.storage.k8s.io" ] - resources: - - volumesnapshots - - volumesnapshotclasses - - volumesnapshotcontents - verbs: [ "get" ] - - apiGroups: [ "snapshot.storage.k8s.io" ] - resources: - - volumesnapshotcontents - verbs: [ "update" ] - - apiGroups: [ "snapshot.storage.k8s.io" ] - resources: - - volumesnapshots - - volumesnapshotclasses - - volumesnapshotcontents - verbs: [ "delete" ] - - apiGroups: [ "authorization.k8s.io" ] - resources: - - clusterroles - verbs: [ "list" ] - - apiGroups: [ "authorization.k8s.io" ] - resources: - - subjectaccessreviews - verbs: [ "create" ] - - apiGroups: [ "rbac.authorization.k8s.io" ] - resources: - - clusterroles - verbs: [ "list" ] - - apiGroups: [ "rbac.authorization.k8s.io" ] - resources: - - clusterrolebindings - verbs: [ "create" ] - - apiGroups: [ "apiextensions.k8s.io" ] - resources: - - customresourcedefinitions - verbs: [ "get" ] ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: ebs-csi-driver-test - annotations: - "helm.sh/hook": test - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed -subjects: - - kind: ServiceAccount - name: ebs-csi-driver-test - namespace: kube-system -roleRef: - kind: ClusterRole - name: ebs-csi-driver-test - apiGroup: rbac.authorization.k8s.io ---- -apiVersion: v1 -kind: ConfigMap -data: - manifests.yaml: | - ShortName: ebs - StorageClass: - FromFile: storageclass.yaml - SnapshotClass: - FromName: true - DriverInfo: - Name: ebs.csi.aws.com - SupportedSizeRange: - Min: 1Gi - Max: 16Ti - SupportedFsType: - xfs: {} - ext4: {} - SupportedMountOption: - dirsync: {} - TopologyKeys: ["topology.ebs.csi.aws.com/zone"] - Capabilities: - persistence: true - fsGroup: true - block: true - exec: true - snapshotDataSource: true - pvcDataSource: false - multipods: true - controllerExpansion: true - nodeExpansion: true - volumeLimits: true - topology: true - storageclass.yaml: | - kind: StorageClass - apiVersion: storage.k8s.io/v1 - metadata: - name: ebs.csi.aws.com - provisioner: ebs.csi.aws.com - volumeBindingMode: WaitForFirstConsumer -metadata: - name: ebs-csi-driver-test - annotations: - "helm.sh/hook": test - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed ---- -apiVersion: v1 -kind: Pod -metadata: - name: ebs-csi-driver-test - annotations: - "helm.sh/hook": test - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed -spec: - containers: - - name: kubetest2 - image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20220624-1a63fdd9f2-master - command: [ "/bin/sh", "-c" ] - args: - - | - cp /etc/config/storageclass.yaml /workspace/storageclass.yaml - go install sigs.k8s.io/kubetest2/...@latest - kubectl config set-cluster cluster --server=https://kubernetes.default --certificate-authority=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt - kubectl config set-context kubetest2 --cluster=cluster - kubectl config set-credentials sa --token=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token) - kubectl config set-context kubetest2 --user=sa && kubectl config use-context kubetest2 - kubectl get crd volumesnapshots.snapshot.storage.k8s.io - if [ $? -eq 0 ]; then - SNAPSHOTS="|snapshot fields" - fi - export FOCUS_REGEX="\bebs.csi.aws.com\b.+(validate content|resize volume|offline PVC|AllowedTopologies|store data$SNAPSHOTS)" - kubetest2 noop --run-id='e2e-kubernetes' --test=ginkgo -- --test-package-version=$(curl https://storage.googleapis.com/kubernetes-release/release/stable-1.25.txt) --skip-regex='\[Disruptive\]|\[Serial\]' --focus-regex="$FOCUS_REGEX" --parallel=25 --test-args='-storage.testdriver=/etc/config/manifests.yaml' - volumeMounts: - - name: config-vol - mountPath: /etc/config - serviceAccountName: ebs-csi-driver-test - volumes: - - name: config-vol - configMap: - name: ebs-csi-driver-test - restartPolicy: Never diff --git a/charts/kubezero-storage/jsonnet/jsonnetfile.lock.json b/charts/kubezero-storage/jsonnet/jsonnetfile.lock.json index 21252bbd..04fa1a32 100644 --- a/charts/kubezero-storage/jsonnet/jsonnetfile.lock.json +++ b/charts/kubezero-storage/jsonnet/jsonnetfile.lock.json @@ -18,7 +18,7 @@ "subdir": "contrib/mixin" } }, - "version": "217d183e5a2b2b7e826825f8218b8c4f53590a8f", + "version": "f4f5ac93ca4c0949944753e0d8fda530ed26a404", "sum": "W/Azptf1PoqjyMwJON96UY69MFugDA4IAYiKURscryc=" }, { @@ -38,7 +38,7 @@ "subdir": "grafana-builder" } }, - "version": "f3644000f0bbca4511945fd61e6a55be16478d4e", + "version": "9ef5dc7124e7292c48bbf0e5a69be1e9548e522d", "sum": "tDR6yT2GVfw0wTU12iZH+m01HrbIr6g/xN+/8nzNkU0=" }, { diff --git a/charts/kubezero-storage/update.sh b/charts/kubezero-storage/update.sh index a7635c3b..d2ca8520 100755 --- a/charts/kubezero-storage/update.sh +++ b/charts/kubezero-storage/update.sh @@ -25,7 +25,7 @@ patch -i lvm.patch -p0 --no-backup-if-mismatch VERSION=$(yq eval '.dependencies[] | select(.name=="aws-ebs-csi-driver") | .version' Chart.yaml) rm -rf charts/aws-ebs-csi-driver curl -L -s -o - https://github.com/kubernetes-sigs/aws-ebs-csi-driver/releases/download/helm-chart-aws-ebs-csi-driver-${VERSION}/aws-ebs-csi-driver-${VERSION}.tgz | tar xfz - -C charts -rm -rf charts/aws-ebs-csi-driver/templates/test +rm -rf charts/aws-ebs-csi-driver/templates/tests ### EFS VERSION=$(yq eval '.dependencies[] | select(.name=="aws-efs-csi-driver") | .version' Chart.yaml)