Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUS-393: Align Gateways serviceAccount with Consoles #124

Closed
18 changes: 10 additions & 8 deletions charts/gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
14 changes: 14 additions & 0 deletions charts/gateway/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
19 changes: 14 additions & 5 deletions charts/gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Expand Down
Loading