From 1fbcd58b70c0239da8ae0c2d5469fae70c7baebf Mon Sep 17 00:00:00 2001 From: Vladimir Date: Mon, 4 Feb 2019 21:42:54 +0200 Subject: [PATCH] Add nodeselector, affinity, podAnnotations for efs-provisioner (#10205) Signed-off-by: Vladimir Syromyatnikov --- stable/efs-provisioner/Chart.yaml | 2 +- stable/efs-provisioner/README.md | 21 +++++++++++++++---- .../efs-provisioner/templates/deployment.yaml | 12 +++++++++++ stable/efs-provisioner/values.yaml | 13 ++++++++++++ 4 files changed, 43 insertions(+), 5 deletions(-) diff --git a/stable/efs-provisioner/Chart.yaml b/stable/efs-provisioner/Chart.yaml index 98d944d334dd..fc52a83b682b 100644 --- a/stable/efs-provisioner/Chart.yaml +++ b/stable/efs-provisioner/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: efs-provisioner description: A Helm chart for the AWS EFS external storage provisioner -version: 0.1.5 +version: 0.2.0 appVersion: v2.1.0-k8s1.11 home: https://github.com/kubernetes-incubator/external-storage/tree/master/aws/efs sources: diff --git a/stable/efs-provisioner/README.md b/stable/efs-provisioner/README.md index 4573e27c5a71..e8e8c9918f39 100644 --- a/stable/efs-provisioner/README.md +++ b/stable/efs-provisioner/README.md @@ -1,11 +1,11 @@ # Helm chart for 'efs-provisioner' -The Kubernetes project provides an AWS [EFS provisioner](https://github.com/kubernetes-incubator/external-storage/tree/master/aws/efs) +The Kubernetes project provides an AWS [EFS provisioner](https://github.com/kubernetes-incubator/external-storage/tree/master/aws/efs) that is used to fulfill PersistentVolumeClaims with EFS PersistentVolumes. -"The efs-provisioner allows you to mount EFS storage as PersistentVolumes in kubernetes. -It consists of a container that has access to an AWS EFS resource. The container reads -a configmap which contains the EFS filesystem ID, the AWS region and the name you want +"The efs-provisioner allows you to mount EFS storage as PersistentVolumes in kubernetes. +It consists of a container that has access to an AWS EFS resource. The container reads +a configmap which contains the EFS filesystem ID, the AWS region and the name you want to use for your efs-provisioner. This name will be used later when you create a storage class." This chart deploys the EFS Provisioner and a StorageClass for EFS volumes (optionally as the default). @@ -96,6 +96,19 @@ rbac: create: true serviceAccountName: "" +## Annotations to be added to deployment +## +podAnnotations: {} + # iam.amazonaws.com/role: efs-provisioner-role + +## Node labels for pod assignment +## +nodeSelector: {} + +# Affinity for pod assignment +# Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +affinity: {} + ## Configure resources ## resources: {} diff --git a/stable/efs-provisioner/templates/deployment.yaml b/stable/efs-provisioner/templates/deployment.yaml index acccd0e977e7..668d91b7cb83 100644 --- a/stable/efs-provisioner/templates/deployment.yaml +++ b/stable/efs-provisioner/templates/deployment.yaml @@ -32,6 +32,10 @@ spec: type: Recreate template: metadata: + {{- if .Values.podAnnotations }} + annotations: +{{ toYaml .Values.podAnnotations | indent 8}} + {{- end }} labels: app: {{ template "efs-provisioner.name" . }} release: "{{ .Release.Name }}" @@ -73,3 +77,11 @@ spec: server: {{ .Values.efsProvisioner.efsFileSystemId }}.efs.{{ .Values.efsProvisioner.awsRegion }}.amazonaws.com path: / {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + {{- end }} diff --git a/stable/efs-provisioner/values.yaml b/stable/efs-provisioner/values.yaml index fb0891fc86a8..394a9195bd1e 100644 --- a/stable/efs-provisioner/values.yaml +++ b/stable/efs-provisioner/values.yaml @@ -54,6 +54,19 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: "" +## Annotations to be added to deployment +## +podAnnotations: {} + # iam.amazonaws.com/role: efs-provisioner-role + +## Node labels for pod assignment +## +nodeSelector: {} + +# Affinity for pod assignment +# Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +affinity: {} + ## Configure resources ## resources: {}