Enable taint toleration for ingress

This adds taint toleration support for openstack jobs

Signed-off-by: Lucas Cavalcante <lucasmedeiros.cavalcante@windriver.com>
Change-Id: Ibac507770edd09079e01206fd85b76a193d22915
This commit is contained in:
Thiago Brito 2022-03-22 15:14:11 -03:00 committed by Thiago Paiva Brito
parent 0d5b16cabb
commit 0da995972d
6 changed files with 18 additions and 1 deletions

View File

@ -15,7 +15,7 @@ apiVersion: v1
appVersion: v0.42.0
description: OpenStack-Helm Ingress Controller
name: ingress
version: 0.2.6
version: 0.2.7
home: https://github.com/kubernetes/ingress
sources:
- https://github.com/kubernetes/ingress

View File

@ -49,6 +49,9 @@ spec:
{{ tuple $envAll "ingress" "error-pages" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector:
{{ .Values.labels.error_server.node_selector_key }}: {{ .Values.labels.error_server.node_selector_value | quote }}
{{ if $envAll.Values.pod.tolerations.ingress.enabled }}
{{ tuple $envAll "ingress" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
{{ end }}
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.error_pages.timeout | default "60" }}
initContainers:
{{ tuple $envAll "error_pages" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}

View File

@ -206,6 +206,9 @@ spec:
affinity:
{{ tuple $envAll "ingress" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
{{- end }}
{{ if $envAll.Values.pod.tolerations.ingress.enabled }}
{{ tuple $envAll "ingress" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
{{ end }}
nodeSelector:
{{ .Values.labels.server.node_selector_key }}: {{ .Values.labels.server.node_selector_value | quote }}
{{- if .Values.network.host_namespace }}

View File

@ -14,5 +14,8 @@ limitations under the License.
{{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }}
{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "ingress" -}}
{{- if .Values.pod.tolerations.ingress.enabled -}}
{{- $_ := set $imageRepoSyncJob "tolerationsEnabled" true -}}
{{- end -}}
{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }}
{{- end }}

View File

@ -81,6 +81,13 @@ pod:
default: kubernetes.io/hostname
weight:
default: 10
tolerations:
ingress:
enabled: false
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
dns_policy: "ClusterFirstWithHostNet"
replicas:
ingress: 1

View File

@ -10,4 +10,5 @@ ingress:
- 0.2.4 Update htk requirements
- 0.2.5 Migrate Ingress resources to networking.k8s.io/v1
- 0.2.6 Add option to assign VIP as externalIP
- 0.2.7 Enable taint toleration for Openstack services jobs
...