From 7b5b9ca67f67a0eb6d43bcbebf3fcb964dfda13a Mon Sep 17 00:00:00 2001 From: Tadas Sutkaitis Date: Thu, 28 Mar 2024 09:58:08 +0200 Subject: [PATCH] Manila: Enable custom annotations Enable custom annotations for pods [deployments, daemonsets] Change-Id: I6440f9dbc0aaa5e6f084c43c08589543a6c9be76 --- manila/Chart.yaml | 2 +- manila/templates/deployment-api.yaml | 1 + manila/templates/deployment-data.yaml | 1 + manila/templates/deployment-scheduler.yaml | 1 + manila/templates/deployment-share.yaml | 1 + manila/values_overrides/annotations.yaml | 9 +++++++++ releasenotes/notes/manila.yaml | 1 + 7 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 manila/values_overrides/annotations.yaml diff --git a/manila/Chart.yaml b/manila/Chart.yaml index e5b802b17c..47e9781a69 100644 --- a/manila/Chart.yaml +++ b/manila/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Manila name: manila -version: 0.1.8 +version: 0.1.9 home: https://docs.openstack.org/manila/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Manila/OpenStack_Project_Manila_vertical.png sources: diff --git a/manila/templates/deployment-api.yaml b/manila/templates/deployment-api.yaml index c6e1d0744c..361c392800 100644 --- a/manila/templates/deployment-api.yaml +++ b/manila/templates/deployment-api.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 "manila_api" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }} {{ dict "envAll" $envAll "podName" "manila-api" "containerNames" (list "init" "manila-api") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} spec: {{ dict "envAll" $envAll "application" "manila" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} diff --git a/manila/templates/deployment-data.yaml b/manila/templates/deployment-data.yaml index 21db299e31..645e6eeedb 100644 --- a/manila/templates/deployment-data.yaml +++ b/manila/templates/deployment-data.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 "manila_data" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }} {{ dict "envAll" $envAll "podName" "manila-data" "containerNames" (list "init" "manila-data") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} spec: {{ dict "envAll" $envAll "application" "manila" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} diff --git a/manila/templates/deployment-scheduler.yaml b/manila/templates/deployment-scheduler.yaml index 4858dfce54..902c8c9784 100644 --- a/manila/templates/deployment-scheduler.yaml +++ b/manila/templates/deployment-scheduler.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 "manila_scheduler" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }} {{ dict "envAll" $envAll "podName" "manila-scheduler" "containerNames" (list "init" "manila-scheduler") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} spec: {{ dict "envAll" $envAll "application" "manila" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} diff --git a/manila/templates/deployment-share.yaml b/manila/templates/deployment-share.yaml index 87bff3b11e..8e19c8ca05 100644 --- a/manila/templates/deployment-share.yaml +++ b/manila/templates/deployment-share.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 "manila_share" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }} {{ dict "envAll" $envAll "podName" "manila-share" "containerNames" (list "init" "manila-share" "manila-share-init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} spec: {{ dict "envAll" $envAll "application" "manila" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} diff --git a/manila/values_overrides/annotations.yaml b/manila/values_overrides/annotations.yaml new file mode 100644 index 0000000000..35fc52d6ac --- /dev/null +++ b/manila/values_overrides/annotations.yaml @@ -0,0 +1,9 @@ +--- +annotations: + pod: + default: + custom.tld/key: "value" + custom.tld/key2: "value2" + manila_api: + another.tld/foo: "bar" +... diff --git a/releasenotes/notes/manila.yaml b/releasenotes/notes/manila.yaml index de81efe645..ad990b3634 100644 --- a/releasenotes/notes/manila.yaml +++ b/releasenotes/notes/manila.yaml @@ -9,4 +9,5 @@ manila: - 0.1.6 Add 2023.2 Ubuntu Jammy overrides - 0.1.7 Properly config network host for share service - 0.1.8 uses uWSGI for API service + - 0.1.9 Enable custom annotations for Openstack pods ...