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

Add nodeSelector, serviceAccountName and tolerations for supervisor deployment #134

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}