diff --git a/stable/gangway/Chart.yaml b/stable/gangway/Chart.yaml index c5a36d3ed1..a168a4175c 100644 --- a/stable/gangway/Chart.yaml +++ b/stable/gangway/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: An application that can be used to easily enable authentication flows via OIDC for a kubernetes cluster. name: gangway -version: 0.4.2 +version: 0.4.3 appVersion: 3.3.0 home: https://github.com/heptiolabs/gangway sources: diff --git a/stable/gangway/README.md b/stable/gangway/README.md index b29cb1bf7b..1f4f33e97c 100644 --- a/stable/gangway/README.md +++ b/stable/gangway/README.md @@ -53,6 +53,7 @@ At a minimum you *must* configure any of the values marked as **required** in th | `gangway.port` | The port to listen on. Defaults to 8080. | `80` | | `gangway.redirectURL` | Where to redirect back to. This should be a URL where gangway is reachable. Typically this also needs to be registered as part of the oauth application with the oAuth provider. **Required** | `""` | | `gangway.scopes` | Used to specify the scope of the requested Oauth authorization. | `["openid", "profile", "email", "offline_access"]` | +| `gangway.serviceAccountName` | Used to specify an alternative serviceAccount name to be created and used. If not set, default account will be used. | `""` | | `gangway.serveTLS` | Should Gangway serve TLS vs. plain HTTP? | `false` | | `gangway.sessionKey` | Encryption key for cookie contents. Will autogenerate if not provided. Caution: Do not use auto generation in production environments. | `""` | | `gangway.tokenURL` | OAuth2 URL to obtain access tokens. To be taken from the configuration of your OIDC provider. **Required** | `""` | diff --git a/stable/gangway/templates/deployment.yaml b/stable/gangway/templates/deployment.yaml index 7d1403fc0e..fd3fc39b26 100644 --- a/stable/gangway/templates/deployment.yaml +++ b/stable/gangway/templates/deployment.yaml @@ -25,6 +25,9 @@ spec: {{ toYaml .Values.podAnnotations | trim | indent 8 }} {{- end }} spec: + {{- if ne .Values.gangway.serviceAccountName "" }} + serviceAccountName: {{ .Values.gangway.serviceAccountName }} + {{- end }} {{- if .Values.image.pullSecrets }} imagePullSecrets: {{ toYaml .Values.image.pullSecrets | indent 8 }} diff --git a/stable/gangway/templates/serviceAccount.yaml b/stable/gangway/templates/serviceAccount.yaml new file mode 100644 index 0000000000..f4263b3f53 --- /dev/null +++ b/stable/gangway/templates/serviceAccount.yaml @@ -0,0 +1,11 @@ +{{- if ne .Values.gangway.serviceAccountName "" }} +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/name: {{ include "gangway.name" . }} + helm.sh/chart: {{ include "gangway.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + name: {{ .Values.gangway.serviceAccountName }} +{{- end }} \ No newline at end of file diff --git a/stable/gangway/values.yaml b/stable/gangway/values.yaml index 063800d33c..c41f2b7d6f 100644 --- a/stable/gangway/values.yaml +++ b/stable/gangway/values.yaml @@ -30,6 +30,8 @@ gangway: # Env var: GANGWAY_HOST # host: 0.0.0.0 + serviceAccountName: "" + # The port to listen on. Defaults to 8080. # Env var: GANGWAY_PORT port: 8080