Skip to content
4 changes: 2 additions & 2 deletions stable/awsebscsiprovisioner/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: v1
appVersion: "0.4.0"
appVersion: "0.5.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uh thanks @dkoshkin will recheck

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still relevant?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

solved e2e ;) so not relevant anymore :)

description: AWS EBS CSI driver and storage provisioner
name: awsebscsiprovisioner
maintainers:
- name: alejandroEsc
- name: gpaul
- name: hectorj2f
version: 0.3.3
version: 0.3.4
kubeVersion: ">=1.15.0"
home: https://github.com/kubernetes-sigs/aws-ebs-csi-driver
sources:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Check that statefulSet.podAnnoations is rendered
statefulSetCSIController:
podAnnotations:
iam.amazonaws.com/role: ebs-csi-driver-role
statefulSetCSISnapshotController:
podAnnotations:
iam.amazonaws.com/role: ebs-csi-snapshot-controller-role
21 changes: 21 additions & 0 deletions stable/awsebscsiprovisioner/ci/more-specific-settings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Check that statefulSet.podAnnoations is rendered
replicas: 2
extraVolumeTags:
konvoy: cluster-name-random
konvoy-version: 1.4.2
storageclass:
isDefault: true
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
type: io1
fstype: xfs
iopsPerGB: 100
encrypted: true
kmsKeyId: arn:aws:kms:us-west-2:123456789011:key/d72124e7-ffff-1111-zzzz-4f820a16908e
allowedTopologies:
- matchLabelExpressions:
- key: topology.ebs.csi.aws.com/zone
values:
- us-west-2a
- us-west-2b
- us-west-2c
15 changes: 14 additions & 1 deletion stable/awsebscsiprovisioner/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,17 @@ app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{- end -}}

