From 172d86713874fb5c33b2951cb69a1faf075dcc70 Mon Sep 17 00:00:00 2001 From: Kevin Pullin Date: Fri, 22 Apr 2022 12:42:39 -0700 Subject: [PATCH] Allow for setting the 'serviceAccountName' --- charts/cp-control-center/templates/deployment.yaml | 3 +++ charts/cp-control-center/values.yaml | 3 +++ charts/cp-kafka-connect/README.md | 6 ++++++ charts/cp-kafka-connect/templates/deployment.yaml | 3 +++ charts/cp-kafka-connect/values.yaml | 3 +++ charts/cp-kafka-rest/README.md | 6 ++++++ charts/cp-kafka-rest/templates/deployment.yaml | 3 +++ charts/cp-kafka-rest/values.yaml | 3 +++ charts/cp-ksql-server/README.md | 6 ++++++ charts/cp-ksql-server/templates/deployment.yaml | 3 +++ charts/cp-ksql-server/values.yaml | 3 +++ charts/cp-schema-registry/README.md | 6 ++++++ charts/cp-schema-registry/templates/deployment.yaml | 3 +++ charts/cp-schema-registry/values.yaml | 3 +++ charts/cp-zookeeper/README.md | 6 ++++++ charts/cp-zookeeper/templates/statefulset.yaml | 3 +++ charts/cp-zookeeper/values.yaml | 3 +++ 17 files changed, 66 insertions(+) diff --git a/charts/cp-control-center/templates/deployment.yaml b/charts/cp-control-center/templates/deployment.yaml index 4afeaf9b..07c8507e 100644 --- a/charts/cp-control-center/templates/deployment.yaml +++ b/charts/cp-control-center/templates/deployment.yaml @@ -82,3 +82,6 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.serviceAccount.name }} + serviceAccountName: {{ .Values.serviceAccount.name }} + {{- end }} diff --git a/charts/cp-control-center/values.yaml b/charts/cp-control-center/values.yaml index 36774d33..8482489a 100644 --- a/charts/cp-control-center/values.yaml +++ b/charts/cp-control-center/values.yaml @@ -105,3 +105,6 @@ cp-ksql-server: cp-zookeeper: ## If the Zookeeper Chart is disabled a URL and port are required to connect url: "" + +serviceAccount: + name: "" diff --git a/charts/cp-kafka-connect/README.md b/charts/cp-kafka-connect/README.md index f3b2fd81..9920c0af 100644 --- a/charts/cp-kafka-connect/README.md +++ b/charts/cp-kafka-connect/README.md @@ -175,6 +175,12 @@ The configuration parameters in this section control the resources requested and | `nodeSelector` | Dictionary containing key-value-pairs to match labels on nodes. When defined pods will only be scheduled on nodes, that have each of the indicated key-value pairs as labels. Further information can be found in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | `{}` | `tolerations`| Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling. Further information can be found in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `{}` +### Service Account + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `serviceAccount.name` | The service account name for the pod | `""` | + ## Dependencies ### Kafka diff --git a/charts/cp-kafka-connect/templates/deployment.yaml b/charts/cp-kafka-connect/templates/deployment.yaml index 4582f4ac..1533815c 100644 --- a/charts/cp-kafka-connect/templates/deployment.yaml +++ b/charts/cp-kafka-connect/templates/deployment.yaml @@ -144,3 +144,6 @@ spec: affinity: {{ toYaml .Values.affinity | indent 8 }} {{- end }} + {{- if .Values.serviceAccount.name }} + serviceAccountName: {{ .Values.serviceAccount.name }} + {{- end }} diff --git a/charts/cp-kafka-connect/values.yaml b/charts/cp-kafka-connect/values.yaml index ff2cad6c..b1ee483b 100644 --- a/charts/cp-kafka-connect/values.yaml +++ b/charts/cp-kafka-connect/values.yaml @@ -133,3 +133,6 @@ livenessProbe: # initialDelaySeconds: 30 # periodSeconds: 5 # failureThreshold: 10 + +serviceAccount: + name: "" diff --git a/charts/cp-kafka-rest/README.md b/charts/cp-kafka-rest/README.md index db73ac1e..f348f0b8 100644 --- a/charts/cp-kafka-rest/README.md +++ b/charts/cp-kafka-rest/README.md @@ -171,6 +171,12 @@ The configuration parameters in this section control the resources requested and | `nodeSelector` | Dictionary containing key-value-pairs to match labels on nodes. When defined pods will only be scheduled on nodes, that have each of the indicated key-value pairs as labels. Further information can be found in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | `{}` | `tolerations`| Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling. Further information can be found in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `{}` +### Service Account + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `serviceAccount.name` | The service account name for the pod | `""` | + ## Dependencies ### Zookeeper diff --git a/charts/cp-kafka-rest/templates/deployment.yaml b/charts/cp-kafka-rest/templates/deployment.yaml index 39bca499..d30c6d5f 100644 --- a/charts/cp-kafka-rest/templates/deployment.yaml +++ b/charts/cp-kafka-rest/templates/deployment.yaml @@ -114,3 +114,6 @@ spec: affinity: {{ toYaml .Values.affinity | indent 8 }} {{- end }} + {{- if .Values.serviceAccount.name }} + serviceAccountName: {{ .Values.serviceAccount.name }} + {{- end }} diff --git a/charts/cp-kafka-rest/values.yaml b/charts/cp-kafka-rest/values.yaml index d73ed033..f07ffcd4 100644 --- a/charts/cp-kafka-rest/values.yaml +++ b/charts/cp-kafka-rest/values.yaml @@ -101,3 +101,6 @@ cp-schema-registry: cp-kafka: bootstrapServers: "" + +serviceAccount: + name: "" diff --git a/charts/cp-ksql-server/README.md b/charts/cp-ksql-server/README.md index d092726a..7acdb5bd 100644 --- a/charts/cp-ksql-server/README.md +++ b/charts/cp-ksql-server/README.md @@ -179,6 +179,12 @@ The configuration parameters in this section control the resources requested and | `nodeSelector` | Dictionary containing key-value-pairs to match labels on nodes. When defined pods will only be scheduled on nodes, that have each of the indicated key-value pairs as labels. Further information can be found in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | `{}` | `tolerations`| Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling. Further information can be found in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `{}` +### Service Account + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `serviceAccount.name` | The service account name for the pod | `""` | + ## Dependencies ### Schema Registry (optional) diff --git a/charts/cp-ksql-server/templates/deployment.yaml b/charts/cp-ksql-server/templates/deployment.yaml index b152880c..8c590911 100644 --- a/charts/cp-ksql-server/templates/deployment.yaml +++ b/charts/cp-ksql-server/templates/deployment.yaml @@ -125,3 +125,6 @@ spec: affinity: {{ toYaml .Values.affinity | indent 8 }} {{- end }} + {{- if .Values.serviceAccount.name }} + serviceAccountName: {{ .Values.serviceAccount.name }} + {{- end }} diff --git a/charts/cp-ksql-server/values.yaml b/charts/cp-ksql-server/values.yaml index a90b50d3..5e7929b3 100644 --- a/charts/cp-ksql-server/values.yaml +++ b/charts/cp-ksql-server/values.yaml @@ -98,3 +98,6 @@ cp-schema-registry: ## ref: https://docs.confluent.io/current/ksql/docs/installation/server-config/config-reference.html configurationOverrides: {} # "ksql.streams.producer.retries": "2147483647" + +serviceAccount: + name: "" diff --git a/charts/cp-schema-registry/README.md b/charts/cp-schema-registry/README.md index 7353bd37..cfd62b6b 100644 --- a/charts/cp-schema-registry/README.md +++ b/charts/cp-schema-registry/README.md @@ -172,3 +172,9 @@ The configuration parameters in this section control the resources requested and | --------- | ----------- | ------- | | `nodeSelector` | Dictionary containing key-value-pairs to match labels on nodes. When defined pods will only be scheduled on nodes, that have each of the indicated key-value pairs as labels. Further information can be found in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | `{}` | `tolerations`| Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling. Further information can be found in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `{}` + +### Service Account + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `serviceAccount.name` | The service account name for the pod | `""` | diff --git a/charts/cp-schema-registry/templates/deployment.yaml b/charts/cp-schema-registry/templates/deployment.yaml index b94995f0..1c3eb819 100644 --- a/charts/cp-schema-registry/templates/deployment.yaml +++ b/charts/cp-schema-registry/templates/deployment.yaml @@ -126,3 +126,6 @@ spec: affinity: {{ toYaml .Values.affinity | indent 8 }} {{- end }} + {{- if .Values.serviceAccount.name }} + serviceAccountName: {{ .Values.serviceAccount.name }} + {{- end }} diff --git a/charts/cp-schema-registry/values.yaml b/charts/cp-schema-registry/values.yaml index af303a60..12e7c790 100644 --- a/charts/cp-schema-registry/values.yaml +++ b/charts/cp-schema-registry/values.yaml @@ -96,3 +96,6 @@ prometheus: port: 5556 resources: {} + +serviceAccount: + name: "" diff --git a/charts/cp-zookeeper/README.md b/charts/cp-zookeeper/README.md index a8c7139d..4b558b1a 100644 --- a/charts/cp-zookeeper/README.md +++ b/charts/cp-zookeeper/README.md @@ -193,3 +193,9 @@ The configuration parameters in this section control the resources requested and | --------- | ----------- | ------- | | `nodeSelector` | Dictionary containing key-value-pairs to match labels on nodes. When defined pods will only be scheduled on nodes, that have each of the indicated key-value pairs as labels. Further information can be found in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | `{}` | `tolerations`| Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling. Further information can be found in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `{}` + +### Service Account + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `serviceAccount.name` | The service account name for the pod | `""` | diff --git a/charts/cp-zookeeper/templates/statefulset.yaml b/charts/cp-zookeeper/templates/statefulset.yaml index 4f4103fc..49b46e80 100644 --- a/charts/cp-zookeeper/templates/statefulset.yaml +++ b/charts/cp-zookeeper/templates/statefulset.yaml @@ -167,6 +167,9 @@ spec: tolerations: {{ toYaml .Values.tolerations | indent 8 }} {{- end }} + {{- if .Values.serviceAccount.name }} + serviceAccountName: {{ .Values.serviceAccount.name }} + {{- end }} {{- if .Values.persistence.enabled }} volumeClaimTemplates: - metadata: diff --git a/charts/cp-zookeeper/values.yaml b/charts/cp-zookeeper/values.yaml index 283173ee..cc0fb3d8 100644 --- a/charts/cp-zookeeper/values.yaml +++ b/charts/cp-zookeeper/values.yaml @@ -128,3 +128,6 @@ prometheus: ## Resources configuration for the JMX exporter container. ## See the `resources` documentation above for details. resources: {} + +serviceAccount: + name: ""