diff --git a/neutron/Chart.yaml b/neutron/Chart.yaml index 5d68cf2cd4..04805f1fca 100644 --- a/neutron/Chart.yaml +++ b/neutron/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Neutron name: neutron -version: 0.2.8 +version: 0.2.9 home: https://docs.openstack.org/neutron/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png sources: diff --git a/neutron/templates/job-bootstrap.yaml b/neutron/templates/job-bootstrap.yaml index 4312aaaf2e..504400eb01 100644 --- a/neutron/templates/job-bootstrap.yaml +++ b/neutron/templates/job-bootstrap.yaml @@ -18,9 +18,12 @@ helm.sh/hook-weight: "5" {{- end }} {{- if and .Values.manifests.job_bootstrap .Values.bootstrap.enabled }} -{{- $bootstrapJob := dict "envAll" . "serviceName" "neutron" "keystoneUser" .Values.bootstrap.ks_user "logConfigFile" .Values.conf.neutron.DEFAULT.log_config_append "jobAnnotations" (include "metadata.annotations.job.bootstrap" . | fromYaml) -}} +{{- $bootstrapJob := dict "envAll" . "serviceName" "neutron" "keystoneUser" .Values.bootstrap.ks_user "logConfigFile" .Values.conf.neutron.DEFAULT.log_config_append -}} {{- if .Values.manifests.certificates -}} {{- $_ := set $bootstrapJob "tlsSecret" .Values.secrets.tls.network.server.internal -}} {{- end -}} +{{- if .Values.helm3_hook }} +{{- $_ := set $bootstrapJob "jobAnnotations" (include "metadata.annotations.job.bootstrap" . | fromYaml) }} +{{- end }} {{ $bootstrapJob | include "helm-toolkit.manifests.job_bootstrap" }} {{- end }} diff --git a/neutron/templates/job-db-init.yaml b/neutron/templates/job-db-init.yaml index 1a74a535d3..6056aab484 100644 --- a/neutron/templates/job-db-init.yaml +++ b/neutron/templates/job-db-init.yaml @@ -18,9 +18,12 @@ helm.sh/hook-weight: "-5" {{- end }} {{- if .Values.manifests.job_db_init }} -{{- $dbInitJob := dict "envAll" . "serviceName" "neutron" "jobAnnotations" (include "metadata.annotations.job.db_init" . | fromYaml) -}} +{{- $dbInitJob := dict "envAll" . "serviceName" "neutron" -}} {{- if .Values.manifests.certificates -}} {{- $_ := set $dbInitJob "dbAdminTlsSecret" .Values.endpoints.oslo_db.auth.admin.secret.tls.internal -}} {{- end -}} +{{- if .Values.helm3_hook }} +{{- $_ := set $dbInitJob "jobAnnotations" (include "metadata.annotations.job.db_init" . | fromYaml) }} +{{- end }} {{ $dbInitJob | include "helm-toolkit.manifests.job_db_init_mysql" }} {{- end }} diff --git a/neutron/templates/job-db-sync.yaml b/neutron/templates/job-db-sync.yaml index 95a941a3a0..60f7abb900 100644 --- a/neutron/templates/job-db-sync.yaml +++ b/neutron/templates/job-db-sync.yaml @@ -18,9 +18,12 @@ helm.sh/hook-weight: "-4" {{- end }} {{- if .Values.manifests.job_db_sync }} -{{- $dbSyncJob := dict "envAll" . "serviceName" "neutron" "podVolMounts" .Values.pod.mounts.neutron_db_sync.neutron_db_sync.volumeMounts "podVols" .Values.pod.mounts.neutron_db_sync.neutron_db_sync.volumes "jobAnnotations" (include "metadata.annotations.job.db_sync" . | fromYaml) -}} +{{- $dbSyncJob := dict "envAll" . "serviceName" "neutron" "podVolMounts" .Values.pod.mounts.neutron_db_sync.neutron_db_sync.volumeMounts "podVols" .Values.pod.mounts.neutron_db_sync.neutron_db_sync.volumes -}} {{- if .Values.manifests.certificates -}} {{- $_ := set $dbSyncJob "dbAdminTlsSecret" .Values.endpoints.oslo_db.auth.admin.secret.tls.internal -}} {{- end -}} +{{- if .Values.helm3_hook }} +{{- $_ := set $dbSyncJob "jobAnnotations" (include "metadata.annotations.job.db_sync" . | fromYaml) }} +{{- end }} {{ $dbSyncJob | include "helm-toolkit.manifests.job_db_sync" }} {{- end }} diff --git a/neutron/templates/job-image-repo-sync.yaml b/neutron/templates/job-image-repo-sync.yaml index d534171c19..ac1c61f7fd 100644 --- a/neutron/templates/job-image-repo-sync.yaml +++ b/neutron/templates/job-image-repo-sync.yaml @@ -17,6 +17,9 @@ helm.sh/hook: post-install,post-upgrade {{- end }} {{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }} -{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "neutron" "jobAnnotations" (include "metadata.annotations.job.repo_sync" . | fromYaml) -}} +{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "neutron" -}} +{{- if .Values.helm3_hook }} +{{- $_ := set $imageRepoSyncJob "jobAnnotations" (include "metadata.annotations.job.repo_sync" . | fromYaml) }} +{{- end }} {{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }} {{- end }} diff --git a/neutron/templates/job-ks-endpoints.yaml b/neutron/templates/job-ks-endpoints.yaml index 380c9eebb5..8e755c4d49 100644 --- a/neutron/templates/job-ks-endpoints.yaml +++ b/neutron/templates/job-ks-endpoints.yaml @@ -18,9 +18,12 @@ helm.sh/hook-weight: "-2" {{- end }} {{- if .Values.manifests.job_ks_endpoints }} -{{- $ksServiceJob := dict "envAll" . "serviceName" "neutron" "serviceTypes" ( tuple "network" ) "jobAnnotations" (include "metadata.annotations.job.ks_endpoints" . | fromYaml) -}} +{{- $ksEndpointsJob := dict "envAll" . "serviceName" "neutron" "serviceTypes" ( tuple "network" ) -}} {{- if .Values.manifests.certificates -}} -{{- $_ := set $ksServiceJob "tlsSecret" .Values.secrets.tls.network.server.internal -}} +{{- $_ := set $ksEndpointsJob "tlsSecret" .Values.secrets.tls.network.server.internal -}} {{- end -}} -{{ $ksServiceJob | include "helm-toolkit.manifests.job_ks_endpoints" }} +{{- if .Values.helm3_hook }} +{{- $_ := set $ksEndpointsJob "jobAnnotations" (include "metadata.annotations.job.ks_endpoints" . | fromYaml) }} +{{- end }} +{{ $ksEndpointsJob | include "helm-toolkit.manifests.job_ks_endpoints" }} {{- end }} diff --git a/neutron/templates/job-ks-service.yaml b/neutron/templates/job-ks-service.yaml index f8c12d2ed2..b2e5b6611e 100644 --- a/neutron/templates/job-ks-service.yaml +++ b/neutron/templates/job-ks-service.yaml @@ -18,9 +18,12 @@ helm.sh/hook-weight: "-3" {{- end }} {{- if .Values.manifests.job_ks_service }} -{{- $ksServiceJob := dict "envAll" . "serviceName" "neutron" "serviceTypes" ( tuple "network" ) "jobAnnotations" (include "metadata.annotations.job.ks_service" . | fromYaml) -}} +{{- $ksServiceJob := dict "envAll" . "serviceName" "neutron" "serviceTypes" ( tuple "network" ) -}} {{- if .Values.manifests.certificates -}} {{- $_ := set $ksServiceJob "tlsSecret" .Values.secrets.tls.network.server.internal -}} {{- end -}} +{{- if .Values.helm3_hook }} +{{- $_ := set $ksServiceJob "jobAnnotations" (include "metadata.annotations.job.ks_service" . | fromYaml) }} +{{- end }} {{ $ksServiceJob | include "helm-toolkit.manifests.job_ks_service" }} {{- end }} diff --git a/neutron/templates/job-ks-user.yaml b/neutron/templates/job-ks-user.yaml index 7fab81d02c..2c025c5b4a 100644 --- a/neutron/templates/job-ks-user.yaml +++ b/neutron/templates/job-ks-user.yaml @@ -18,9 +18,12 @@ helm.sh/hook-weight: "-1" {{- end }} {{- if .Values.manifests.job_ks_user }} -{{- $ksUserJob := dict "envAll" . "serviceName" "neutron" "jobAnnotations" (include "metadata.annotations.job.ks_user" . | fromYaml) -}} +{{- $ksUserJob := dict "envAll" . "serviceName" "neutron" -}} {{- if .Values.manifests.certificates -}} {{- $_ := set $ksUserJob "tlsSecret" .Values.secrets.tls.network.server.internal -}} {{- end -}} +{{- if .Values.helm3_hook }} +{{- $_ := set $ksUserJob "jobAnnotations" (include "metadata.annotations.job.ks_user" . | fromYaml) }} +{{- end }} {{ $ksUserJob | include "helm-toolkit.manifests.job_ks_user" }} {{- end }} diff --git a/neutron/templates/job-rabbit-init.yaml b/neutron/templates/job-rabbit-init.yaml index 2bb7fc8ca7..56785569ee 100644 --- a/neutron/templates/job-rabbit-init.yaml +++ b/neutron/templates/job-rabbit-init.yaml @@ -18,9 +18,12 @@ helm.sh/hook-weight: "-4" {{- end }} {{- if .Values.manifests.job_rabbit_init }} -{{- $rmqUserJob := dict "envAll" . "serviceName" "neutron" "jobAnnotations" (include "metadata.annotations.job.rabbit_init" . | fromYaml) -}} +{{- $rmqUserJob := dict "envAll" . "serviceName" "neutron" -}} {{- if .Values.manifests.certificates -}} {{- $_ := set $rmqUserJob "tlsSecret" .Values.endpoints.oslo_messaging.auth.admin.secret.tls.internal -}} {{- end -}} +{{- if .Values.helm3_hook }} +{{- $_ := set $rmqUserJob "jobAnnotations" (include "metadata.annotations.job.rabbit_init" . | fromYaml) }} +{{- end }} {{ $rmqUserJob | include "helm-toolkit.manifests.job_rabbit_init" }} {{- end }} diff --git a/neutron/values.yaml b/neutron/values.yaml index 6ce8172b5a..c72a55b52c 100644 --- a/neutron/values.yaml +++ b/neutron/values.yaml @@ -2514,6 +2514,8 @@ network_policy: egress: - {} +helm3_hook: true + manifests: certificates: false configmap_bin: true diff --git a/releasenotes/notes/neutron.yaml b/releasenotes/notes/neutron.yaml index 968825ec78..352bc7f61e 100644 --- a/releasenotes/notes/neutron.yaml +++ b/releasenotes/notes/neutron.yaml @@ -22,4 +22,5 @@ neutron: - 0.2.6 Fix neutron agent-init script - 0.2.7 Made dnsmasq.conf overridable in configmap-bin - 0.2.8 Add Victoria and Wallaby releases support + - 0.2.9 Add option to disable helm.sh/hook annotations ...