From af62b18599ba764cb684d2c074e2b17652b8e10e Mon Sep 17 00:00:00 2001 From: Tadas Sutkaitis Date: Tue, 26 Mar 2024 18:36:55 +0200 Subject: [PATCH] Cyborg: Enable custom annotations Enable custom annotations for pods [deployments, daemonsets] Change-Id: Ie81ad2f8ad184549ad464bf5993294ca361ef1e9 --- cyborg/Chart.yaml | 2 +- cyborg/templates/daemonset-agent.yaml | 1 + cyborg/templates/deployment-api.yaml | 1 + cyborg/templates/deployment-conductor.yaml | 1 + cyborg/values_overrides/annotations.yaml | 9 +++++++++ releasenotes/notes/cyborg.yaml | 1 + 6 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 cyborg/values_overrides/annotations.yaml diff --git a/cyborg/Chart.yaml b/cyborg/Chart.yaml index 35c2a42f8d..7f988be863 100644 --- a/cyborg/Chart.yaml +++ b/cyborg/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Cyborg name: cyborg -version: 0.1.3 +version: 0.1.4 home: https://docs.openstack.org/cyborg icon: https://www.openstack.org/themes/openstack/images/project-mascots/Cyborg/OpenStack_Project_Cyborg_vertical.png sources: diff --git a/cyborg/templates/daemonset-agent.yaml b/cyborg/templates/daemonset-agent.yaml index 124fa04ede..ad1eb252b3 100644 --- a/cyborg/templates/daemonset-agent.yaml +++ b/cyborg/templates/daemonset-agent.yaml @@ -43,6 +43,7 @@ spec: annotations: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} +{{ tuple "cyborg_agent" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }} spec: serviceAccountName: {{ $serviceAccountName }} nodeSelector: diff --git a/cyborg/templates/deployment-api.yaml b/cyborg/templates/deployment-api.yaml index 2b0845860a..0ba7885224 100644 --- a/cyborg/templates/deployment-api.yaml +++ b/cyborg/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 "cyborg_api" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }} {{ dict "envAll" $envAll "podName" "cyborg-api" "containerNames" (list "cyborg" "init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} spec: serviceAccountName: {{ $serviceAccountName }} diff --git a/cyborg/templates/deployment-conductor.yaml b/cyborg/templates/deployment-conductor.yaml index 86f4c443c3..9afcbe17d4 100644 --- a/cyborg/templates/deployment-conductor.yaml +++ b/cyborg/templates/deployment-conductor.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 "cyborg_conductor" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }} {{ dict "envAll" $envAll "podName" "cyborg-conductor" "containerNames" (list "cyborg-conductor" "init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} spec: serviceAccountName: {{ $serviceAccountName }} diff --git a/cyborg/values_overrides/annotations.yaml b/cyborg/values_overrides/annotations.yaml new file mode 100644 index 0000000000..351ed7ae03 --- /dev/null +++ b/cyborg/values_overrides/annotations.yaml @@ -0,0 +1,9 @@ +--- +annotations: + pod: + default: + custom.tld/key: "value" + custom.tld/key2: "value2" + cyborg_api: + another.tld/foo: "bar" +... diff --git a/releasenotes/notes/cyborg.yaml b/releasenotes/notes/cyborg.yaml index e13a5b3008..e556c94884 100644 --- a/releasenotes/notes/cyborg.yaml +++ b/releasenotes/notes/cyborg.yaml @@ -4,4 +4,5 @@ cyborg: - 0.1.1 Migrated PodDisruptionBudget resource to policy/v1 API version - 0.1.2 Added OCI registry authentication - 0.1.3 Define service_type in keystone_authtoken to support application credentials with access rules + - 0.1.4 Enable custom annotations for Openstack pods ...