Skip to content

Commit

Permalink
Helm node selector docs and values (#4264)
Browse files Browse the repository at this point in the history
* Add nodeSelector template and tests

Add nodeSelector template to the helm deployment:
- deployment.yaml
- database.yaml
- config-init.yaml

Add tests to validate nodeSelector template to
- deployment_test.yaml

Create tests to validate nodeSelector template to
- database_test.yaml
- config_init_test.yaml

* Add c&p fix and another nodeSelector test

Add fix for c&p bug to
- database.yaml
- deployment.yaml

Add test to validate nodeSelector template to
- config_init_test.yaml

Add test config to
- database-test.yaml
- deployment-test.yaml

* Remove test

Remove test to validate nodeSelector template to
    - config_init_test.yaml

* More gates on node selector. Added to values.yaml and README

Co-authored-by: Johannes Jungkunst <macevil@gmail.com>
  • Loading branch information
nwmac and macevil authored May 7, 2020
1 parent 535a040 commit eb71605
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
3 changes: 3 additions & 0 deletions deploy/kubernetes/console/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ The following table lists the configurable parameters of the Stratos Helm chart
|console.service.extraLabels|Additional labels to be added to all service resources||
|console.service.ingress.annotations|Annotations to be added to the ingress resource||
|console.service.ingress.extraLabels|Additional labels to be added to the ingress resource||
|console.nodeSelector|Node selectors to use for the console Pod||
|mariadb.nodeSelector|Node selectors to use for the database Pod||
|configInit.nodeSelector|Node selectors to use for the configuration Pod||

## Accessing the Console

Expand Down
4 changes: 3 additions & 1 deletion deploy/kubernetes/console/templates/config-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@ spec:
{{- end }}
spec:
{{- if .Values.configInit }}
{{- if .Values.configInit.nodeSelector }}
nodeSelector:
{{ toYaml .Values.configInit.nodeSelector | indent 8 }}
{{ toYaml .Values.configInit.nodeSelector | trim | indent 8 }}
{{- end }}
{{- end }}
containers:
- env:
Expand Down
4 changes: 3 additions & 1 deletion deploy/kubernetes/console/templates/database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ spec:
{{- end}}
spec:
{{- if .Values.mariadb }}
{{- if .Values.mariadb.nodeSelector }}
nodeSelector:
{{ toYaml .Values.mariadb.nodeSelector | indent 8 }}
{{ toYaml .Values.mariadb.nodeSelector | trim | indent 8 }}
{{- end }}
{{- end }}
containers:
- name: mariadb
Expand Down
4 changes: 3 additions & 1 deletion deploy/kubernetes/console/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ spec:
{{- end }}
spec:
{{- if .Values.console }}
{{- if .Values.console.nodeSelector }}
nodeSelector:
{{ toYaml .Values.console.nodeSelector | indent 8 }}
{{ toYaml .Values.console.nodeSelector | trim | indent 8 }}
{{- end }}
{{- end }}
containers:
- image: {{.Values.kube.registry.hostname}}/{{.Values.kube.organization}}/{{.Values.images.console}}:{{.Values.consoleVersion}}
Expand Down
9 changes: 9 additions & 0 deletions deploy/kubernetes/console/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ console:

# Extra labels to apply to Pods
podExtraLabels: {}

# Node Selector for console Pod
nodeSelector: {}

images:
console: stratos-console
Expand Down Expand Up @@ -143,7 +146,13 @@ mariadb:
accessMode: ReadWriteOnce
size: 1Gi
storageClass:
# Node selector for the database pod
nodeSelector: {}

configInit:
# Node selector for the config init pod
nodeSelector: {}

# UAA configuration
uaa:
# UAA endpoint (e.g. https://uaa.domain:2793)
Expand Down

0 comments on commit eb71605

Please sign in to comment.