Skip to content

Commit

Permalink
fix: add support for injecting affinty and nodeSelector
Browse files Browse the repository at this point in the history
  • Loading branch information
moabu committed Mar 21, 2023
1 parent 123b0b1 commit 91be257
Show file tree
Hide file tree
Showing 27 changed files with 203 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pygluu/kubernetes/templates/gluu_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"OXPASSPORT_IMAGE_NAME": "gluufederation/oxpassport",
"OXPASSPORT_IMAGE_TAG": "4.5.0-5",
"OXSHIBBOLETH_IMAGE_NAME": "gluufederation/oxshibboleth",
"OXSHIBBOLETH_IMAGE_TAG": "4.5.0-9",
"OXSHIBBOLETH_IMAGE_TAG": "4.5.0-10",
"OXTRUST_IMAGE_NAME": "gluufederation/oxtrust",
"OXTRUST_IMAGE_TAG": "4.5.0-6",
"PERSISTENCE_IMAGE_NAME": "gluufederation/persistence",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ spec:
topologySpreadConstraints:
{{- include "casa.topology-spread-constraints" . | indent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- with .Values.tolerations }}
Expand Down
3 changes: 3 additions & 0 deletions pygluu/kubernetes/templates/helm/gluu/charts/casa/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ additionalLabels: { }
additionalAnnotations: { }
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
tolerations: []
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
affinity: {}
nodeSelector: {}
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ spec:
secret:
secretName: {{ .Release.Name }}-google-sa
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- with .Values.tolerations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ spec:
{{- end }}
{{- end }}
restartPolicy: Never
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- with .Values.tolerations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,6 @@ additionalLabels: { }
additionalAnnotations: { }
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
tolerations: []
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
affinity: {}
nodeSelector: {}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ spec:
dnsConfig:
{{ toYaml . | indent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- with .Values.tolerations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ additionalLabels: { }
additionalAnnotations: { }
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
tolerations: []
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
affinity: {}
nodeSelector: {}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ spec:
topologySpreadConstraints:
{{- include "fido2.topology-spread-constraints" . | indent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- with .Values.tolerations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,6 @@ additionalLabels: { }
additionalAnnotations: { }
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
tolerations: []
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
affinity: {}
nodeSelector: {}
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ spec:
name: {{$values.name}}
subPath: {{$key}}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- with .Values.tolerations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,6 @@ additionalLabels: { }
additionalAnnotations: { }
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
tolerations: []
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
affinity: {}
nodeSelector: {}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ spec:
topologySpreadConstraints:
{{- include "opendj.topology-spread-constraints" . | indent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- with .Values.tolerations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,7 @@ additionalLabels: { }
# -- Additional annotations that will be added across all resources in the format of {cert-manager.io/issuer: "letsencrypt-prod"}. key app is taken
additionalAnnotations: { }
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
tolerations: []
tolerations: []
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
affinity: {}
nodeSelector: {}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ spec:
dnsConfig:
{{ toYaml . | indent 12 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 12 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- with .Values.tolerations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ spec:
topologySpreadConstraints:
{{- include "oxauth.topology-spread-constraints" . | indent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- with .Values.tolerations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,7 @@ additionalLabels: { }
# -- Additional annotations that will be added across all resources in the format of {cert-manager.io/issuer: "letsencrypt-prod"}. key app is taken
additionalAnnotations: { }
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
tolerations: []
tolerations: []
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
affinity: {}
nodeSelector: {}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ spec:
topologySpreadConstraints:
{{- include "oxd-server.topology-spread-constraints" . | indent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- with .Values.tolerations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ spec:
topologySpreadConstraints:
{{- include "oxpassport.topology-spread-constraints" . | indent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- with .Values.tolerations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ spec:
topologySpreadConstraints:
{{- include "oxshibboleth.topology-spread-constraints" . | indent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- with .Values.tolerations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ spec:
topologySpreadConstraints:
{{- include "oxtrust.topology-spread-constraints" . | indent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- with .Values.tolerations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,7 @@ additionalLabels: { }
# -- Additional annotations that will be added across all resources in the format of {cert-manager.io/issuer: "letsencrypt-prod"}. key app is taken
additionalAnnotations: { }
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
tolerations: []
tolerations: []
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
affinity: {}
nodeSelector: {}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ spec:
{{ toYaml . | indent 8 }}
{{- end }}
restartPolicy: Never
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- with .Values.tolerations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,7 @@ additionalLabels: { }
# -- Additional annotations that will be added across all resources in the format of {cert-manager.io/issuer: "letsencrypt-prod"}. key app is taken
additionalAnnotations: { }
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
tolerations: []
tolerations: []
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
affinity: {}
nodeSelector: {}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ spec:
topologySpreadConstraints:
{{- include "scim.topology-spread-constraints" . | indent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- with .Values.tolerations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,7 @@ additionalLabels: { }
# -- Additional annotations that will be added across all resources in the format of {cert-manager.io/issuer: "letsencrypt-prod"}. key app is taken
additionalAnnotations: { }
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
tolerations: []
tolerations: []
# -- https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
affinity: {}
nodeSelector: {}
Loading

0 comments on commit 91be257

Please sign in to comment.