Enable taint toleration for ironic
This changes use the helm-toolkit template for toleration in openstack services Signed-off-by: Lucas Cavalcante <lucasmedeiros.cavalcante@windriver.com> Story: 2009276 Task: 43531 Depends-On: I168837f962465d1c89acc511b7bf4064ac4b546c Change-Id: Idf412a10e6c6eb6721c427627cf945a70151e355
This commit is contained in:
parent
151c03d5ec
commit
1d9464bad4
@ -14,7 +14,7 @@ apiVersion: v1
|
|||||||
appVersion: v1.0.0
|
appVersion: v1.0.0
|
||||||
description: OpenStack-Helm Ironic
|
description: OpenStack-Helm Ironic
|
||||||
name: ironic
|
name: ironic
|
||||||
version: 0.2.2
|
version: 0.2.3
|
||||||
home: https://docs.openstack.org/ironic/latest/
|
home: https://docs.openstack.org/ironic/latest/
|
||||||
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Ironic/OpenStack_Project_Ironic_vertical.png
|
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Ironic/OpenStack_Project_Ironic_vertical.png
|
||||||
sources:
|
sources:
|
||||||
|
@ -49,6 +49,9 @@ spec:
|
|||||||
{{ tuple $envAll "ironic" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
{{ tuple $envAll "ironic" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ .Values.labels.api.node_selector_key }}: {{ .Values.labels.api.node_selector_value }}
|
{{ .Values.labels.api.node_selector_key }}: {{ .Values.labels.api.node_selector_value }}
|
||||||
|
{{ if $envAll.Values.pod.tolerations.ironic.enabled }}
|
||||||
|
{{ tuple $envAll "ironic" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 10 }}
|
||||||
|
{{ end }}
|
||||||
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.api.timeout | default "30" }}
|
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.api.timeout | default "30" }}
|
||||||
initContainers:
|
initContainers:
|
||||||
{{ tuple $envAll "api" $mounts_ironic_api_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
{{ tuple $envAll "api" $mounts_ironic_api_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
@ -20,6 +20,9 @@ helm.sh/hook-weight: "5"
|
|||||||
{{- if and .Values.manifests.job_bootstrap .Values.bootstrap.image.enabled }}
|
{{- if and .Values.manifests.job_bootstrap .Values.bootstrap.image.enabled }}
|
||||||
{{- if .Values.bootstrap.image.openstack.enabled }}
|
{{- if .Values.bootstrap.image.openstack.enabled }}
|
||||||
{{- $bootstrapJob := dict "envAll" . "serviceName" "ironic" "keystoneUser" .Values.bootstrap.image.openstack.ks_user "logConfigFile" .Values.conf.ironic.DEFAULT.log_config_append "jobAnnotations" (include "metadata.annotations.job.bootstrap" . | fromYaml) -}}
|
{{- $bootstrapJob := dict "envAll" . "serviceName" "ironic" "keystoneUser" .Values.bootstrap.image.openstack.ks_user "logConfigFile" .Values.conf.ironic.DEFAULT.log_config_append "jobAnnotations" (include "metadata.annotations.job.bootstrap" . | fromYaml) -}}
|
||||||
|
{{- if .Values.pod.tolerations.ironic.enabled -}}
|
||||||
|
{{- $_ := set $bootstrapJob "tolerationsEnabled" true -}}
|
||||||
|
{{- end -}}
|
||||||
{{ $bootstrapJob | include "helm-toolkit.manifests.job_bootstrap" }}
|
{{ $bootstrapJob | include "helm-toolkit.manifests.job_bootstrap" }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{ include "helm-toolkit.manifests.job_bootstrap" }}
|
{{ include "helm-toolkit.manifests.job_bootstrap" }}
|
||||||
|
@ -14,5 +14,8 @@ limitations under the License.
|
|||||||
|
|
||||||
{{- if .Values.manifests.job_db_drop }}
|
{{- if .Values.manifests.job_db_drop }}
|
||||||
{{- $dbDropJob := dict "envAll" . "serviceName" "ironic" -}}
|
{{- $dbDropJob := dict "envAll" . "serviceName" "ironic" -}}
|
||||||
|
{{- if .Values.pod.tolerations.ironic.enabled -}}
|
||||||
|
{{- $_ := set $dbDropJob "tolerationsEnabled" true -}}
|
||||||
|
{{- end -}}
|
||||||
{{ $dbDropJob | include "helm-toolkit.manifests.job_db_drop_mysql" }}
|
{{ $dbDropJob | include "helm-toolkit.manifests.job_db_drop_mysql" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -19,5 +19,8 @@ helm.sh/hook-weight: "-5"
|
|||||||
|
|
||||||
{{- if .Values.manifests.job_db_init }}
|
{{- if .Values.manifests.job_db_init }}
|
||||||
{{- $dbInitJob := dict "envAll" . "serviceName" "ironic" "jobAnnotations" (include "metadata.annotations.job.db_init" . | fromYaml) -}}
|
{{- $dbInitJob := dict "envAll" . "serviceName" "ironic" "jobAnnotations" (include "metadata.annotations.job.db_init" . | fromYaml) -}}
|
||||||
|
{{- if .Values.pod.tolerations.ironic.enabled -}}
|
||||||
|
{{- $_ := set $dbInitJob "tolerationsEnabled" true -}}
|
||||||
|
{{- end -}}
|
||||||
{{ $dbInitJob | include "helm-toolkit.manifests.job_db_init_mysql" }}
|
{{ $dbInitJob | include "helm-toolkit.manifests.job_db_init_mysql" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -19,5 +19,8 @@ helm.sh/hook-weight: "-4"
|
|||||||
|
|
||||||
{{- if .Values.manifests.job_db_sync }}
|
{{- if .Values.manifests.job_db_sync }}
|
||||||
{{- $dbSyncJob := dict "envAll" . "serviceName" "ironic" "podVolMounts" .Values.pod.mounts.ironic_db_sync.ironic_db_sync.volumeMounts "podVols" .Values.pod.mounts.ironic_db_sync.ironic_db_sync.volumes "jobAnnotations" (include "metadata.annotations.job.db_sync" . | fromYaml) -}}
|
{{- $dbSyncJob := dict "envAll" . "serviceName" "ironic" "podVolMounts" .Values.pod.mounts.ironic_db_sync.ironic_db_sync.volumeMounts "podVols" .Values.pod.mounts.ironic_db_sync.ironic_db_sync.volumes "jobAnnotations" (include "metadata.annotations.job.db_sync" . | fromYaml) -}}
|
||||||
|
{{- if .Values.pod.tolerations.ironic.enabled -}}
|
||||||
|
{{- $_ := set $dbSyncJob "tolerationsEnabled" true -}}
|
||||||
|
{{- end -}}
|
||||||
{{ $dbSyncJob | include "helm-toolkit.manifests.job_db_sync" }}
|
{{ $dbSyncJob | include "helm-toolkit.manifests.job_db_sync" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -18,5 +18,8 @@ helm.sh/hook: post-install,post-upgrade
|
|||||||
|
|
||||||
{{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }}
|
{{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }}
|
||||||
{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "ironic" "jobAnnotations" (include "metadata.annotations.job.repo_sync" . | fromYaml) -}}
|
{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "ironic" "jobAnnotations" (include "metadata.annotations.job.repo_sync" . | fromYaml) -}}
|
||||||
|
{{- if .Values.pod.tolerations.ironic.enabled -}}
|
||||||
|
{{- $_ := set $imageRepoSyncJob "tolerationsEnabled" true -}}
|
||||||
|
{{- end -}}
|
||||||
{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }}
|
{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -18,6 +18,9 @@ helm.sh/hook-weight: "-2"
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if .Values.manifests.job_ks_endpoints }}
|
{{- if .Values.manifests.job_ks_endpoints }}
|
||||||
{{- $ksServiceJob := dict "envAll" . "serviceName" "ironic" "serviceTypes" ( tuple "baremetal" ) "jobAnnotations" (include "metadata.annotations.job.ks_endpoints" . | fromYaml) -}}
|
{{- $ksEndpointsJob := dict "envAll" . "serviceName" "ironic" "serviceTypes" ( tuple "baremetal" ) "jobAnnotations" (include "metadata.annotations.job.ks_endpoints" . | fromYaml) -}}
|
||||||
{{ $ksServiceJob | include "helm-toolkit.manifests.job_ks_endpoints" }}
|
{{- if .Values.pod.tolerations.ironic.enabled -}}
|
||||||
|
{{- $_ := set $ksEndpointsJob "tolerationsEnabled" true -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{ $ksEndpointsJob | include "helm-toolkit.manifests.job_ks_endpoints" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -19,5 +19,8 @@ helm.sh/hook-weight: "-3"
|
|||||||
|
|
||||||
{{- if .Values.manifests.job_ks_service }}
|
{{- if .Values.manifests.job_ks_service }}
|
||||||
{{- $ksServiceJob := dict "envAll" . "serviceName" "ironic" "serviceTypes" ( tuple "baremetal" ) "jobAnnotations" (include "metadata.annotations.job.ks_service" . | fromYaml) -}}
|
{{- $ksServiceJob := dict "envAll" . "serviceName" "ironic" "serviceTypes" ( tuple "baremetal" ) "jobAnnotations" (include "metadata.annotations.job.ks_service" . | fromYaml) -}}
|
||||||
|
{{- if .Values.pod.tolerations.ironic.enabled -}}
|
||||||
|
{{- $_ := set $ksServiceJob "tolerationsEnabled" true -}}
|
||||||
|
{{- end -}}
|
||||||
{{ $ksServiceJob | include "helm-toolkit.manifests.job_ks_service" }}
|
{{ $ksServiceJob | include "helm-toolkit.manifests.job_ks_service" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -19,5 +19,8 @@ helm.sh/hook-weight: "-1"
|
|||||||
|
|
||||||
{{- if .Values.manifests.job_ks_user }}
|
{{- if .Values.manifests.job_ks_user }}
|
||||||
{{- $ksUserJob := dict "envAll" . "serviceName" "ironic" "jobAnnotations" (include "metadata.annotations.job.ks_user" . | fromYaml) -}}
|
{{- $ksUserJob := dict "envAll" . "serviceName" "ironic" "jobAnnotations" (include "metadata.annotations.job.ks_user" . | fromYaml) -}}
|
||||||
|
{{- if .Values.pod.tolerations.ironic.enabled -}}
|
||||||
|
{{- $_ := set $ksUserJob "tolerationsEnabled" true -}}
|
||||||
|
{{- end -}}
|
||||||
{{ $ksUserJob | include "helm-toolkit.manifests.job_ks_user" }}
|
{{ $ksUserJob | include "helm-toolkit.manifests.job_ks_user" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -36,6 +36,9 @@ spec:
|
|||||||
restartPolicy: OnFailure
|
restartPolicy: OnFailure
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
||||||
|
{{ if $envAll.Values.pod.tolerations.ironic.enabled }}
|
||||||
|
{{ tuple $envAll "ironic" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 10 }}
|
||||||
|
{{ end }}
|
||||||
initContainers:
|
initContainers:
|
||||||
{{ tuple $envAll "manage_cleaning_network" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
{{ tuple $envAll "manage_cleaning_network" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
containers:
|
containers:
|
||||||
|
@ -19,5 +19,8 @@ helm.sh/hook-weight: "-4"
|
|||||||
|
|
||||||
{{- if .Values.manifests.job_rabbit_init }}
|
{{- if .Values.manifests.job_rabbit_init }}
|
||||||
{{- $rmqUserJob := dict "envAll" . "serviceName" "ironic" "jobAnnotations" (include "metadata.annotations.job.rabbit_init" . | fromYaml) -}}
|
{{- $rmqUserJob := dict "envAll" . "serviceName" "ironic" "jobAnnotations" (include "metadata.annotations.job.rabbit_init" . | fromYaml) -}}
|
||||||
|
{{- if .Values.pod.tolerations.ironic.enabled -}}
|
||||||
|
{{- $_ := set $rmqUserJob "tolerationsEnabled" true -}}
|
||||||
|
{{- end -}}
|
||||||
{{ $rmqUserJob | include "helm-toolkit.manifests.job_rabbit_init" }}
|
{{ $rmqUserJob | include "helm-toolkit.manifests.job_rabbit_init" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -49,6 +49,9 @@ spec:
|
|||||||
{{ tuple $envAll "ironic" "conductor" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
{{ tuple $envAll "ironic" "conductor" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ .Values.labels.conductor.node_selector_key }}: {{ .Values.labels.conductor.node_selector_value }}
|
{{ .Values.labels.conductor.node_selector_key }}: {{ .Values.labels.conductor.node_selector_value }}
|
||||||
|
{{ if $envAll.Values.pod.tolerations.ironic.enabled }}
|
||||||
|
{{ tuple $envAll "ironic" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 10 }}
|
||||||
|
{{ end }}
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
hostNetwork: True
|
hostNetwork: True
|
||||||
|
@ -550,6 +550,13 @@ pod:
|
|||||||
default: kubernetes.io/hostname
|
default: kubernetes.io/hostname
|
||||||
weight:
|
weight:
|
||||||
default: 10
|
default: 10
|
||||||
|
tolerations:
|
||||||
|
ironic:
|
||||||
|
enabled: false
|
||||||
|
tolerations:
|
||||||
|
- key: node-role.kubernetes.io/master
|
||||||
|
operator: Exists
|
||||||
|
effect: NoSchedule
|
||||||
mounts:
|
mounts:
|
||||||
ironic_api:
|
ironic_api:
|
||||||
init_container: null
|
init_container: null
|
||||||
|
@ -6,4 +6,5 @@ ironic:
|
|||||||
- 0.2.0 Remove support for releases before T
|
- 0.2.0 Remove support for releases before T
|
||||||
- 0.2.1 Use policies in yaml format
|
- 0.2.1 Use policies in yaml format
|
||||||
- 0.2.2 Update htk requirements repo
|
- 0.2.2 Update htk requirements repo
|
||||||
|
- 0.2.3 Enable taint toleration for Openstack services
|
||||||
...
|
...
|
||||||
|
Loading…
Reference in New Issue
Block a user