Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Added node selectors (#32)
Browse files Browse the repository at this point in the history
* Added node selectors for redis and mysql

* Added node selector for other resources
  • Loading branch information
MrFabio authored Sep 21, 2023
1 parent 18568db commit df54426
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ helm uninstall -n <namespace> <release-name>
|db.enabled|if true, install the db sub-chart|true|
|db.affinity|set the affinity structure for the db subchart resources||
|db.storageClassName|set the `storageClassName` for the db subchart StatefulSet resources||
|db.mysql.nodeSelector.label| optional Node Selector Label for mysql and db-create ||
|db.mysql.nodeSelector.value| optional Node Selector Value for mysql and db-create ||
|db.redis.nodeSelector.label| optional Node Selector Label for redis ||
|db.redis.nodeSelector.value| optional Node Selector Value for redis ||
|monitoring.enabled|if true, install the monitoring sub-chart|true|
|monitoring.affinity|set the affinity structure for the monitoring subchart resources||
|monitoring.storageClassName|set the `storageClassName` for the monitoring subchart StatefulSet resources||
Expand All @@ -242,6 +246,12 @@ helm uninstall -n <namespace> <release-name>
|sbc.rtp.extraVolumes|list of volumes to add to the sbc-rtp definition of volumes||
|sbc.rtp.statefulset.enabled|use a StatefulSet instead of DaemonSet for the sbc-rtp|`false`|
|sbc.rtp.statefulset.replicas|number of replicas for the StatefulSet|`1`|
|sbcCallRouter.nodeSelector.label| optional Node Selector Label for sbc-call-router ||
|sbcCallRouter.nodeSelector.value| optional Node Selector Value for sbc-call-router ||
|sbcInbound.nodeSelector.label| optional Node Selector Label for sbc-inbound ||
|sbcInbound.nodeSelector.value| optional Node Selector Value for sbc-inbound ||
|sbcOutbound.nodeSelector.label| optional Node Selector Label for sbc-outbound ||
|sbcOutbound.nodeSelector.value| optional Node Selector Value for sbc-outbound ||
|stats.enabled|if set, jambonz apps write stats to telegraf|"1"|
|stats.host|telegraf service name|"telegraf"|
|stats.port|telegraf service listening port|"8125"|
Expand Down Expand Up @@ -280,9 +290,15 @@ helm uninstall -n <namespace> <release-name>
|api.imagePullPolicy|jambonz-api-server image pull policy|"Always"|
|api.httpPort|http port to listen on|"3000"|
|api.hostname|(required) FQDN for api ingress controller|""|
|api.nodeSelector.label| optional Node Selector Label for api-server ||
|api.nodeSelector.value| optional Node Selector Value for api-server ||
|apiban.nodeSelector.label| optional Node Selector Label for apiban ||
|apiban.nodeSelector.value| optional Node Selector Value for apiban ||
|webapp.image|jambonz webapp image|jambonz/webapp:latest|
|webapp.imagePullPolicy|jambonz webapp image pull policy|"Always"|
|webapp.hostname|(required ) FQDN for webapp ingress controller|""|
|webapp.nodeSelector.label| optional Node Selector Label for webapp ||
|webapp.nodeSelector.value| optional Node Selector Value for webapp ||
|sbcInbound.image|sbc-inbound image|jambonz/sbc-inbound:latest|
|sbcInbound.imagePullPolicy|sbc-inbound image pull policy|"Always"|
|sbcOutbound.drachtioPort|port to listen on for outbound connections from drachtio|"4000"|
Expand All @@ -297,6 +313,8 @@ helm uninstall -n <namespace> <release-name>
|featureServer.image|feature-server image|jambonz/feature-server:latest|
|featureServer.imagePullPolicy|feature-server image pull policy|"Always"|
|featureServer.httpPort|port to listen on for api requests|"3000"|
|featureServer.nodeSelector.label| optional Node Selector Label for feature-server ||
|featureServer.nodeSelector.value| optional Node Selector Value for feature-server ||
|feature.drachtioConnection|drachtio connection information|"localhost:9022:cymru"|
|feature.freeswitchConnection|freeswitch connection information|"localhost:8021:JambonzR0ck$"|
|sbcSip.loglevel|drachtio loglevel in sbc sip container, should be info or debug|"info"|
Expand Down
4 changes: 4 additions & 0 deletions charts/db/templates/db-create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ spec:
{{ toYaml .Values.mysql.podAnnotations | default "" | nindent 8 }}
{{- end }}
spec:
{{- if .Values.mysql.nodeSelector }}
nodeSelector:
{{ .Values.mysql.nodeSelector.label }}: {{ .Values.mysql.nodeSelector.value | quote }}
{{- end }}
containers:
- name: db
image: jambonz/db-create:0.8.4
Expand Down
4 changes: 4 additions & 0 deletions charts/db/templates/mysql-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ spec:
affinity:
{{ toYaml .Values.affinity | default "" | nindent 8 }}
{{- end }}
{{- if .Values.mysql.nodeSelector }}
nodeSelector:
{{ .Values.mysql.nodeSelector.label }}: {{ .Values.mysql.nodeSelector.value | quote }}
{{- end }}
containers:
- name: mysql
image: {{ .Values.mysql.image }}
Expand Down
4 changes: 4 additions & 0 deletions charts/db/templates/redis-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ spec:
affinity:
{{ toYaml .Values.affinity | default "" | nindent 8 }}
{{- end }}
{{- if .Values.redis.nodeSelector }}
nodeSelector:
{{ .Values.redis.nodeSelector.label }}: {{ .Values.redis.nodeSelector.value | quote }}
{{- end }}
containers:
- name: redis
image: {{ .Values.redis.image }}
Expand Down
4 changes: 4 additions & 0 deletions templates/api-server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ spec:
affinity:
{{ toYaml .Values.global.affinity | default "" | nindent 8 }}
{{- end }}
{{- if .Values.api.nodeSelector }}
nodeSelector:
{{ .Values.api.nodeSelector.label }}: {{ .Values.api.nodeSelector.value | quote }}
{{- end }}
initContainers:
- image: kanisterio/mysql-sidecar:0.40.0
name: db-create-wait
Expand Down
4 changes: 4 additions & 0 deletions templates/apiban-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ spec:
affinity:
{{ toYaml .Values.global.affinity | default "" | nindent 12 }}
{{- end }}
{{- if .Values.apiban.nodeSelector }}
nodeSelector:
{{ .Values.apiban.nodeSelector.label }}: {{ .Values.apiban.nodeSelector.value | quote }}
{{- end }}
containers:
- name: apiban-redis
image: jambonz/apiban-redis:latest
Expand Down
4 changes: 4 additions & 0 deletions templates/feature-server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ spec:
affinity:
{{ toYaml .Values.global.affinity | default "" | nindent 8 }}
{{- end }}
{{- if .Values.featureServer.nodeSelector }}
nodeSelector:
{{ .Values.featureServer.nodeSelector.label }}: {{ .Values.featureServer.nodeSelector.value | quote }}
{{- end }}
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
Expand Down
4 changes: 4 additions & 0 deletions templates/sbc-call-router-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ spec:
affinity:
{{ toYaml .Values.global.affinity | default "" | nindent 8 }}
{{- end }}
{{- if .Values.sbcCallRouter.nodeSelector }}
nodeSelector:
{{ .Values.sbcCallRouter.nodeSelector.label }}: {{ .Values.sbcCallRouter.nodeSelector.value | quote }}
{{- end }}
containers:
- name: sbc-call-router
image: {{ .Values.sbcCallRouter.image }}
Expand Down
4 changes: 4 additions & 0 deletions templates/sbc-inbound-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ spec:
affinity:
{{ toYaml .Values.global.affinity | default "" | nindent 8 }}
{{- end }}
{{- if .Values.sbcInbound.nodeSelector }}
nodeSelector:
{{ .Values.sbcInbound.nodeSelector.label }}: {{ .Values.sbcInbound.nodeSelector.value | quote }}
{{- end }}
containers:
- name: sbc-inbound
image: {{ .Values.sbcInbound.image }}
Expand Down
4 changes: 4 additions & 0 deletions templates/sbc-outbound-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ spec:
affinity:
{{ toYaml .Values.global.affinity | default "" | nindent 8 }}
{{- end }}
{{- if .Values.sbcOutbound.nodeSelector }}
nodeSelector:
{{ .Values.sbcOutbound.nodeSelector.label }}: {{ .Values.sbcOutbound.nodeSelector.value | quote }}
{{- end }}
containers:
- name: sbc-outbound
image: {{ .Values.sbcOutbound.image }}
Expand Down
4 changes: 4 additions & 0 deletions templates/webapp-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ spec:
affinity:
{{ toYaml .Values.global.affinity | default "" | nindent 8 }}
{{- end }}
{{- if .Values.webapp.nodeSelector }}
nodeSelector:
{{ .Values.webapp.nodeSelector.label }}: {{ .Values.webapp.nodeSelector.value | quote }}
{{- end }}
containers:
- env:
- name: NODE_ENV
Expand Down

0 comments on commit df54426

Please sign in to comment.