From e123b18f89c4bb3eeb53f2aafe1008fc7c727501 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Thu, 15 Jul 2021 01:26:25 +0200 Subject: [PATCH] fix: update aws-efs driver --- charts/kubezero-aws-efs-csi-driver/Chart.yaml | 6 +-- .../charts/aws-efs-csi-driver/CHANGELOG.md | 8 +++- .../charts/aws-efs-csi-driver/Chart.yaml | 4 +- .../templates/controller-deployment.yaml | 10 ++-- .../charts/aws-efs-csi-driver/values.yaml | 4 +- charts/kubezero-aws-efs-csi-driver/update.sh | 4 +- charts/kubezero-aws-efs-csi-driver/zdt.patch | 47 +++++++++++++++++-- charts/kubezero-logging/update.sh | 2 +- charts/kubezero/bootstrap.sh | 4 +- .../templates/aws-efs-csi-driver.yaml | 4 +- 10 files changed, 70 insertions(+), 23 deletions(-) diff --git a/charts/kubezero-aws-efs-csi-driver/Chart.yaml b/charts/kubezero-aws-efs-csi-driver/Chart.yaml index 2e00e926..2313a5c0 100644 --- a/charts/kubezero-aws-efs-csi-driver/Chart.yaml +++ b/charts/kubezero-aws-efs-csi-driver/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: kubezero-aws-efs-csi-driver description: KubeZero Umbrella Chart for aws-efs-csi-driver -version: 0.4.0 -appVersion: 1.3.1 +version: 0.4.1 +appVersion: 1.3.2 kubeVersion: ">=1.18.0-0" home: https://kubezero.com icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png @@ -21,5 +21,5 @@ dependencies: version: ">= 0.1.3" repository: https://zero-down-time.github.io/kubezero/ - name: aws-efs-csi-driver - version: 2.1.1 + version: 2.1.3 # repository: https://kubernetes-sigs.github.io/aws-efs-csi-driver/ diff --git a/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/CHANGELOG.md b/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/CHANGELOG.md index a842698d..0e499d85 100644 --- a/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/CHANGELOG.md +++ b/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/CHANGELOG.md @@ -1,7 +1,13 @@ # Helm chart +# v2.1.3 +* Bump app/driver version to `v1.3.2` + +# v2.1.2 +* Add extra-create-metadata + # v2.1.1 -* Update app/driver version to `v1.3.0` +* Update app/driver version to `v1.3.1` # v2.1.0 diff --git a/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/Chart.yaml b/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/Chart.yaml index 29c91a78..9c0b3b2f 100644 --- a/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/Chart.yaml +++ b/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 1.3.1 +appVersion: 1.3.2 description: A Helm chart for AWS EFS CSI Driver home: https://github.com/kubernetes-sigs/aws-efs-csi-driver keywords: @@ -15,4 +15,4 @@ maintainers: name: aws-efs-csi-driver sources: - https://github.com/kubernetes-sigs/aws-efs-csi-driver -version: 2.1.1 +version: 2.1.3 diff --git a/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/templates/controller-deployment.yaml b/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/templates/controller-deployment.yaml index 67f3adaa..c1beb69b 100644 --- a/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/templates/controller-deployment.yaml +++ b/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/templates/controller-deployment.yaml @@ -23,7 +23,6 @@ spec: annotations: {{- toYaml . | nindent 8 }} {{- end }} spec: - hostNetwork: true {{- if .Values.imagePullSecrets }} imagePullSecrets: {{- range .Values.imagePullSecrets }} @@ -57,6 +56,9 @@ spec: env: - name: CSI_ENDPOINT value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock + {{- if .Values.controller.extraEnv }} +{{ toYaml .Values.controller.extraEnv | indent 12 }} + {{- end }} volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ @@ -84,13 +86,13 @@ spec: - --csi-address=$(ADDRESS) - --v={{ .Values.controller.logLevel }} - --feature-gates=Topology=true + {{- if .Values.controller.extraCreateMetadata }} + - --extra-create-metadata + {{- end }} - --leader-election env: - name: ADDRESS value: /var/lib/csi/sockets/pluginproxy/csi.sock - {{- if .Values.controller.extraEnv }} -{{ toYaml .Values.extraEnv | indent 12 }} - {{- end }} volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ diff --git a/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/values.yaml b/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/values.yaml index e85d3fb2..6afb5d64 100644 --- a/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/values.yaml +++ b/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/values.yaml @@ -9,7 +9,7 @@ replicaCount: 2 image: repository: amazon/aws-efs-csi-driver - tag: "v1.3.1" + tag: "v1.3.2" pullPolicy: IfNotPresent sidecars: @@ -41,6 +41,8 @@ controller: create: true # Number for the log level verbosity logLevel: 2 + # If set, add pv/pvc metadata to plugin create requests as parameters. + extraCreateMetadata: true # Add additional tags to access points tags: {} # environment: prod diff --git a/charts/kubezero-aws-efs-csi-driver/update.sh b/charts/kubezero-aws-efs-csi-driver/update.sh index a0cc453b..ea3e8fb3 100755 --- a/charts/kubezero-aws-efs-csi-driver/update.sh +++ b/charts/kubezero-aws-efs-csi-driver/update.sh @@ -1,8 +1,8 @@ #!/bin/bash -VERSION=2.1.1 +VERSION=2.1.3 rm -rf charts/aws-efs-csi-driver curl -L -s -o - https://github.com/kubernetes-sigs/aws-efs-csi-driver/releases/download/helm-chart-aws-efs-csi-driver-${VERSION}/aws-efs-csi-driver-${VERSION}.tgz | tar xfz - -C charts -# patch -i zdt.patch -p0 --no-backup-if-mismatch +patch -i zdt.patch -p0 --no-backup-if-mismatch diff --git a/charts/kubezero-aws-efs-csi-driver/zdt.patch b/charts/kubezero-aws-efs-csi-driver/zdt.patch index 36637ef2..d5978c83 100644 --- a/charts/kubezero-aws-efs-csi-driver/zdt.patch +++ b/charts/kubezero-aws-efs-csi-driver/zdt.patch @@ -1,7 +1,46 @@ -Only in charts/aws-efs-csi-driver.zdt/: .values.yaml.swp -diff -rtub charts/aws-efs-csi-driver/templates/node-daemonset.yaml charts/aws-efs-csi-driver.zdt/templates/node-daemonset.yaml ---- charts/aws-efs-csi-driver/templates/node-daemonset.yaml 2021-06-14 23:12:20.000000000 +0200 -+++ charts/aws-efs-csi-driver.zdt/templates/node-daemonset.yaml 2021-06-25 12:29:05.279549688 +0200 +diff -tubNr charts/aws-efs-csi-driver/templates/controller-deployment.yaml charts/aws-efs-csi-driver.zdt/templates/controller-deployment.yaml +--- charts/aws-efs-csi-driver/templates/controller-deployment.yaml 2021-06-25 22:43:06.000000000 +0200 ++++ charts/aws-efs-csi-driver.zdt/templates/controller-deployment.yaml 2021-07-15 00:37:28.960305011 +0200 +@@ -23,7 +23,6 @@ + annotations: {{- toYaml . | nindent 8 }} + {{- end }} + spec: +- hostNetwork: true + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{- range .Values.imagePullSecrets }} +@@ -57,9 +56,14 @@ + env: + - name: CSI_ENDPOINT + value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock ++ {{- if .Values.controller.extraEnv }} ++{{ toYaml .Values.controller.extraEnv | indent 12 }} ++ {{- end }} + volumeMounts: + - name: socket-dir + mountPath: /var/lib/csi/sockets/pluginproxy/ ++ - name: aws-token ++ mountPath: "/var/run/secrets/sts.amazonaws.com/serviceaccount/" + ports: + - name: healthz + containerPort: 9909 +@@ -110,6 +114,13 @@ + volumes: + - name: socket-dir + emptyDir: {} ++ - name: aws-token ++ projected: ++ sources: ++ - serviceAccountToken: ++ path: token ++ expirationSeconds: 86400 ++ audience: "sts.amazonaws.com" + {{- with .Values.controller.affinity }} + affinity: {{- toYaml . | nindent 8 }} + {{- end }} +diff -tubNr charts/aws-efs-csi-driver/templates/node-daemonset.yaml charts/aws-efs-csi-driver.zdt/templates/node-daemonset.yaml +--- charts/aws-efs-csi-driver/templates/node-daemonset.yaml 2021-06-25 22:43:06.000000000 +0200 ++++ charts/aws-efs-csi-driver.zdt/templates/node-daemonset.yaml 2021-07-15 00:14:58.680295564 +0200 @@ -40,15 +40,10 @@ {{- with .Values.node.nodeSelector }} {{- toYaml . | nindent 8 }} diff --git a/charts/kubezero-logging/update.sh b/charts/kubezero-logging/update.sh index 19473dc0..c81f4e51 100755 --- a/charts/kubezero-logging/update.sh +++ b/charts/kubezero-logging/update.sh @@ -4,7 +4,7 @@ ECK_VERSION=1.6.0 FLUENT_BIT_VERSION=0.15.15 FLUENTD_VERSION=0.2.6 -# fix ECK crds handling to adhere to proper helm v3 support which also fixes ArgoCD applyong updates on upgrades +# fix ECK crds handling to adhere to proper helm v3 support which also fixes ArgoCD applying updates on upgrades helm repo list | grep elastic -qc || { helm repo add elastic https://helm.elastic.co; helm repo update; } rm -rf charts/eck-operator && helm pull elastic/eck-operator --untar --untardir charts --version $ECK_VERSION diff --git a/charts/kubezero/bootstrap.sh b/charts/kubezero/bootstrap.sh index 869f28fd..5e2da6ac 100755 --- a/charts/kubezero/bootstrap.sh +++ b/charts/kubezero/bootstrap.sh @@ -72,8 +72,8 @@ function delete_ns() { # Extract crds via helm calls and apply delta=crds only function _crds() { - helm template $(chart_location $chart) --namespace $namespace --name-template $release --skip-crds --set ${release}.installCRDs=false > $TMPDIR/helm-no-crds.yaml - helm template $(chart_location $chart) --namespace $namespace --name-template $release --include-crds --set ${release}.installCRDs=true > $TMPDIR/helm-crds.yaml + helm template $(chart_location $chart) --namespace $namespace --name-template $release --skip-crds --set ${release}.installCRDs=false -f $TMPDIR/values.yaml > $TMPDIR/helm-no-crds.yaml + helm template $(chart_location $chart) --namespace $namespace --name-template $release --include-crds --set ${release}.installCRDs=true -f $TMPDIR/values.yaml > $TMPDIR/helm-crds.yaml diff -e $TMPDIR/helm-no-crds.yaml $TMPDIR/helm-crds.yaml | head -n-1 | tail -n+2 > $TMPDIR/crds.yaml [ -s $TMPDIR/crds.yaml ] && kubectl apply -f $TMPDIR/crds.yaml } diff --git a/charts/kubezero/templates/aws-efs-csi-driver.yaml b/charts/kubezero/templates/aws-efs-csi-driver.yaml index 1f87e93f..1d5f8080 100644 --- a/charts/kubezero/templates/aws-efs-csi-driver.yaml +++ b/charts/kubezero/templates/aws-efs-csi-driver.yaml @@ -1,15 +1,13 @@ {{- define "aws-efs-csi-driver-values" }} -{{ with index .Values "aws-efs-csi-driver" "IamArn" }} aws-efs-csi-driver: controller: extraEnv: - name: AWS_ROLE_ARN - value: "{{ . }}" + value: {{ index .Values "aws-efs-csi-driver" "IamArn" | quote }} - name: AWS_WEB_IDENTITY_TOKEN_FILE value: "/var/run/secrets/sts.amazonaws.com/serviceaccount/token" - name: AWS_STS_REGIONAL_ENDPOINTS value: regional -{{- end }} {{- with index .Values "aws-efs-csi-driver" "PersistentVolumes" }} PersistentVolumes: {{- toYaml . | nindent 2 }}