{{/*
Convert the `--extra-volume-tags` command line arg from a map.
*/}}
{{- define "aws-ebs-csi-driver.extra-volume-tags" -}}
{{- $result := dict "pairs" (list) -}}
{{- range $key, $value := .Values.extraVolumeTags -}}
{{- $noop := printf "%s=%s" $key $value | append $result.pairs | set $result "pairs" -}}
{{- end -}}
{{- if gt (len $result.pairs) 0 -}}
- --extra-volume-tags={{- join "," $result.pairs -}}
{{- end -}}
{{- end -}}
8 changes: 8 additions & 0 deletions stable/awsebscsiprovisioner/templates/csidriver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: storage.k8s.io/v1beta1
kind: CSIDriver
metadata:
name: ebs.csi.aws.com
spec:
attachRequired: true
podInfoOnMount: false
4 changes: 4 additions & 0 deletions stable/awsebscsiprovisioner/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ spec:
app: ebs-csi-node
app.kubernetes.io/name: {{ include "aws-ebs-csi-driver.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.node.podAnnotations }}
annotations: {{ toYaml .Values.node.podAnnotations | nindent 8 }}
{{- end }}
spec:
nodeSelector:
beta.kubernetes.io/os: linux
Expand All @@ -31,6 +34,7 @@ spec:
privileged: true
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
args:
- node
- --endpoint=$(CSI_ENDPOINT)
- --logtostderr
- --v=5
Expand Down
118 changes: 104 additions & 14 deletions stable/awsebscsiprovisioner/templates/roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ kind: ServiceAccount
metadata:
name: ebs-csi-controller-sa
namespace: {{ .Release.Namespace }}
{{- with .Values.serviceAccount.controller.annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}

---
apiVersion: v1
kind: ServiceAccount
metadata:
name: ebs-csi-snapshot-controller
namespace: {{ .Release.Namespace }}
{{- with .Values.serviceAccount.snapshot.annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}

---
kind: ClusterRole
Expand All @@ -20,15 +33,24 @@ rules:
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "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: [""]
resources: ["events"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "watch", "list", "delete", "update", "create"]

---
kind: ClusterRoleBinding
Expand Down Expand Up @@ -95,7 +117,7 @@ rules:
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list"]
Expand All @@ -108,6 +130,12 @@ rules:
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents"]
verbs: ["create", "get", "list", "watch", "update", "delete"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents/status"]
verbs: ["update"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["create", "list", "watch", "delete"]
Expand All @@ -125,6 +153,77 @@ roleRef:
kind: ClusterRole
name: ebs-external-snapshotter-role
apiGroup: rbac.authorization.k8s.io

---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: ebs-csi-snapshot-controller-role
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "list", "watch", "create", "update", "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"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots/status"]
verbs: ["update"]

---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: ebs-csi-snapshot-controller-binding
subjects:
- kind: ServiceAccount
name: ebs-csi-snapshot-controller
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: ebs-csi-snapshot-controller-role
apiGroup: rbac.authorization.k8s.io

---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: ebs-csi-snapshot-controller-leaderelection
namespace: {{ .Release.Namespace }}
rules:
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "watch", "list", "delete", "update", "create"]

---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: ebs-csi-snapshot-controller-leaderelection
namespace: {{ .Release.Namespace }}
subjects:
- kind: ServiceAccount
name: ebs-csi-snapshot-controller
namespace: {{ .Release.Namespace }}
roleRef:
kind: Role
name: ebs-csi-snapshot-controller-leaderelection
apiGroup: rbac.authorization.k8s.io
{{- end }}

{{- if .Values.resizer.enabled }}
Expand Down Expand Up @@ -153,7 +252,7 @@ rules:
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
verbs: ["get", "list", "watch", "create", "update", "patch"]

---
kind: ClusterRoleBinding
Expand All @@ -169,12 +268,3 @@ roleRef:
name: ebs-external-resizer-role
apiGroup: rbac.authorization.k8s.io
{{- end}}

---
apiVersion: storage.k8s.io/v1beta1
kind: CSIDriver
metadata:
name: ebs.csi.aws.com
spec:
attachRequired: true
podInfoOnMount: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{- if .Values.snapshotter.enabled }}
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: ebs-csi-snapshot-controller
namespace: {{ .Release.Namespace }}
spec:
serviceName: ebs-csi-snapshot-controller
replicas: 1
selector:
matchLabels:
app: ebs-csi-snapshot-controller
app.kubernetes.io/name: {{ include "aws-ebs-csi-driver.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
{{- if .Values.statefulSetCSISnapshotController.podAnnotations }}
annotations:
{{- range $key, $value := .Values.statefulSetCSISnapshotController.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
labels:
app: ebs-csi-snapshot-controller
app.kubernetes.io/name: {{ include "aws-ebs-csi-driver.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
serviceAccount: ebs-csi-snapshot-controller
containers:
- name: ebs-csi-snapshot-controller
image: "{{ .Values.snapshotter.image.repository }}:{{ .Values.snapshotter.image.tag }}"
args:
- --v=5
- --leader-election=false
{{- end }}
14 changes: 13 additions & 1 deletion stable/awsebscsiprovisioner/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
serviceName: ebs-csi-controller
replicas: 1
replicas: {{ .Values.replicas }}
selector:
matchLabels:
app: ebs-csi-controller
template:
metadata:
{{- if .Values.statefulSetCSIController.podAnnotations }}
annotations:
{{- range $key, $value := .Values.statefulSetCSIController.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
labels:
app: ebs-csi-controller
app.kubernetes.io/name: {{ include "aws-ebs-csi-driver.name" . }}
Expand All @@ -28,7 +34,9 @@ spec:
- name: ebs-plugin
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
args :
- controller
- --endpoint=$(CSI_ENDPOINT)
{{ include "aws-ebs-csi-driver.extra-volume-tags" . }}
- --logtostderr
- --v=5
env:
Expand Down Expand Up @@ -74,6 +82,8 @@ spec:
{{- if .Values.provisioner.enableVolumeScheduling }}
- --feature-gates=Topology=true
{{- end}}
- --enable-leader-election
- --leader-election-type=leases
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
Expand All @@ -85,6 +95,7 @@ spec:
args:
- --csi-address=$(ADDRESS)
- --v=5
- --leader-election=true
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
Expand All @@ -97,6 +108,7 @@ spec:
args:
- --csi-address=$(ADDRESS)
- --connection-timeout=15s
- --leader-election=true
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
Expand Down
3 changes: 3 additions & 0 deletions stable/awsebscsiprovisioner/templates/storageclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ parameters:
{{- if .Values.storageclass.encrypted }}
encrypted: {{ .Values.storageclass.encrypted | quote }}
{{- end }}
{{- if .Values.storageclass.kmsKeyId }}
kmsKeyId: {{ .Values.storageclass.kmsKeyId | quote }}
{{- end }}
{{- if .Values.storageclass.allowedTopologies }}
{{- with .Values.storageclass.allowedTopologies }}
allowedTopologies:
Expand Down
Loading