From 1df9146cfe8cf98dca2fa6f8ebb68f717e361e1d Mon Sep 17 00:00:00 2001 From: Omer Aplatony Date: Fri, 10 May 2024 14:52:24 +0300 Subject: [PATCH] Add deployment overrides to templates files --- hack/charts/cluster-api-operator/templates/addon.yaml | 3 +++ hack/charts/cluster-api-operator/templates/bootstrap.yaml | 3 +++ hack/charts/cluster-api-operator/templates/control-plane.yaml | 3 +++ .../cluster-api-operator/templates/core-conditions.yaml | 3 +++ hack/charts/cluster-api-operator/templates/core.yaml | 3 +++ .../cluster-api-operator/templates/infra-conditions.yaml | 4 +++- hack/charts/cluster-api-operator/templates/infra.yaml | 3 +++ 7 files changed, 21 insertions(+), 1 deletion(-) diff --git a/hack/charts/cluster-api-operator/templates/addon.yaml b/hack/charts/cluster-api-operator/templates/addon.yaml index a4acb740c..db6bb4871 100644 --- a/hack/charts/cluster-api-operator/templates/addon.yaml +++ b/hack/charts/cluster-api-operator/templates/addon.yaml @@ -52,3 +52,6 @@ spec: {{- end }} {{- end }} {{- end }} +{{- if hasKey $.Values.deploymentOverride "addon" }} + {{ $.Values.deploymentOverride.addon | toYaml | nindent 2 }} +{{- end }} \ No newline at end of file diff --git a/hack/charts/cluster-api-operator/templates/bootstrap.yaml b/hack/charts/cluster-api-operator/templates/bootstrap.yaml index a1634ee89..e49a5ed17 100644 --- a/hack/charts/cluster-api-operator/templates/bootstrap.yaml +++ b/hack/charts/cluster-api-operator/templates/bootstrap.yaml @@ -53,3 +53,6 @@ spec: {{- end }} {{- end }} {{- end }} +{{- if hasKey $.Values.deploymentOverride "bootstrap" }} + {{ $.Values.deploymentOverride.bootstrap | toYaml | nindent 2 }} +{{- end }} \ No newline at end of file diff --git a/hack/charts/cluster-api-operator/templates/control-plane.yaml b/hack/charts/cluster-api-operator/templates/control-plane.yaml index b7cec76d5..ea03a8411 100644 --- a/hack/charts/cluster-api-operator/templates/control-plane.yaml +++ b/hack/charts/cluster-api-operator/templates/control-plane.yaml @@ -53,3 +53,6 @@ spec: {{- end }} {{- end }} {{- end }} +{{- if hasKey $.Values.deploymentOverride "control-plane" }} + {{ $.Values.deploymentOverride.control-plane | toYaml | nindent 2 }} +{{- end }} diff --git a/hack/charts/cluster-api-operator/templates/core-conditions.yaml b/hack/charts/cluster-api-operator/templates/core-conditions.yaml index 7bba5953f..ad1376bc4 100644 --- a/hack/charts/cluster-api-operator/templates/core-conditions.yaml +++ b/hack/charts/cluster-api-operator/templates/core-conditions.yaml @@ -28,4 +28,7 @@ spec: {{- end }} {{- end }} {{- end }} +{{- if hasKey $.Values.deploymentOverride "core-condition" }} + {{ $.Values.deploymentOverride.core-condition | toYaml | nindent 2 }} +{{- end }} diff --git a/hack/charts/cluster-api-operator/templates/core.yaml b/hack/charts/cluster-api-operator/templates/core.yaml index 4235cd711..ded2f8e10 100644 --- a/hack/charts/cluster-api-operator/templates/core.yaml +++ b/hack/charts/cluster-api-operator/templates/core.yaml @@ -60,3 +60,6 @@ spec: {{- end }} {{- end }} {{- end }} +{{- if hasKey $.Values.deploymentOverride "core" }} + {{ $.Values.deploymentOverride.core | toYaml | nindent 2 }} +{{- end }} \ No newline at end of file diff --git a/hack/charts/cluster-api-operator/templates/infra-conditions.yaml b/hack/charts/cluster-api-operator/templates/infra-conditions.yaml index 2d1e8ccae..06d84d2eb 100644 --- a/hack/charts/cluster-api-operator/templates/infra-conditions.yaml +++ b/hack/charts/cluster-api-operator/templates/infra-conditions.yaml @@ -56,5 +56,7 @@ spec: {{- end }} {{- end }} {{- end }} - {{- end }} +{{- if hasKey $.Values.deploymentOverride "infra-condition" }} + {{ $.Values.deploymentOverride.infra-condition | toYaml | nindent 2 }} +{{- end }} \ No newline at end of file diff --git a/hack/charts/cluster-api-operator/templates/infra.yaml b/hack/charts/cluster-api-operator/templates/infra.yaml index 5f813a224..5d7ef679b 100644 --- a/hack/charts/cluster-api-operator/templates/infra.yaml +++ b/hack/charts/cluster-api-operator/templates/infra.yaml @@ -66,3 +66,6 @@ spec: {{- end }} {{- end }} {{- end }} +{{- if hasKey $.Values.deploymentOverride "infrastructure" }} + {{ $.Values.deploymentOverride.infrastructure | toYaml | nindent 2 }} +{{- end }} \ No newline at end of file