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

[TT-13934] Add tolerations, affinity and node selector to tyk-bootstrap and tyk-operator #381

Open
wants to merge 5 commits into
base: main
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
12 changes: 12 additions & 0 deletions components/tyk-bootstrap/templates/bootstrap-post-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ spec:
{{- end }}
spec:
serviceAccountName: {{ default "k8s-bootstrap-role" .Values.bootstrap.serviceAccountName | quote }}
{{- if .Values.bootstrap.nodeSelector }}
nodeSelector:
{{ toYaml .Values.bootstrap.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.bootstrap.tolerations }}
tolerations:
{{ toYaml .Values.bootstrap.tolerations | indent 8 }}
{{- end }}
{{- if .Values.bootstrap.affinity }}
affinity:
{{ toYaml .Values.bootstrap.affinity | indent 8 }}
{{- end }}
containers:
- name: bootstrap-tyk-post-install
image: {{ .Values.global.imageRegistry }}{{ .Values.bootstrap.jobs.postInstall.image.repository }}:{{ .Values.bootstrap.jobs.postInstall.image.tag }}
Expand Down
12 changes: 12 additions & 0 deletions components/tyk-bootstrap/templates/bootstrap-pre-delete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ spec:
{{- end }}
spec:
serviceAccountName: {{ default "k8s-bootstrap-role" .Values.bootstrap.serviceAccountName | quote }}
{{- if .Values.bootstrap.nodeSelector }}
nodeSelector:
{{ toYaml .Values.bootstrap.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.bootstrap.tolerations }}
tolerations:
{{ toYaml .Values.bootstrap.tolerations | indent 8 }}
{{- end }}
{{- if .Values.bootstrap.affinity }}
affinity:
{{ toYaml .Values.bootstrap.affinity | indent 8 }}
{{- end }}
containers:
- name: bootstrap-tyk-pre-delete
image: {{ .Values.global.imageRegistry }}{{ .Values.bootstrap.jobs.preDelete.image.repository }}:{{ .Values.bootstrap.jobs.preDelete.image.tag }}
Expand Down
12 changes: 12 additions & 0 deletions components/tyk-bootstrap/templates/bootstrap-pre-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ spec:
{{- end }}
spec:
serviceAccountName: {{ default "k8s-bootstrap-role" .Values.bootstrap.serviceAccountName | quote }}
{{- if .Values.bootstrap.nodeSelector }}
nodeSelector:
{{ toYaml .Values.bootstrap.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.bootstrap.tolerations }}
tolerations:
{{ toYaml .Values.bootstrap.tolerations | indent 8 }}
{{- end }}
{{- if .Values.bootstrap.affinity }}
affinity:
{{ toYaml .Values.bootstrap.affinity | indent 8 }}
{{- end }}
containers:
- name: bootstrap-tyk-pre-install
image: {{ .Values.global.imageRegistry }}{{ .Values.bootstrap.jobs.preInstall.image.repository }}:{{ .Values.bootstrap.jobs.preInstall.image.tag }}
Expand Down
9 changes: 9 additions & 0 deletions components/tyk-bootstrap/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,15 @@ bootstrap:
# preDeletePodLabels specifies labels to be added to Tyk Bootstrap pre-delete hook's job pods.
preDeletePodLabels: {}

# node labels for bootstrap pods assignment
nodeSelector: {}

# tolerations for bootstrap pods assignment
tolerations: {}

# affinity for bootstrap pods assignment
affinity: {}

# containerSecurityContext values for bootstrap containers
containerSecurityContext:
runAsNonRoot: true
Expand Down
14 changes: 14 additions & 0 deletions tyk-control-plane/values.yaml
zalbiraw marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,11 @@ tyk-operator:
allowPrivilegeEscalation: false
resources: {}
nodeSelector: {}
# tolerations for tyk-operator-manager pod assignment
tolerations: {}

# affinity for tyk-operator-manager pod assignment
affinity: {}
hostNetwork: false

# rbac specifies necessary resources for kube-rbac-proxy.
Expand Down Expand Up @@ -1052,6 +1057,15 @@ tyk-bootstrap:
# preDeletePodLabels specifies labels to be added to Tyk Bootstrap pre-delete hook's job pods.
preDeletePodLabels: {}

# node labels for bootstrap pods assignment
nodeSelector: {}

# tolerations for bootstrap pods assignment
tolerations: {}

# affinity for bootstrap pods assignment
affinity: {}

# extraVolumes is a list of volumes to be added to the pod
# extraVolumes:
# - name: ca-certs
Expand Down
5 changes: 5 additions & 0 deletions tyk-oss/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,11 @@ tyk-operator:
allowPrivilegeEscalation: false
resources: {}
nodeSelector: {}
# tolerations for tyk-operator-manager pod assignment
tolerations: {}

# affinity for tyk-operator-manager pod assignment
affinity: {}
hostNetwork: false

# rbac specifies necessary resources for kube-rbac-proxy.
Expand Down
14 changes: 14 additions & 0 deletions tyk-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,11 @@ tyk-operator:
allowPrivilegeEscalation: false
resources: {}
nodeSelector: {}
# tolerations for tyk-operator-manager pod assignment
tolerations: {}

# affinity for tyk-operator-manager pod assignment
affinity: {}
hostNetwork: false

# rbac specifies necessary resources for kube-rbac-proxy.
Expand Down Expand Up @@ -1065,6 +1070,15 @@ tyk-bootstrap:
# preDeletePodLabels specifies labels to be added to Tyk Bootstrap pre-delete hook's job pods.
preDeletePodLabels: {}

# node labels for bootstrap pods assignment
nodeSelector: {}

# tolerations for bootstrap pods assignment
tolerations: {}

# affinity for bootstrap pods assignment
affinity: {}

# extraVolumes is a list of volumes to be added to the pod
# extraVolumes:
# - name: ca-certs
Expand Down