diff --git a/charts/gateway/README.md b/charts/gateway/README.md index bc1a8fa..a454d37 100644 --- a/charts/gateway/README.md +++ b/charts/gateway/README.md @@ -109,14 +109,16 @@ Gateway embed metrics to be installed within you cluster if your have the correc Shared Kubernetes configuration of the chart. -| Name | Description | Value | -| ----------------------- | -------------------------------------------------------------- | ------- | -| `serviceAccount.create` | Create Kubernetes service account. Default kube value if false | `false` | -| `serviceAccount.name` | Service account name to attach to the Gateway deployment | `""` | -| `commonLabels` | Labels to be applied to all resources created by this chart | `{}` | -| `nodeSelector` | Container node selector | `{}` | -| `tolerations` | Container tolerations | `[]` | -| `affinity` | Container affinity | `{}` | +| Name | Description | Value | +| --------------------------------------------- | ---------------------------------------------------------------- | ------ | +| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` | +| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` | +| `serviceAccount.annotations` | Additional Service Account annotations (evaluated as a template) | `{}` | +| `serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `true` | +| `commonLabels` | Labels to be applied to all resources created by this chart | `{}` | +| `nodeSelector` | Container node selector | `{}` | +| `tolerations` | Container tolerations | `[]` | +| `affinity` | Container affinity | `{}` | ### Dependencies diff --git a/charts/gateway/templates/serviceaccount.yaml b/charts/gateway/templates/serviceaccount.yaml index 68e01dd..82a2d9a 100644 --- a/charts/gateway/templates/serviceaccount.yaml +++ b/charts/gateway/templates/serviceaccount.yaml @@ -3,5 +3,19 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ template "conduktor-gateway.serviceAccountName" . }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{ include "conduktor-gateway.labels" . | nindent 4 }} + {{- if .Values.commonLabels }} + {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- end }} + {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }} + annotations: + {{- if .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} + {{- if .Values.serviceAccount.annotations }} + {{- include "common.tplvalues.render" (dict "value" .Values.serviceAccount.annotations "context" $) | nindent 4 }} + {{- end }} + {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} {{- end -}} diff --git a/charts/gateway/values.yaml b/charts/gateway/values.yaml index f1e7365..439955c 100644 --- a/charts/gateway/values.yaml +++ b/charts/gateway/values.yaml @@ -195,13 +195,22 @@ metrics: ## Shared Kubernetes configuration of the chart. ## @descriptionEnd +## ServiceAccount configuration for the Conduktor Gateway pods +## serviceAccount: - ## @param serviceAccount.create Create Kubernetes service account. Default kube value if false - # Specifies whether a service account should be created - # If AWS IAM is used, need to have create: false - create: false - ## @param serviceAccount.name Service account name to attach to the Gateway deployment + ## @param serviceAccount.create Specifies whether a ServiceAccount should be created + ## + create: true + ## @param serviceAccount.name The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the common.names.fullname template + ## name: "" + ## @param serviceAccount.annotations Additional Service Account annotations (evaluated as a template) + ## + annotations: {} + ## @param serviceAccount.automountServiceAccountToken Automount service account token for the server service account + ## + automountServiceAccountToken: true ## @param commonLabels Labels to be applied to all resources created by this chart commonLabels: {}