Browse Source

feat: add ability to set automount to false (#1859)

Signed-off-by: Moritz Johner <Moritz.Johner@form3.tech>

Signed-off-by: Moritz Johner <Moritz.Johner@form3.tech>
Moritz Johner 3 years ago
parent
commit
cdabe6df4e

+ 3 - 0
deploy/charts/external-secrets/README.md

@@ -65,6 +65,7 @@ The command removes all the Kubernetes components associated with the chart and
 | certController.resources | object | `{}` |  |
 | certController.resources | object | `{}` |  |
 | certController.securityContext | object | `{}` |  |
 | certController.securityContext | object | `{}` |  |
 | certController.serviceAccount.annotations | object | `{}` | Annotations to add to the service account. |
 | certController.serviceAccount.annotations | object | `{}` | Annotations to add to the service account. |
+| certController.serviceAccount.automount | bool | `true` | Automounts the service account token in all containers of the pod |
 | certController.serviceAccount.create | bool | `true` | Specifies whether a service account should be created. |
 | certController.serviceAccount.create | bool | `true` | Specifies whether a service account should be created. |
 | certController.serviceAccount.extraLabels | object | `{}` | Extra Labels to add to the service account. |
 | certController.serviceAccount.extraLabels | object | `{}` | Extra Labels to add to the service account. |
 | certController.serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template. |
 | certController.serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template. |
@@ -113,6 +114,7 @@ The command removes all the Kubernetes components associated with the chart and
 | scopedRBAC | bool | `false` | Must be used with scopedNamespace. If true, create scoped RBAC roles under the scoped namespace and implicitly disable cluster stores and cluster external secrets |
 | scopedRBAC | bool | `false` | Must be used with scopedNamespace. If true, create scoped RBAC roles under the scoped namespace and implicitly disable cluster stores and cluster external secrets |
 | securityContext | object | `{}` |  |
 | securityContext | object | `{}` |  |
 | serviceAccount.annotations | object | `{}` | Annotations to add to the service account. |
 | serviceAccount.annotations | object | `{}` | Annotations to add to the service account. |
+| serviceAccount.automount | bool | `true` | Automounts the service account token in all containers of the pod |
 | serviceAccount.create | bool | `true` | Specifies whether a service account should be created. |
 | serviceAccount.create | bool | `true` | Specifies whether a service account should be created. |
 | serviceAccount.extraLabels | object | `{}` | Extra Labels to add to the service account. |
 | serviceAccount.extraLabels | object | `{}` | Extra Labels to add to the service account. |
 | serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template. |
 | serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template. |
@@ -159,6 +161,7 @@ The command removes all the Kubernetes components associated with the chart and
 | webhook.secretAnnotations | object | `{}` | Annotations to add to Secret |
 | webhook.secretAnnotations | object | `{}` | Annotations to add to Secret |
 | webhook.securityContext | object | `{}` |  |
 | webhook.securityContext | object | `{}` |  |
 | webhook.serviceAccount.annotations | object | `{}` | Annotations to add to the service account. |
 | webhook.serviceAccount.annotations | object | `{}` | Annotations to add to the service account. |
+| webhook.serviceAccount.automount | bool | `true` | Automounts the service account token in all containers of the pod |
 | webhook.serviceAccount.create | bool | `true` | Specifies whether a service account should be created. |
 | webhook.serviceAccount.create | bool | `true` | Specifies whether a service account should be created. |
 | webhook.serviceAccount.extraLabels | object | `{}` | Extra Labels to add to the service account. |
 | webhook.serviceAccount.extraLabels | object | `{}` | Extra Labels to add to the service account. |
 | webhook.serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template. |
 | webhook.serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template. |

+ 1 - 0
deploy/charts/external-secrets/templates/cert-controller-deployment.yaml

@@ -32,6 +32,7 @@ spec:
         {{- toYaml . | nindent 8 }}
         {{- toYaml . | nindent 8 }}
       {{- end }}
       {{- end }}
       serviceAccountName: {{ include "external-secrets-cert-controller.serviceAccountName" . }}
       serviceAccountName: {{ include "external-secrets-cert-controller.serviceAccountName" . }}
+      automountServiceAccountToken: {{ .Values.certController.serviceAccount.automount }}
       {{- with .Values.certController.podSecurityContext }}
       {{- with .Values.certController.podSecurityContext }}
       securityContext:
       securityContext:
         {{- toYaml . | nindent 8 }}
         {{- toYaml . | nindent 8 }}

+ 1 - 0
deploy/charts/external-secrets/templates/deployment.yaml

@@ -32,6 +32,7 @@ spec:
         {{- toYaml . | nindent 8 }}
         {{- toYaml . | nindent 8 }}
       {{- end }}
       {{- end }}
       serviceAccountName: {{ include "external-secrets.serviceAccountName" . }}
       serviceAccountName: {{ include "external-secrets.serviceAccountName" . }}
+      automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
       {{- with .Values.podSecurityContext }}
       {{- with .Values.podSecurityContext }}
       securityContext:
       securityContext:
         {{- toYaml . | nindent 8 }}
         {{- toYaml . | nindent 8 }}

+ 1 - 0
deploy/charts/external-secrets/templates/webhook-deployment.yaml

@@ -33,6 +33,7 @@ spec:
       {{- end }}
       {{- end }}
       hostNetwork: {{ .Values.webhook.hostNetwork}}
       hostNetwork: {{ .Values.webhook.hostNetwork}}
       serviceAccountName: {{ include "external-secrets-webhook.serviceAccountName" . }}
       serviceAccountName: {{ include "external-secrets-webhook.serviceAccountName" . }}
+      automountServiceAccountToken: {{ .Values.webhook.serviceAccount.automount }}
       {{- with .Values.webhook.podSecurityContext }}
       {{- with .Values.webhook.podSecurityContext }}
       securityContext:
       securityContext:
         {{- toYaml . | nindent 8 }}
         {{- toYaml . | nindent 8 }}

+ 6 - 0
deploy/charts/external-secrets/values.yaml

@@ -56,6 +56,8 @@ concurrent: 1
 serviceAccount:
 serviceAccount:
   # -- Specifies whether a service account should be created.
   # -- Specifies whether a service account should be created.
   create: true
   create: true
+  # -- Automounts the service account token in all containers of the pod
+  automount: true
   # -- Annotations to add to the service account.
   # -- Annotations to add to the service account.
   annotations: {}
   annotations: {}
   # -- Extra Labels to add to the service account.
   # -- Extra Labels to add to the service account.
@@ -179,6 +181,8 @@ webhook:
   serviceAccount:
   serviceAccount:
     # -- Specifies whether a service account should be created.
     # -- Specifies whether a service account should be created.
     create: true
     create: true
+    # -- Automounts the service account token in all containers of the pod
+    automount: true
     # -- Annotations to add to the service account.
     # -- Annotations to add to the service account.
     annotations: {}
     annotations: {}
     # -- Extra Labels to add to the service account.
     # -- Extra Labels to add to the service account.
@@ -296,6 +300,8 @@ certController:
   serviceAccount:
   serviceAccount:
     # -- Specifies whether a service account should be created.
     # -- Specifies whether a service account should be created.
     create: true
     create: true
+    # -- Automounts the service account token in all containers of the pod
+    automount: true
     # -- Annotations to add to the service account.
     # -- Annotations to add to the service account.
     annotations: {}
     annotations: {}
     # -- Extra Labels to add to the service account.
     # -- Extra Labels to add to the service account.