Enable taint toleration for openvswitch

This adds taint toleration support for openstack jobs

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

View File

@ -15,7 +15,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm OpenVSwitch
name: openvswitch
version: 0.1.6
version: 0.1.7
home: http://openvswitch.org
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png
sources:

View File

@ -59,6 +59,9 @@ spec:
{{ dict "envAll" $envAll "application" "openvswitch_db_server" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
nodeSelector:
{{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}
{{ if $envAll.Values.pod.tolerations.openvswitch.enabled }}
{{ tuple $envAll "openvswitch" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
{{ end }}
dnsPolicy: {{ .Values.pod.dns_policy }}
hostNetwork: true
initContainers:

View File

@ -72,6 +72,9 @@ spec:
{{ dict "envAll" $envAll "application" "openvswitch_vswitchd" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
nodeSelector:
{{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}
{{ if $envAll.Values.pod.tolerations.openvswitch.enabled }}
{{ tuple $envAll "openvswitch" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
{{ end }}
dnsPolicy: {{ .Values.pod.dns_policy }}
hostNetwork: true
initContainers:

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" "openvswitch" -}}
{{- if .Values.pod.tolerations.openvswitch.enabled -}}
{{- $_ := set $imageRepoSyncJob "tolerationsEnabled" true -}}
{{- end -}}
{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }}
{{- end }}

View File

@ -37,6 +37,13 @@ labels:
node_selector_value: enabled
pod:
tolerations:
openvswitch:
enabled: false
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
probes:
ovs_db:
ovs_db:

View File

@ -7,4 +7,5 @@ openvswitch:
- 0.1.4 Support override of vswitchd liveness and readiness probe
- 0.1.5 Use full image ref for docker official images
- 0.1.6 Update htk requirements
- 0.1.7 Enable taint toleration for Openstack services jobs
...