diff --git a/charts/internal/seed-controlplane/charts/csi-driver-efs-controller/Chart.yaml b/charts/internal/seed-controlplane/charts/csi-driver-efs-controller/Chart.yaml new file mode 100644 index 000000000..2f0a2104f --- /dev/null +++ b/charts/internal/seed-controlplane/charts/csi-driver-efs-controller/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: Helm chart for csi-driver-efs-node (elastic file system) +name: csi-driver-efs-controller +version: 0.1.0 \ No newline at end of file diff --git a/charts/internal/seed-controlplane/charts/csi-driver-efs-controller/templates/controller-deployment.yaml b/charts/internal/seed-controlplane/charts/csi-driver-efs-controller/templates/controller-deployment.yaml new file mode 100644 index 000000000..42d03d0a3 --- /dev/null +++ b/charts/internal/seed-controlplane/charts/csi-driver-efs-controller/templates/controller-deployment.yaml @@ -0,0 +1,164 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: efs-csi-controller + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: efs-csi-controller + app: csi-efs + role: driver-efs-controller + high-availability-config.resources.gardener.cloud/type: controller +spec: + replicas: {{ .Values.replicas }} + selector: + matchLabels: + app.kubernetes.io/name: efs-csi-controller + app: csi-efs + role: driver-efs-controller + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: efs-csi-controller + app: csi-efs + role: driver-efs-controller + gardener.cloud/role: driver-efs-controller + networking.gardener.cloud/to-dns: allowed + networking.gardener.cloud/to-public-networks: allowed + networking.gardener.cloud/to-private-networks: allowed + networking.resources.gardener.cloud/to-kube-apiserver-tcp-443: allowed +{{- if .Values.podAnnotations }} + annotations: +{{ toYaml .Values.podAnnotations | indent 8 }} +{{- end }} + spec: + automountServiceAccountToken: false + priorityClassName: gardener-system-300 + {{- if hasKey .Values.controller "hostNetwork" }} + hostNetwork: {{ .Values.controller.hostNetwork }} + {{- end }} +{{/* serviceAccountName: {{ .Values.controller.serviceAccount.name }}*/}} + {{- with .Values.controller.tolerations }} + tolerations: {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.controller.securityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if .Values.controller.dnsPolicy }} + dnsPolicy: {{ .Values.controller.dnsPolicy }} + {{- end }} + {{- with .Values.controller.dnsConfig }} + dnsConfig: {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: aws-csi-driver-efs + image: {{ index .Values.images "csi-driver-efs" }} + args: + - controller + - --endpoint=$(CSI_ENDPOINT) + - --logtostderr + {{- if .Values.controller.tags }} + - --tags={{ include "aws-efs-csi-driver.tags" .Values.controller.tags }} + {{- end }} + - --v={{ .Values.controller.logLevel }} + - --delete-access-point-root-dir={{ hasKey .Values.controller "deleteAccessPointRootDir" | ternary .Values.controller.deleteAccessPointRootDir false }} + env: + - name: CSI_ENDPOINT + value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock + - name: AWS_REGION + value: {{ .Values.region }} + - name: AWS_SHARED_CREDENTIALS_FILE + value: /srv/cloudprovider/credentialsFile + - name: CSI_NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + volumeMounts: + - name: socket-dir + mountPath: /var/lib/csi/sockets/pluginproxy/ + - name: cloudprovider + mountPath: /srv/cloudprovider + ports: + - name: healthz + containerPort: {{ .Values.controller.healthPort }} + protocol: TCP + livenessProbe: + httpGet: + path: /healthz + port: healthz + initialDelaySeconds: 10 + timeoutSeconds: 3 + periodSeconds: 10 + failureThreshold: 5 + {{- with .Values.resources.driverController }} + resources: {{ toYaml . | nindent 12 }} + {{- end }} + + - name: aws-csi-provisioner + image: {{ index .Values.images "csi-provisioner" }} + args: + - --csi-address=$(ADDRESS) + - --v={{ .Values.controller.logLevel }} + - --feature-gates=Topology=true + - --kubeconfig=/var/run/secrets/gardener.cloud/shoot/generic-kubeconfig/kubeconfig + {{- if .Values.controller.extraCreateMetadata }} + - --extra-create-metadata + {{- end }} + - --leader-election + {{- if hasKey .Values.controller "leaderElectionRenewDeadline" }} + - --leader-election-renew-deadline={{ .Values.controller.leaderElectionRenewDeadline }} + {{- end }} + {{- if hasKey .Values.controller "leaderElectionLeaseDuration" }} + - --leader-election-lease-duration={{ .Values.controller.leaderElectionLeaseDuration }} + {{- end }} + env: + - name: ADDRESS + value: /var/lib/csi/sockets/pluginproxy/csi.sock + volumeMounts: + - name: socket-dir + mountPath: /var/lib/csi/sockets/pluginproxy/ + - name: kubeconfig-csi-provisioner + mountPath: /var/run/secrets/gardener.cloud/shoot/generic-kubeconfig + readOnly: true + {{- with .Values.resources.provisioner }} + resources: {{ toYaml . | nindent 12 }} + {{- end }} + + - name: liveness-probe + image: {{ index .Values.images "csi-liveness-probe" }} + args: + - --csi-address=/csi/csi.sock + - --health-port={{ .Values.controller.healthPort }} + volumeMounts: + - name: socket-dir + mountPath: /csi + {{- with .Values.resources.livenessProbe }} + resources: {{ toYaml . | nindent 12 }} + {{- end }} + volumes: + - name: socket-dir + emptyDir: {} + - name: kubeconfig-csi-provisioner + projected: + defaultMode: 420 + sources: + - secret: + items: + - key: kubeconfig + path: kubeconfig + name: {{ .Values.global.genericTokenKubeconfigSecretName }} + optional: false + - secret: + items: + - key: token + path: token + name: shoot-access-csi-provisioner + optional: false + - name: cloudprovider + secret: + secretName: cloudprovider \ No newline at end of file diff --git a/charts/internal/seed-controlplane/charts/csi-driver-efs-controller/templates/helpers.tpl b/charts/internal/seed-controlplane/charts/csi-driver-efs-controller/templates/helpers.tpl new file mode 100644 index 000000000..eb354bc3e --- /dev/null +++ b/charts/internal/seed-controlplane/charts/csi-driver-efs-controller/templates/helpers.tpl @@ -0,0 +1,56 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "aws-efs-csi-driver.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "aws-efs-csi-driver.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "aws-efs-csi-driver.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "aws-efs-csi-driver.labels" -}} +app.kubernetes.io/name: {{ include "aws-efs-csi-driver.name" . }} +helm.sh/chart: {{ include "aws-efs-csi-driver.chart" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Create a string out of the map for controller tags flag +*/}} +{{- define "aws-efs-csi-driver.tags" -}} +{{- $tags := list -}} +{{ range $key, $val := . }} +{{- $tags = print $key ":" $val | append $tags -}} +{{- end -}} +{{- join " " $tags -}} +{{- end -}} \ No newline at end of file diff --git a/charts/internal/seed-controlplane/charts/csi-driver-efs-controller/values.yaml b/charts/internal/seed-controlplane/charts/csi-driver-efs-controller/values.yaml new file mode 100644 index 000000000..c43083b49 --- /dev/null +++ b/charts/internal/seed-controlplane/charts/csi-driver-efs-controller/values.yaml @@ -0,0 +1,84 @@ +fileSystemID: "" + +region: region + +nameOverride: "" +fullnameOverride: "" + +dnsPolicy: ClusterFirst + +useFIPS: false + +resources: + driverController: + requests: + cpu: 20m + memory: 50Mi + livenessProbe: + requests: + cpu: 11m + memory: 32Mi + provisioner: + requests: + cpu: 11m + memory: 38Mi + +sidecars: + livenessProbe: + securityContext: + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + +## controller values + +replicas: 1 + +images: + csi-driver-efs: image-repository:image-tag + csi-provisioner: image-repository:image-tag + csi-liveness-probe: image-repository:image-tag + +podAnnotations: {} + +## Controller deployment variables + +controller: + # Number for the log level verbosity + logLevel: 5 + # If set, add pv/pvc metadata to plugin create requests as parameters. + extraCreateMetadata: true + # Add additional tags to access points + tags: + {} + # environment: prod + # region: us-east-1 + # Enable if you want the controller to also delete the + # path on efs when deleteing an access point + deleteAccessPointRootDir: false + hostNetwork: false + priorityClassName: system-cluster-critical + dnsPolicy: ClusterFirst + dnsConfig: {} + additionalLabels: {} + tolerations: + - key: CriticalAddonsOnly + operator: Exists + - key: efs.csi.aws.com/agent-not-ready + operator: Exists + # securityContext on the controller pod + securityContext: + runAsNonRoot: false + runAsUser: 0 + runAsGroup: 0 + fsGroup: 0 + serviceAccount: + name: efs-csi-controller-sa + annotations: {} + ## Enable if EKS IAM for SA is used + # eks.amazonaws.com/role-arn: arn:aws:iam::111122223333:role/efs-csi-role + healthPort: 9909 + regionalStsEndpoints: false + containerSecurityContext: + privileged: true + leaderElectionRenewDeadline: 10s + leaderElectionLeaseDuration: 15s \ No newline at end of file diff --git a/charts/internal/shoot-system-components/charts/csi-driver-efs-node/Chart.yaml b/charts/internal/shoot-system-components/charts/csi-driver-efs-node/Chart.yaml new file mode 100644 index 000000000..0ebe31c93 --- /dev/null +++ b/charts/internal/shoot-system-components/charts/csi-driver-efs-node/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: Helm chart for csi-driver-efs-node (elastic file system) +name: csi-driver-efs-node +version: 0.1.0 \ No newline at end of file diff --git a/charts/internal/shoot-system-components/charts/csi-driver-efs-node/templates/csi-driver.yaml b/charts/internal/shoot-system-components/charts/csi-driver-efs-node/templates/csi-driver.yaml new file mode 100644 index 000000000..ed63c4c56 --- /dev/null +++ b/charts/internal/shoot-system-components/charts/csi-driver-efs-node/templates/csi-driver.yaml @@ -0,0 +1,6 @@ +apiVersion: storage.k8s.io/v1 +kind: CSIDriver +metadata: + name: efs.csi.aws.com +spec: + attachRequired: false \ No newline at end of file diff --git a/charts/internal/shoot-system-components/charts/csi-driver-efs-node/templates/helpers.tpl b/charts/internal/shoot-system-components/charts/csi-driver-efs-node/templates/helpers.tpl new file mode 100644 index 000000000..eb354bc3e --- /dev/null +++ b/charts/internal/shoot-system-components/charts/csi-driver-efs-node/templates/helpers.tpl @@ -0,0 +1,56 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "aws-efs-csi-driver.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "aws-efs-csi-driver.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "aws-efs-csi-driver.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "aws-efs-csi-driver.labels" -}} +app.kubernetes.io/name: {{ include "aws-efs-csi-driver.name" . }} +helm.sh/chart: {{ include "aws-efs-csi-driver.chart" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Create a string out of the map for controller tags flag +*/}} +{{- define "aws-efs-csi-driver.tags" -}} +{{- $tags := list -}} +{{ range $key, $val := . }} +{{- $tags = print $key ":" $val | append $tags -}} +{{- end -}} +{{- join " " $tags -}} +{{- end -}} \ No newline at end of file diff --git a/charts/internal/shoot-system-components/charts/csi-driver-efs-node/templates/node-daemonset.yaml b/charts/internal/shoot-system-components/charts/csi-driver-efs-node/templates/node-daemonset.yaml new file mode 100644 index 000000000..1fc4ca053 --- /dev/null +++ b/charts/internal/shoot-system-components/charts/csi-driver-efs-node/templates/node-daemonset.yaml @@ -0,0 +1,169 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: csi-driver-efs-node + namespace: {{ .Release.Namespace }} + labels: + app: csi + role: driver-efs-node + node.gardener.cloud/critical-component: "true" +spec: + selector: + matchLabels: + app: csi + role: driver-efs-node + node.gardener.cloud/critical-component: "true" + template: + metadata: + labels: + app: csi + role: driver-efs-node + node.gardener.cloud/critical-component: "true" + spec: + priorityClassName: system-node-critical + hostNetwork: true + dnsPolicy: {{ .Values.dnsPolicy }} + serviceAccountName: {{ .Values.node.serviceAccount.name }} + {{- with .Values.node.affinity }} + affinity: {{- toYaml . | nindent 8 }} + {{- end }} + tolerations: + - effect: NoSchedule + operator: Exists + - key: CriticalAddonsOnly + operator: Exists + - effect: NoExecute + operator: Exists + securityContext: + seccompProfile: + type: RuntimeDefault + containers: + - name: driver-efs-node + securityContext: + privileged: true + capabilities: + add: [ "SYS_ADMIN" ] + allowPrivilegeEscalation: true + image: {{ index .Values.images "csi-driver-efs" }} + args: + - --endpoint=$(CSI_ENDPOINT) + - --logtostderr + - --v={{ .Values.node.logLevel }} + - --vol-metrics-opt-in={{ hasKey .Values.node "volMetricsOptIn" | ternary .Values.node.volMetricsOptIn false }} + - --vol-metrics-refresh-period={{ hasKey .Values.node "volMetricsRefreshPeriod" | ternary .Values.node.volMetricsRefreshPeriod 240 }} + - --vol-metrics-fs-rate-limit={{ hasKey .Values.node "volMetricsFsRateLimit" | ternary .Values.node.volMetricsFsRateLimit 5 }} + env: + - name: CSI_ENDPOINT + value: unix:/csi/csi.sock + - name: CSI_NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + {{- if .Values.useFIPS }} + - name: AWS_USE_FIPS_ENDPOINT + value: "true" + {{- end }} + {{- with .Values.node.env }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + - name: kubelet-dir + mountPath: {{ .Values.node.kubeletPath }} + mountPropagation: "Bidirectional" + - name: plugin-dir + mountPath: /csi + - name: efs-state-dir + mountPath: /var/run/efs + - name: efs-utils-config + mountPath: /var/amazon/efs + - name: efs-utils-config-legacy + mountPath: /etc/amazon/efs-legacy + {{- with .Values.node.volumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} + ports: + - name: healthz + containerPort: {{ .Values.node.healthPort }} + protocol: TCP + livenessProbe: + httpGet: + path: /healthz + port: healthz + initialDelaySeconds: 10 + timeoutSeconds: 3 + periodSeconds: 2 + failureThreshold: 5 + {{- with .Values.resources.driverNode }} + resources: {{ toYaml . | nindent 12 }} + {{- end }} + - name: csi-driver-registrar + image: {{ index .Values.images "csi-node-driver-registrar" }} + args: + - --csi-address=$(ADDRESS) + - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) + - --v={{ .Values.node.logLevel }} + env: + - name: ADDRESS + value: /csi/csi.sock + - name: DRIVER_REG_SOCK_PATH + value: {{ printf "%s/plugins/efs.csi.aws.com/csi.sock" (trimSuffix "/" .Values.node.kubeletPath) }} + - name: KUBE_NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + volumeMounts: + - name: plugin-dir + mountPath: /csi + - name: registration-dir + mountPath: /registration + {{- with .Values.resources.nodeDriverRegistrar }} + resources: {{ toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.sidecars.nodeDriverRegistrar.securityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} + - name: liveness-probe + image: {{ index .Values.images "csi-liveness-probe" }} + args: + - --csi-address=/csi/csi.sock + - --health-port={{ .Values.node.healthPort }} + - --v={{ .Values.node.logLevel }} + volumeMounts: + - name: plugin-dir + mountPath: /csi + {{- with .Values.resources.livenessProbe }} + resources: {{ toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.sidecars.livenessProbe.securityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} + volumes: + - name: kubelet-dir + hostPath: + path: {{ .Values.node.kubeletPath }} + type: Directory + - name: plugin-dir + hostPath: + path: {{ printf "%s/plugins/efs.csi.aws.com/" (trimSuffix "/" .Values.node.kubeletPath) }} + type: DirectoryOrCreate + - name: registration-dir + hostPath: + path: {{ printf "%s/plugins_registry/" (trimSuffix "/" .Values.node.kubeletPath) }} + type: Directory + - name: efs-state-dir + hostPath: + path: /var/run/efs + type: DirectoryOrCreate + - name: efs-utils-config + hostPath: + path: /var/amazon/efs + type: DirectoryOrCreate + - name: efs-utils-config-legacy + hostPath: + path: /etc/amazon/efs + type: DirectoryOrCreate + {{- with .Values.node.volumes }} + {{- toYaml . | nindent 8 }} + {{- end }} \ No newline at end of file diff --git a/charts/internal/shoot-system-components/charts/csi-driver-efs-node/templates/node-serviceaccount.yaml b/charts/internal/shoot-system-components/charts/csi-driver-efs-node/templates/node-serviceaccount.yaml new file mode 100644 index 000000000..534d952b7 --- /dev/null +++ b/charts/internal/shoot-system-components/charts/csi-driver-efs-node/templates/node-serviceaccount.yaml @@ -0,0 +1,37 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.node.serviceAccount.name }} + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: {{ include "aws-efs-csi-driver.name" . }} + {{- with .Values.node.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: efs-csi-node-role + labels: + app.kubernetes.io/name: {{ include "aws-efs-csi-driver.name" . }} +rules: + - apiGroups: [""] + resources: ["nodes"] + verbs: ["get", "list", "watch", "patch"] +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: efs-csi-node-binding + labels: + app.kubernetes.io/name: {{ include "aws-efs-csi-driver.name" . }} +subjects: + - kind: ServiceAccount + name: {{ .Values.node.serviceAccount.name }} + namespace: {{ .Release.Namespace }} +roleRef: + kind: ClusterRole + name: efs-csi-node-role + apiGroup: rbac.authorization.k8s.io diff --git a/charts/internal/shoot-system-components/charts/csi-driver-efs-node/templates/storageclass.yaml b/charts/internal/shoot-system-components/charts/csi-driver-efs-node/templates/storageclass.yaml new file mode 100644 index 000000000..adb598127 --- /dev/null +++ b/charts/internal/shoot-system-components/charts/csi-driver-efs-node/templates/storageclass.yaml @@ -0,0 +1,9 @@ +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: efs-sc +provisioner: efs.csi.aws.com +parameters: + provisioningMode: efs-ap # only one currently available + fileSystemId: {{ .Values.fileSystemID }} + directoryPerms: "700" \ No newline at end of file diff --git a/charts/internal/shoot-system-components/charts/csi-driver-efs-node/values.yaml b/charts/internal/shoot-system-components/charts/csi-driver-efs-node/values.yaml new file mode 100644 index 000000000..424aa965a --- /dev/null +++ b/charts/internal/shoot-system-components/charts/csi-driver-efs-node/values.yaml @@ -0,0 +1,104 @@ +fileSystemID: "" + +nameOverride: "" +fullnameOverride: "" + +dnsPolicy: ClusterFirst + +useFIPS: false + +images: + csi-driver-efs: image-repository:image-tag + csi-liveness-probe: image-repository:image-tag + +resources: + driverNode: + requests: + cpu: 15m + memory: 42Mi + nodeDriverRegistrar: + requests: + cpu: 11m + memory: 32Mi + livenessProbe: + requests: + cpu: 11m + memory: 32Mi + +sidecars: + livenessProbe: + securityContext: + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + nodeDriverRegistrar: + securityContext: + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + +## Node daemonset variables + +node: + # Number for the log level verbosity + logLevel: 5 + volMetricsOptIn: false + volMetricsRefreshPeriod: 240 + volMetricsFsRateLimit: 5 + hostAliases: + {} + # For cross VPC EFS, you need to poison or overwrite the DNS for the efs volume as per + # https://docs.aws.amazon.com/efs/latest/ug/efs-different-vpc.html#wt6-efs-utils-step3 + # implementing the suggested solution found here: + # https://github.com/kubernetes-sigs/aws-efs-csi-driver/issues/240#issuecomment-676849346 + # EFS Vol ID, IP, Region + # "fs-01234567": + # ip: 10.10.2.2 + # region: us-east-2 + dnsConfig: + {} + # Example config which uses the AWS nameservers + # dnsPolicy: "None" + # dnsConfig: + # nameservers: + # - 169.254.169.253 + podLabels: {} + podAnnotations: {} + additionalLabels: {} + nodeSelector: {} + # Override default strategy (RollingUpdate) to speed up deployment. + # This can be useful if helm timeouts are observed. + # type: OnDelete + tolerations: + - operator: Exists + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: eks.amazonaws.com/compute-type + operator: NotIn + values: + - fargate + serviceAccount: + name: efs-csi-node-sa + annotations: {} + ## Enable if EKS IAM for SA is used + # eks.amazonaws.com/role-arn: arn:aws:iam::111122223333:role/efs-csi-role + healthPort: 9809 + # securityContext on the node pod + securityContext: + # The node pod must be run as root to bind to the registration/driver sockets + runAsNonRoot: false + runAsUser: 0 + runAsGroup: 0 + fsGroup: 0 + env: [] + volumes: [] + volumeMounts: [] + kubeletPath: /var/lib/kubelet + +storageClasses: [] + +controller: + serviceAccount: + name: efs-csi-controller-sa + annotations: {} \ No newline at end of file diff --git a/charts/internal/shoot-system-components/charts/csi-driver-node/templates/clusterrole-csi-provisioner.yaml b/charts/internal/shoot-system-components/charts/csi-driver-node/templates/clusterrole-csi-provisioner.yaml index 75346a9a2..fb8711a17 100644 --- a/charts/internal/shoot-system-components/charts/csi-driver-node/templates/clusterrole-csi-provisioner.yaml +++ b/charts/internal/shoot-system-components/charts/csi-driver-node/templates/clusterrole-csi-provisioner.yaml @@ -4,30 +4,24 @@ kind: ClusterRole metadata: name: {{ include "csi-driver-node.extensionsGroup" . }}:{{ include "csi-driver-node.name" . }}:csi-provisioner rules: -- apiGroups: [""] - resources: ["persistentvolumes"] - verbs: ["get", "list", "watch", "create", "delete"] -- apiGroups: [""] - resources: ["persistentvolumeclaims"] - verbs: ["get", "list", "watch", "update", "patch"] -- apiGroups: ["storage.k8s.io"] - resources: ["storageclasses"] - verbs: ["get", "list", "watch"] -- apiGroups: [""] - resources: ["events"] - verbs: ["list", "watch", "create", "update", "patch"] -- apiGroups: ["snapshot.storage.k8s.io"] - resources: ["volumesnapshots"] - verbs: ["get", "list"] -- apiGroups: ["snapshot.storage.k8s.io"] - resources: ["volumesnapshotcontents"] - verbs: ["get", "list"] -- apiGroups: ["storage.k8s.io"] - resources: ["csinodes"] - verbs: ["get", "list", "watch"] -- apiGroups: [""] - resources: ["nodes"] - verbs: ["get", "list", "watch"] -- apiGroups: ["storage.k8s.io"] - resources: ["volumeattachments"] - verbs: ["get", "list", "watch"] + - apiGroups: [""] + resources: ["persistentvolumes"] + verbs: ["get", "list", "watch", "create", "patch", "delete"] + - apiGroups: [""] + resources: ["persistentvolumeclaims"] + verbs: ["get", "list", "watch", "update"] + - apiGroups: ["storage.k8s.io"] + resources: ["storageclasses"] + verbs: ["get", "list", "watch"] + - apiGroups: [""] + resources: ["events"] + verbs: ["list", "watch", "create", "patch"] + - apiGroups: ["storage.k8s.io"] + resources: ["csinodes"] + verbs: ["get", "list", "watch"] + - apiGroups: [""] + resources: ["nodes"] + verbs: ["get", "list", "watch"] + - apiGroups: ["coordination.k8s.io"] + resources: ["leases"] + verbs: ["get", "watch", "list", "delete", "update", "create"] diff --git a/charts/internal/shoot-system-components/requirements.yaml b/charts/internal/shoot-system-components/requirements.yaml index daa1289e4..9a425c3f3 100644 --- a/charts/internal/shoot-system-components/requirements.yaml +++ b/charts/internal/shoot-system-components/requirements.yaml @@ -14,4 +14,8 @@ dependencies: - name: aws-load-balancer-controller repository: http://localhost:10191 version: 0.1.0 - condition: aws-load-balancer-controller.enabled \ No newline at end of file + condition: aws-load-balancer-controller.enabled +- name: csi-driver-efs-node + repository: http://localhost:10191 + version: 0.1.0 + condition: csi-driver-efs-node.enabled \ No newline at end of file diff --git a/charts/internal/shoot-system-components/values.yaml b/charts/internal/shoot-system-components/values.yaml index 875953b0a..7838a83a5 100644 --- a/charts/internal/shoot-system-components/values.yaml +++ b/charts/internal/shoot-system-components/values.yaml @@ -5,4 +5,6 @@ csi-driver-node: aws-custom-route-controller: enabled: false aws-load-balancer-controller: + enabled: false +csi-driver-efs-node: enabled: false \ No newline at end of file diff --git a/docs/usage/usage.md b/docs/usage/usage.md index baf4ca966..f09a7097b 100644 --- a/docs/usage/usage.md +++ b/docs/usage/usage.md @@ -484,6 +484,7 @@ spec: internal: 10.250.112.0/22 public: 10.250.96.0/22 workers: 10.250.0.0/19 + enableCsiEfs: true controlPlaneConfig: apiVersion: aws.provider.extensions.gardener.cloud/v1alpha1 kind: ControlPlaneConfig @@ -593,6 +594,8 @@ Every AWS shoot cluster will be deployed with the AWS EBS CSI driver. It is compatible with the legacy in-tree volume provisioner that was deprecated by the Kubernetes community and will be removed in future versions of Kubernetes. End-users might want to update their custom `StorageClass`es to the new `ebs.csi.aws.com` provisioner. +To deploy the efs-csi-driver add the annotation `enableCsiEfs: true` to your infrastructureConfig like in this [example](#example-shoot-manifest-one-availability-zone). + ### Node-specific Volume Limits The Kubernetes scheduler allows configurable limit for the number of volumes that can be attached to a node. See https://k8s.io/docs/concepts/storage/storage-limits/#custom-limits. diff --git a/hack/api-reference/api.md b/hack/api-reference/api.md index 364c007b0..ef8cc0c35 100644 --- a/hack/api-reference/api.md +++ b/hack/api-reference/api.md @@ -230,6 +230,19 @@ See WorkerConfig @@ -395,6 +408,36 @@ reconciliation is possible.
++(Appears on: +InfrastructureStatus) +
++
CSI contains information about the created AWS CSI related resources.
+ +Field | +Description | +
---|---|
+efsFileSystemID
+
+string
+
+ |
+
+ EfsSystemID contains the efsFileSystem. + |
+
@@ -816,6 +859,19 @@ VPCStatus
VPC contains information about the created AWS VPC and some related resources.
+csi
+
+
+CSI
+
+
+CSI contains information about the created AWS CSI related resources.
+