From 17ae65a4919496902cba3e992d964669bc467b35 Mon Sep 17 00:00:00 2001 From: Bort Verwilst Date: Fri, 21 Sep 2018 00:26:38 +0200 Subject: [PATCH] [stable/nfs-client-provisioner] Update to 3.1.0 (#7710) * Update version to 3.0.2 Signed-off-by: Bart Verwilst * Add PodSecurityPolicy support Signed-off-by: Bart Verwilst * update docs for psp Signed-off-by: Bart Verwilst * add serviceaccount docs Signed-off-by: Bart Verwilst * rename psp support Signed-off-by: Bart Verwilst * Bump version Signed-off-by: Bart Verwilst * new major version Signed-off-by: Bart Verwilst * test psp Signed-off-by: Bart Verwilst * conditional rbac Signed-off-by: Bart Verwilst * bump version Signed-off-by: Bart Verwilst * Update to 3.1.0 Signed-off-by: Bart Verwilst * fix endpoints, add role(binding) Signed-off-by: Bart Verwilst * Fix tl;dr command Signed-off-by: Bart Verwilst * add buildMode Signed-off-by: Bart Verwilst * Set buildMode Signed-off-by: Bart Verwilst * add buildMode Signed-off-by: Bart Verwilst --- stable/nfs-client-provisioner/Chart.yaml | 4 ++-- stable/nfs-client-provisioner/README.md | 4 ++-- .../ci/test-values.yaml | 1 + .../templates/clusterrole.yaml | 3 --- .../templates/deployment.yaml | 5 +++++ .../templates/role.yaml | 21 +++++++++++++++++++ .../templates/rolebinding.yaml | 19 +++++++++++++++++ stable/nfs-client-provisioner/values.yaml | 2 +- 8 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 stable/nfs-client-provisioner/templates/role.yaml create mode 100644 stable/nfs-client-provisioner/templates/rolebinding.yaml diff --git a/stable/nfs-client-provisioner/Chart.yaml b/stable/nfs-client-provisioner/Chart.yaml index 1424b74516..f06eca5d7f 100644 --- a/stable/nfs-client-provisioner/Chart.yaml +++ b/stable/nfs-client-provisioner/Chart.yaml @@ -1,9 +1,9 @@ apiVersion: v1 -appVersion: 3.0.2 +appVersion: 3.1.0 description: nfs-client is an automatic provisioner that used your *already configured* NFS server, automatically creating Persistent Volumes. name: nfs-client-provisioner home: https://github.com/kubernetes-incubator/external-storage/tree/master/nfs-client -version: 1.0.1 +version: 1.1.0 sources: - https://github.com/kubernetes-incubator/external-storage/tree/master/nfs-client maintainers: diff --git a/stable/nfs-client-provisioner/README.md b/stable/nfs-client-provisioner/README.md index 769a1f9029..4cc9855b5b 100644 --- a/stable/nfs-client-provisioner/README.md +++ b/stable/nfs-client-provisioner/README.md @@ -5,7 +5,7 @@ The [NFS client provisioner](https://github.com/kubernetes-incubator/external-st ## TL;DR; ```console -$ helm install stable/nfs-client-provisioner +$ helm install --set nfs.server=x.x.x.x --set nfs.path=/exported/path stable/nfs-client-provisioner ``` ## Introduction @@ -48,7 +48,7 @@ The following tables lists the configurable parameters of this chart and their d | `replicaCount` | Number of provisioner instances to deployed | `1` | | `strategyType` | Specifies the strategy used to replace old Pods by new ones | `Recreate` | | `image.repository` | Provisioner image | `quay.io/external_storage/nfs-client-provisioner` | -| `image.tag` | Version of provisioner image | `v3.0.2-k8s1.11` | +| `image.tag` | Version of provisioner image | `v3.1.0-k8s1.11` | | `image.pullPolicy` | Image pull policy | `IfNotPresent` | | `storageclass.name` | Name of the storageclass | `nfs-client` | | `storageclass.defaultClass` | Set as the default StorageClass | `false` | diff --git a/stable/nfs-client-provisioner/ci/test-values.yaml b/stable/nfs-client-provisioner/ci/test-values.yaml index 4903829f28..4237de5fc6 100644 --- a/stable/nfs-client-provisioner/ci/test-values.yaml +++ b/stable/nfs-client-provisioner/ci/test-values.yaml @@ -2,3 +2,4 @@ nfs: server: 127.0.0.1 podSecurityPolicy: enabled: true +buildMode: true diff --git a/stable/nfs-client-provisioner/templates/clusterrole.yaml b/stable/nfs-client-provisioner/templates/clusterrole.yaml index 80c1c8124b..fa43e0d42b 100644 --- a/stable/nfs-client-provisioner/templates/clusterrole.yaml +++ b/stable/nfs-client-provisioner/templates/clusterrole.yaml @@ -21,9 +21,6 @@ rules: - apiGroups: [""] resources: ["events"] verbs: ["create", "update", "patch"] - - apiGroups: [""] - resources: ["endpoints"] - verbs: ["get", "list", "watch", "create", "update", "patch"] {{- if .Values.podSecurityPolicy.enabled }} - apiGroups: ['extensions'] resources: ['podsecuritypolicies'] diff --git a/stable/nfs-client-provisioner/templates/deployment.yaml b/stable/nfs-client-provisioner/templates/deployment.yaml index 5ca757543c..749457c807 100644 --- a/stable/nfs-client-provisioner/templates/deployment.yaml +++ b/stable/nfs-client-provisioner/templates/deployment.yaml @@ -37,7 +37,12 @@ spec: - name: NFS_PATH value: {{ .Values.nfs.path }} volumes: +{{- if .Values.buildMode }} + - name: nfs-client-root + emptyDir: {} +{{- else -}} - name: nfs-client-root nfs: server: {{ .Values.nfs.server }} path: {{ .Values.nfs.path }} +{{- end }} diff --git a/stable/nfs-client-provisioner/templates/role.yaml b/stable/nfs-client-provisioner/templates/role.yaml new file mode 100644 index 0000000000..0cccdcbd5e --- /dev/null +++ b/stable/nfs-client-provisioner/templates/role.yaml @@ -0,0 +1,21 @@ +{{- if .Values.rbac.create }} +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + labels: + app: {{ template "nfs-client-provisioner.name" . }} + chart: {{ template "nfs-client-provisioner.chart" . }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: leader-locking-{{ template "nfs-client-provisioner.fullname" . }} +rules: + - apiGroups: [""] + resources: ["endpoints"] + verbs: ["get", "list", "watch", "create", "update", "patch"] +{{- if .Values.podSecurityPolicy.enabled }} + - apiGroups: ['extensions'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: [{{ template "nfs-client-provisioner.fullname" . }}] +{{- end }} +{{- end }} diff --git a/stable/nfs-client-provisioner/templates/rolebinding.yaml b/stable/nfs-client-provisioner/templates/rolebinding.yaml new file mode 100644 index 0000000000..57c1c878a3 --- /dev/null +++ b/stable/nfs-client-provisioner/templates/rolebinding.yaml @@ -0,0 +1,19 @@ +{{- if .Values.rbac.create }} +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + labels: + app: {{ template "nfs-client-provisioner.name" . }} + chart: {{ template "nfs-client-provisioner.chart" . }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: leader-locking-{{ template "nfs-client-provisioner.fullname" . }} +subjects: + - kind: ServiceAccount + name: {{ template "nfs-client-provisioner.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +roleRef: + kind: Role + name: leader-locking-{{ template "nfs-client-provisioner.fullname" . }} + apiGroup: rbac.authorization.k8s.io +{{- end }} diff --git a/stable/nfs-client-provisioner/values.yaml b/stable/nfs-client-provisioner/values.yaml index d4d8593355..0caaa1a0d0 100644 --- a/stable/nfs-client-provisioner/values.yaml +++ b/stable/nfs-client-provisioner/values.yaml @@ -7,7 +7,7 @@ strategyType: Recreate image: repository: quay.io/external_storage/nfs-client-provisioner - tag: v3.0.2-k8s1.11 + tag: v3.1.0-k8s1.11 pullPolicy: IfNotPresent nfs: