Skip to content

Commit

Permalink
Add nodeSelector, serviceAccountName and tolerations for supervisor d…
Browse files Browse the repository at this point in the history
…eployment (#134)
  • Loading branch information
diegmonti authored Nov 7, 2024
1 parent e42d502 commit 9938632
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
6 changes: 5 additions & 1 deletion storm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ The following table lists the configurable parameters of the Storm chart and the
| Parameter | Description | Default |
| --------------------------------- | --------------------------- | ------------------- |
| `supervisor.replicaCount` | Number of replicas | 2 |
| `supervisor.extraLabels` | Extra labels for Deployment | {} |
| `supervisor.image.repository` | Container image name | storm |
| `supervisor.image.tag` | Container image version | 2.4.0 |
| `supervisor.image.pullPolicy` | The default pull policy | IfNotPresent |
| `supervisor.nodeSelector` | The nodeSelector | {} |
| `supervisor.serviceAccountName` | The serviceAccountName | "" |
| `supervisor.tolerations` | The tolerations | [] |
| `supervisor.service.name` | Service Name | supervisor |
| `supervisor.service.type` | Service Type | ClusterIP |
| `supervisor.slots` | Slots/Workers (one port each) | 4 |
Expand Down Expand Up @@ -120,4 +124,4 @@ Alternatively, a YAML file that specifies the values for the parameters can be p
$ helm install --name my-release -f values.yaml incubator/storm
```

> **Tip**: You can use the default [values.yaml](values.yaml)
> **Tip**: You can use the default [values.yaml](values.yaml)
16 changes: 15 additions & 1 deletion storm/templates/supervisor-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ metadata:
chart: {{ template "storm.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.supervisor.extraLabels }}
{{ toYaml . | indent 4 }}
{{- end }}
namespace: {{ template "storm.namespace" . }}
spec:
replicas: {{ .Values.supervisor.replicaCount }}
Expand Down Expand Up @@ -77,6 +80,17 @@ spec:
securityContext:
runAsUser: {{ .Values.security.userid }}
fsGroup: {{ .Values.security.groupid }}
{{- if .Values.supervisor.serviceAccountName }}
serviceAccountName: {{ .Values.supervisor.serviceAccountName }}
{{- end }}
{{- if .Values.supervisor.nodeSelector }}
nodeSelector:
{{- toYaml .Values.supervisor.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.supervisor.tolerations }}
tolerations:
{{- toYaml .Values.supervisor.tolerations | nindent 8 }}
{{- end }}
volumes:
{{- if .Values.jmx.enabled }}
- name: jmx-configmap
Expand All @@ -95,4 +109,4 @@ spec:
emptyDir: {}
{{- if .Values.supervisor.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.supervisor.extraVolumes "context" $ ) | nindent 6 }}
{{- end }}
{{- end }}

0 comments on commit 9938632

Please sign in to comment.