Skip to content

Commit 9938632

Browse files
authored
Add nodeSelector, serviceAccountName and tolerations for supervisor deployment (#134)
1 parent e42d502 commit 9938632

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

storm/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,13 @@ The following table lists the configurable parameters of the Storm chart and the
4646
| Parameter | Description | Default |
4747
| --------------------------------- | --------------------------- | ------------------- |
4848
| `supervisor.replicaCount` | Number of replicas | 2 |
49+
| `supervisor.extraLabels` | Extra labels for Deployment | {} |
4950
| `supervisor.image.repository` | Container image name | storm |
5051
| `supervisor.image.tag` | Container image version | 2.4.0 |
5152
| `supervisor.image.pullPolicy` | The default pull policy | IfNotPresent |
53+
| `supervisor.nodeSelector` | The nodeSelector | {} |
54+
| `supervisor.serviceAccountName` | The serviceAccountName | "" |
55+
| `supervisor.tolerations` | The tolerations | [] |
5256
| `supervisor.service.name` | Service Name | supervisor |
5357
| `supervisor.service.type` | Service Type | ClusterIP |
5458
| `supervisor.slots` | Slots/Workers (one port each) | 4 |
@@ -120,4 +124,4 @@ Alternatively, a YAML file that specifies the values for the parameters can be p
120124
$ helm install --name my-release -f values.yaml incubator/storm
121125
```
122126

123-
> **Tip**: You can use the default [values.yaml](values.yaml)
127+
> **Tip**: You can use the default [values.yaml](values.yaml)

storm/templates/supervisor-deployment.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ metadata:
77
chart: {{ template "storm.chart" . }}
88
release: {{ .Release.Name }}
99
heritage: {{ .Release.Service }}
10+
{{- with .Values.supervisor.extraLabels }}
11+
{{ toYaml . | indent 4 }}
12+
{{- end }}
1013
namespace: {{ template "storm.namespace" . }}
1114
spec:
1215
replicas: {{ .Values.supervisor.replicaCount }}
@@ -77,6 +80,17 @@ spec:
7780
securityContext:
7881
runAsUser: {{ .Values.security.userid }}
7982
fsGroup: {{ .Values.security.groupid }}
83+
{{- if .Values.supervisor.serviceAccountName }}
84+
serviceAccountName: {{ .Values.supervisor.serviceAccountName }}
85+
{{- end }}
86+
{{- if .Values.supervisor.nodeSelector }}
87+
nodeSelector:
88+
{{- toYaml .Values.supervisor.nodeSelector | nindent 8 }}
89+
{{- end }}
90+
{{- if .Values.supervisor.tolerations }}
91+
tolerations:
92+
{{- toYaml .Values.supervisor.tolerations | nindent 8 }}
93+
{{- end }}
8094
volumes:
8195
{{- if .Values.jmx.enabled }}
8296
- name: jmx-configmap
@@ -95,4 +109,4 @@ spec:
95109
emptyDir: {}
96110
{{- if .Values.supervisor.extraVolumes }}
97111
{{- include "common.tplvalues.render" (dict "value" .Values.supervisor.extraVolumes "context" $ ) | nindent 6 }}
98-
{{- end }}
112+
{{- end }}

0 commit comments

Comments
 (0)