From ce24c258b8138b25d53da7d665bac6fa3f8c8933 Mon Sep 17 00:00:00 2001 From: Tadas Sutkaitis Date: Thu, 28 Mar 2024 21:38:58 +0200 Subject: [PATCH] Masakari: Enable custom annotations Enable custom annotations for pods [deployments, daemonsets] Change-Id: Iad06052c25127d86ef6bc3ce65f08d15dbeb0bdc --- masakari/Chart.yaml | 2 +- masakari/templates/daemonset-host-monitor.yaml | 1 + masakari/templates/daemonset-instance-monitor.yaml | 1 + masakari/templates/daemonset-process-monitor.yaml | 1 + masakari/templates/deployment-api.yaml | 1 + masakari/templates/deployment-engine.yaml | 1 + .../{secret_rabbitmq.yaml => secret-rabbitmq.yaml} | 0 masakari/values_overrides/annotations.yaml | 9 +++++++++ releasenotes/notes/masakari.yaml | 1 + 9 files changed, 16 insertions(+), 1 deletion(-) rename masakari/templates/{secret_rabbitmq.yaml => secret-rabbitmq.yaml} (100%) create mode 100644 masakari/values_overrides/annotations.yaml diff --git a/masakari/Chart.yaml b/masakari/Chart.yaml index ac82ea66ca..b3a34be884 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.8 +version: 0.1.9 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/daemonset-host-monitor.yaml b/masakari/templates/daemonset-host-monitor.yaml index 5dde0862ac..a119220a6e 100644 --- a/masakari/templates/daemonset-host-monitor.yaml +++ b/masakari/templates/daemonset-host-monitor.yaml @@ -44,6 +44,7 @@ spec: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} +{{ tuple "masakari_host_monitor" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }} spec: {{ dict "envAll" $envAll "application" "masakari-host-monitor" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} serviceAccountName: {{ $serviceAccountName }} diff --git a/masakari/templates/daemonset-instance-monitor.yaml b/masakari/templates/daemonset-instance-monitor.yaml index 62540d5b24..cabd3f51ed 100644 --- a/masakari/templates/daemonset-instance-monitor.yaml +++ b/masakari/templates/daemonset-instance-monitor.yaml @@ -44,6 +44,7 @@ spec: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} +{{ tuple "masakari_instance_monitor" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }} spec: {{ dict "envAll" $envAll "application" "masakari-instance-monitor" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} serviceAccountName: {{ $serviceAccountName }} diff --git a/masakari/templates/daemonset-process-monitor.yaml b/masakari/templates/daemonset-process-monitor.yaml index 7ab1292be1..3274870a65 100644 --- a/masakari/templates/daemonset-process-monitor.yaml +++ b/masakari/templates/daemonset-process-monitor.yaml @@ -44,6 +44,7 @@ spec: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} +{{ tuple "masakari_process_monitor" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }} spec: {{ dict "envAll" $envAll "application" "masakari-process-monitor" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} serviceAccountName: {{ $serviceAccountName }} diff --git a/masakari/templates/deployment-api.yaml b/masakari/templates/deployment-api.yaml index 916f0f4aeb..1f0d0e927c 100644 --- a/masakari/templates/deployment-api.yaml +++ b/masakari/templates/deployment-api.yaml @@ -58,6 +58,7 @@ spec: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} +{{ tuple "masakari_api" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }} {{ dict "envAll" $envAll "podName" "masakari-api" "containerNames" (list "masakari-api-init" "masakari-api" "init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} spec: serviceAccountName: {{ $serviceAccountName }} diff --git a/masakari/templates/deployment-engine.yaml b/masakari/templates/deployment-engine.yaml index 118f0f38f9..6d36e56c43 100644 --- a/masakari/templates/deployment-engine.yaml +++ b/masakari/templates/deployment-engine.yaml @@ -43,6 +43,7 @@ spec: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} +{{ tuple "masakari_engine" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }} {{ dict "envAll" $envAll "podName" "masakari-engine" "containerNames" (list "masakari-engine-init" "masakari-engine" "init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} spec: serviceAccountName: {{ $serviceAccountName }} diff --git a/masakari/templates/secret_rabbitmq.yaml b/masakari/templates/secret-rabbitmq.yaml similarity index 100% rename from masakari/templates/secret_rabbitmq.yaml rename to masakari/templates/secret-rabbitmq.yaml diff --git a/masakari/values_overrides/annotations.yaml b/masakari/values_overrides/annotations.yaml new file mode 100644 index 0000000000..d422aba932 --- /dev/null +++ b/masakari/values_overrides/annotations.yaml @@ -0,0 +1,9 @@ +--- +annotations: + pod: + default: + custom.tld/key: "value" + custom.tld/key2: "value2" + masakari_api: + another.tld/foo: "bar" +... diff --git a/releasenotes/notes/masakari.yaml b/releasenotes/notes/masakari.yaml index cdc9b66fb8..f4f609bb6d 100644 --- a/releasenotes/notes/masakari.yaml +++ b/releasenotes/notes/masakari.yaml @@ -9,4 +9,5 @@ masakari: - 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 + - 0.1.9 Enable custom annotations for Openstack pods ...