Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chart] Add storage class annotation and label handling #734

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
closes #733; add storage class annotation and label handling to chart
  • Loading branch information
nicholasmhughes committed Feb 19, 2021
commit bebc32bfa5cef18805daef395c473e98f229e916
2 changes: 1 addition & 1 deletion charts/aws-ebs-csi-driver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "0.9.0"
name: aws-ebs-csi-driver
description: A Helm chart for AWS EBS CSI Driver
version: 0.9.4
version: 0.9.7
kubeVersion: ">=1.17.0-0"
home: https://github.com/kubernetes-sigs/aws-ebs-csi-driver
sources:
Expand Down
2 changes: 1 addition & 1 deletion charts/aws-ebs-csi-driver/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
{{ toYaml . | indent 8 }}
{{- end }}
serviceAccountName: {{ .Values.serviceAccount.controller.name }}
priorityClassName: system-cluster-critical
priorityClassName: {{ .Values.priorityClassName | default "system-cluster-critical" }}
{{- with .Values.affinity }}
affinity: {{ toYaml . | nindent 8 }}
{{- end }}
Expand Down
20 changes: 19 additions & 1 deletion charts/aws-ebs-csi-driver/templates/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
{{- end }}
hostNetwork: true
serviceAccountName: {{ .Values.serviceAccount.node.name }}
priorityClassName: system-node-critical
priorityClassName: {{ .Values.node.priorityClassName | default "system-cluster-critical" }}
tolerations:
{{- if .Values.node.tolerateAllTaints }}
- operator: Exists
Expand Down Expand Up @@ -80,9 +80,15 @@ spec:
timeoutSeconds: 3
periodSeconds: 10
failureThreshold: 5
{{- if .Values.node.resources }}
{{- with .Values.node.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
{{- else }}
{{- with .Values.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
{{- end }}
- name: node-driver-registrar
image: {{ printf "%s:%s" .Values.sidecars.nodeDriverRegistrarImage.repository .Values.sidecars.nodeDriverRegistrarImage.tag }}
args:
Expand All @@ -103,19 +109,31 @@ spec:
mountPath: /csi
- name: registration-dir
mountPath: /registration
{{- if .Values.node.resources }}
{{- with .Values.node.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
{{- else }}
{{- with .Values.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
{{- end }}
- name: liveness-probe
image: {{ printf "%s:%s" .Values.sidecars.livenessProbeImage.repository .Values.sidecars.livenessProbeImage.tag }}
args:
- --csi-address=/csi/csi.sock
volumeMounts:
- name: plugin-dir
mountPath: /csi
{{- if .Values.node.resources }}
{{- with .Values.node.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
{{- else }}
{{- with .Values.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
{{- end }}
volumes:
- name: kubelet-dir
hostPath:
Expand Down
4 changes: 2 additions & 2 deletions charts/aws-ebs-csi-driver/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
{{- with .Values.nodeSelector }}
{{ toYaml . | indent 8 }}
{{- end }}
priorityClassName: system-cluster-critical
priorityClassName: {{ .Values.priorityClassName | default "system-cluster-critical" }}
{{- with .Values.affinity }}
affinity: {{ toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -39,7 +39,7 @@ spec:
{{- end }}
containers:
- name: snapshot-controller
image: k8s.gcr.io/sig-storage/snapshot-controller:v3.0.3
image: {{ printf "%s:%s" .Values.snapshotController.repository .Values.snapshotController.tag }}
args:
- --v=5
- --leader-election=false
Expand Down
8 changes: 7 additions & 1 deletion charts/aws-ebs-csi-driver/templates/storageclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: {{ .name }}
{{- if .annotations }}
annotations: {{- .annotations | toYaml | trim | nindent 4 }}
{{- end }}
{{- if .labels }}
labels: {{- .labels | toYaml | trim | nindent 4 }}
{{- end }}
provisioner: ebs.csi.aws.com
{{ omit (dict "volumeBindingMode" "WaitForFirstConsumer" | merge .) "name" | toYaml }}
{{ omit (dict "volumeBindingMode" "WaitForFirstConsumer" | merge .) "name" "annotations" "labels" | toYaml }}
{{- end }}
15 changes: 13 additions & 2 deletions charts/aws-ebs-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ sidecars:
repository: k8s.gcr.io/sig-storage/csi-node-driver-registrar
tag: "v2.0.1"

snapshotController:
repository: k8s.gcr.io/sig-storage/snapshot-controller
tag: "v3.0.3"

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
Expand Down Expand Up @@ -60,11 +64,10 @@ resources:
# cpu: 100m
# memory: 128Mi

priorityClassName: ""
nodeSelector: {}

tolerateAllTaints: true
tolerations: []

affinity: {}

# Extra volume tags to attach to each dynamically provisioned volume.
Expand All @@ -87,10 +90,12 @@ k8sTagClusterId: ""
region: ""

node:
priorityClassName: ""
nodeSelector: {}
podAnnotations: {}
tolerateAllTaints: true
tolerations: []
resources: {}

serviceAccount:
controller:
Expand All @@ -109,6 +114,12 @@ serviceAccount:
storageClasses: []
# Add StorageClass resources like:
# - name: ebs-sc
# # annotation metadata
# annotations:
# storageclass.kubernetes.io/is-default-class: "true"
nicholasmhughes marked this conversation as resolved.
Show resolved Hide resolved
# # label metadata
# labels:
# my-label-is: supercool
# # defaults to WaitForFirstConsumer
# volumeBindingMode: WaitForFirstConsumer
# # defaults to Delete
Expand Down
8 changes: 4 additions & 4 deletions deploy/kubernetes/base/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
- operator: Exists
containers:
- name: ebs-plugin
image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:latest
image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.9.0
imagePullPolicy: IfNotPresent
args:
# - {all,controller,node} # specify the driver mode
Expand Down Expand Up @@ -66,7 +66,7 @@ spec:
periodSeconds: 10
failureThreshold: 5
- name: csi-provisioner
image: quay.io/k8scsi/csi-provisioner:v2.0.2
image: k8s.gcr.io/sig-storage/csi-provisioner:v2.0.2
args:
- --csi-address=$(ADDRESS)
- --v=5
Expand All @@ -80,7 +80,7 @@ spec:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: csi-attacher
image: quay.io/k8scsi/csi-attacher:v3.0.0
image: k8s.gcr.io/sig-storage/csi-attacher:v3.0.0
args:
- --csi-address=$(ADDRESS)
- --v=5
Expand All @@ -92,7 +92,7 @@ spec:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: liveness-probe
image: quay.io/k8scsi/livenessprobe:v2.1.0
image: k8s.gcr.io/sig-storage/livenessprobe:v2.1.0
args:
- --csi-address=/csi/csi.sock
volumeMounts:
Expand Down
6 changes: 3 additions & 3 deletions deploy/kubernetes/base/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
- name: ebs-plugin
securityContext:
privileged: true
image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:latest
image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.9.0
args:
- node
- --endpoint=$(CSI_ENDPOINT)
Expand Down Expand Up @@ -69,7 +69,7 @@ spec:
periodSeconds: 10
failureThreshold: 5
- name: node-driver-registrar
image: quay.io/k8scsi/csi-node-driver-registrar:v2.0.1
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.0.1
args:
- --csi-address=$(ADDRESS)
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
Expand All @@ -89,7 +89,7 @@ spec:
- name: registration-dir
mountPath: /registration
- name: liveness-probe
image: quay.io/k8scsi/livenessprobe:v2.1.0
image: k8s.gcr.io/sig-storage/livenessprobe:v2.1.0
args:
- --csi-address=/csi/csi.sock
volumeMounts:
Expand Down
18 changes: 9 additions & 9 deletions deploy/kubernetes/overlays/stable/ecr/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ bases:
images:
- name: k8s.gcr.io/provider-aws/aws-ebs-csi-driver
newName: 602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/aws-ebs-csi-driver
newTag: v0.7.1
newTag: v0.9.0
- name: quay.io/k8scsi/csi-provisioner
newName: 602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/csi-provisioner
newTag: v1.5.0
newName: public.ecr.aws/eks-distro/kubernetes-csi/external-provisioner
newTag: v2.0.3-eks-1-18-1
- name: quay.io/k8scsi/csi-attacher
newName: 602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/csi-attacher
newTag: v1.2.0
newName: public.ecr.aws/eks-distro/kubernetes-csi/external-attacher
newTag: v3.0.1-eks-1-18-1
- name: quay.io/k8scsi/livenessprobe
newName: 602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/csi-liveness-probe
newTag: v1.1.0
newName: public.ecr.aws/eks-distro/kubernetes-csi/livenessprobe
newTag: v2.1.0-eks-1-18-1
- name: quay.io/k8scsi/csi-node-driver-registrar
newName: 602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/csi-node-driver-registrar
newTag: v1.1.0
newName: public.ecr.aws/eks-distro/kubernetes-csi/node-driver-registrar
newTag: v2.0.1-eks-1-18-1
8 changes: 4 additions & 4 deletions deploy/kubernetes/overlays/stable/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ bases:
images:
- name: k8s.gcr.io/provider-aws/aws-ebs-csi-driver
newTag: v0.9.0
- name: quay.io/k8scsi/csi-provisioner
- name: k8s.gcr.io/sig-storage/csi-provisioner
newTag: v2.0.2
- name: quay.io/k8scsi/csi-attacher
- name: k8s.gcr.io/sig-storage/csi-attacher
newTag: v3.0.0
- name: quay.io/k8scsi/livenessprobe
- name: k8s.gcr.io/sig-storage/livenessprobe
newTag: v2.1.0
- name: quay.io/k8scsi/csi-node-driver-registrar
- name: k8s.gcr.io/sig-storage/csi-node-driver-registrar
newTag: v2.0.1
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Please see the compatibility matrix above before you deploy the driver

If you want to deploy the stable driver without alpha features:
```sh
kubectl apply -k "github.com/kubernetes-sigs/aws-ebs-csi-driver/deploy/kubernetes/overlays/stable/?ref=release-0.8"
kubectl apply -k "github.com/kubernetes-sigs/aws-ebs-csi-driver/deploy/kubernetes/overlays/stable/?ref=release-0.9"
```

If you want to deploy the driver with alpha features:
Expand Down