Skip to content

Commit c4f97e2

Browse files
committed
feat: extend template to support mapping 'manifestPatches' in values.yaml
1 parent dadb228 commit c4f97e2

File tree

6 files changed

+18
-0
lines changed

6 files changed

+18
-0
lines changed

hack/charts/cluster-api-operator/templates/addon.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@ spec:
3434
{{- if $.Values.secretNamespace }}
3535
secretNamespace: {{ $.Values.secretNamespace }}
3636
{{- end }}
37+
{{- if $addon.manifestPatches }}
38+
manifestPatches: {{ toYaml $addon.manifestPatches | nindent 4 }}
39+
{{- end }}
3740
{{- end }} {{/* range $name, $addon := .Values.addon */}}

hack/charts/cluster-api-operator/templates/bootstrap.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,7 @@ spec:
3333
namespace: {{ $.Values.configSecret.namespace }}
3434
{{- end }}
3535
{{- end }}
36+
{{- if $bootstrap.manifestPatches }}
37+
manifestPatches: {{ toYaml $bootstrap.manifestPatches | nindent 4 }}
38+
{{- end }}
3639
{{- end }} {{/* range $name, $bootstrap := .Values.bootstrap */}}

hack/charts/cluster-api-operator/templates/control-plane.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,7 @@ spec:
4646
namespace: {{ $.Values.configSecret.namespace }}
4747
{{- end }}
4848
{{- end }}
49+
{{- if $controlPlane.manifestPatches }}
50+
manifestPatches: {{ toYaml $controlPlane.manifestPatches | nindent 4 }}
51+
{{- end }}
4952
{{- end }} {{/* range $name, $controlPlane := .Values.controlPlane */}}

hack/charts/cluster-api-operator/templates/core.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,7 @@ spec:
4343
namespace: {{ $.Values.configSecret.namespace }}
4444
{{- end }}
4545
{{- end }}
46+
{{- if $core.manifestPatches }}
47+
manifestPatches: {{ toYaml $core.manifestPatches | nindent 4 }}
48+
{{- end }}
4649
{{- end }} {{/* range $name, $core := .Values.core */}}

hack/charts/cluster-api-operator/templates/infra.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,7 @@ spec:
6161
{{- if $.Values.additionalDeployments }}
6262
additionalDeployments: {{ toYaml $.Values.additionalDeployments | nindent 4 }}
6363
{{- end }}
64+
{{- if $infra.manifestPatches }}
65+
manifestPatches: {{- toYaml $infra.manifestPatches | nindent 4 }}
66+
{{- end }}
6467
{{- end }} {{/* range $name, $infra := .Values.infrastructure */}}

hack/charts/cluster-api-operator/templates/ipam.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ spec:
4848
namespace: {{ $.Values.configSecret.namespace }}
4949
{{- end }}
5050
{{- end }}
51+
{{- if $ipam.manifestPatches }}
52+
manifestPatches: {{ toYaml $ipam.manifestPatches | nindent 4 }}
53+
{{- end }}
5154
{{- if $.Values.additionalDeployments }}
5255
additionalDeployments: {{ toYaml $.Values.additionalDeployments | nindent 4 }}
5356
{{- end }}

0 commit comments

Comments
 (0)