diff --git a/masakari/Chart.yaml b/masakari/Chart.yaml index 37cfdfd4fa..ac82ea66ca 100644 --- a/masakari/Chart.yaml +++ b/masakari/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Masakari name: masakari -version: 0.1.7 +version: 0.1.8 home: https://docs.openstack.org/developer/masakari icon: https://www.openstack.org/themes/openstack/images/project-mascots/Masakari/OpenStack_Project_masakari_vertical.png sources: diff --git a/masakari/templates/job-rabbitmq-init.yaml b/masakari/templates/job-rabbitmq-init.yaml index cf8d0ba1db..7965d8ed45 100644 --- a/masakari/templates/job-rabbitmq-init.yaml +++ b/masakari/templates/job-rabbitmq-init.yaml @@ -12,7 +12,15 @@ See the License for the specific language governing permissions and limitations under the License. */}} +{{- define "metadata.annotations.job.rabbit_init" }} +helm.sh/hook: post-install,post-upgrade +helm.sh/hook-weight: "-4" +{{- end }} + {{- if .Values.manifests.job_rabbit_init }} {{- $rmqUserJob := dict "envAll" . "serviceName" "masakari" -}} +{{- 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/releasenotes/notes/masakari.yaml b/releasenotes/notes/masakari.yaml index 7a8b1b3907..cdc9b66fb8 100644 --- a/releasenotes/notes/masakari.yaml +++ b/releasenotes/notes/masakari.yaml @@ -8,4 +8,5 @@ masakari: - 0.1.5 Added OCI registry authentication - 0.1.6 Use HTTP probe instead of TCP probe - 0.1.7 Define service_type in keystone_authtoken to support application credentials with access rules + - 0.1.8 Add helm hook to jobs-rabbitmq-init ...