Skip to content

Commit 0eeb087

Browse files
committed
feat: extend values.yaml mapping with 'additionalManifests'
1 parent 4b25b86 commit 0eeb087

File tree

5 files changed

+85
-0
lines changed

5 files changed

+85
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,22 @@ spec:
3838
{{- if $addon.manifestPatches }}
3939
manifestPatches: {{ toYaml $addon.manifestPatches | nindent 4 }}
4040
{{- end }}
41+
{{- if $addon.additionalManifests }}
42+
additionalManifests:
43+
name: {{ $addon.additionalManifests.name }}
44+
{{- if $addon.additionalManifests.namespace }}
45+
namespace: {{ $addon.additionalManifests.namespace }}
46+
{{- end }} {{/* if $addon.additionalManifests.namespace */}}
47+
{{- end }}
48+
{{- if $addon.additionalManifests }}
49+
---
50+
apiVersion: v1
51+
kind: ConfigMap
52+
metadata:
53+
name: {{ $addon.additionalManifests.name }}
54+
namespace: {{ default $addonNamespace $addon.additionalManifests.namespace }}
55+
data:
56+
manifests: {{- toYaml $addon.additionalManifests.manifests | nindent 4 }}
57+
{{- end }}
4158
{{- end }} {{/* range $addon := .Values.addon */}}
4259
{{- end }} {{/* if .Values.addon */}}

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,22 @@ spec:
3737
{{- if $bootstrap.manifestPatches }}
3838
manifestPatches: {{ toYaml $bootstrap.manifestPatches | nindent 4 }}
3939
{{- end }}
40+
{{- if $bootstrap.additionalManifests }}
41+
additionalManifests:
42+
name: {{ $bootstrap.additionalManifests.name }}
43+
{{- if $bootstrap.additionalManifests.namespace }}
44+
namespace: {{ $bootstrap.additionalManifests.namespace }}
45+
{{- end }} {{/* if $bootstrap.additionalManifests.namespace */}}
46+
{{- end }}
47+
{{- if $bootstrap.additionalManifests }}
48+
---
49+
apiVersion: v1
50+
kind: ConfigMap
51+
metadata:
52+
name: {{ $bootstrap.additionalManifests.name }}
53+
namespace: {{ default $bootstrapNamespace $bootstrap.additionalManifests.namespace }}
54+
data:
55+
manifests: {{- toYaml $bootstrap.additionalManifests.manifests | nindent 4 }}
56+
{{- end }}
4057
{{- end }} {{/* range $bootstrap := .Values.bootstrap */}}
4158
{{- end }} {{/* if .Values.bootstrap */}}

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,22 @@ spec:
3737
{{- if $controlPlane.manifestPatches }}
3838
manifestPatches: {{ toYaml $controlPlane.manifestPatches | nindent 4 }}
3939
{{- end }}
40+
{{- if $controlPlane.additionalManifests }}
41+
additionalManifests:
42+
name: {{ $controlPlane.additionalManifests.name }}
43+
{{- if $controlPlane.additionalManifests.namespace }}
44+
namespace: {{ $controlPlane.additionalManifests.namespace }}
45+
{{- end }} {{/* if $controlPlane.additionalManifests.namespace */}}
46+
{{- end }}
47+
{{- if $controlPlane.additionalManifests }}
48+
---
49+
apiVersion: v1
50+
kind: ConfigMap
51+
metadata:
52+
name: {{ $controlPlane.additionalManifests.name }}
53+
namespace: {{ default $controlPlaneNamespace $controlPlane.additionalManifests.namespace }}
54+
data:
55+
manifests: {{- toYaml $controlPlane.additionalManifests.manifests | nindent 4 }}
56+
{{- end }}
4057
{{- end }} {{/* range $controlPlane := .Values.controlPlane */}}
4158
{{- end }} {{/* if .Values.controlPlane */}}

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,21 @@ spec:
4646
{{- if .Values.core.manifestPatches }}
4747
manifestPatches: {{ toYaml .Values.core.manifestPatches | nindent 4 }}
4848
{{- end }}
49+
{{- if .Values.core.additionalManifests }}
50+
additionalManifests:
51+
name: {{ .Values.core.additionalManifests.name }}
52+
{{- if .Values.core.additionalManifests.namespace }}
53+
namespace: {{ .Values.core.additionalManifests.namespace }}
54+
{{- end }} {{/* if .Values.core.additionalManifests.namespace */}}
55+
{{- end }}
56+
{{- if .Values.core.additionalManifests }}
57+
---
58+
apiVersion: v1
59+
kind: ConfigMap
60+
metadata:
61+
name: {{ .Values.core.additionalManifests.name }}
62+
namespace: {{ default .Values.coreNamespace .Values.core.additionalManifests.namespace }}
63+
data:
64+
manifests: {{- toYaml .Values.core.additionalManifests.manifests | nindent 4 }}
65+
{{- end }}
4966
{{- end }} {{/* if .Values.core */}}

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,22 @@ spec:
5555
{{- if $infra.manifestPatches }}
5656
manifestPatches: {{- toYaml $infra.manifestPatches | nindent 4 }}
5757
{{- end }} {{/* if $infra.manifestPatches */}}
58+
{{- if $infra.additionalManifests }}
59+
additionalManifests:
60+
name: {{ $infra.additionalManifests.name }}
61+
{{- if $infra.additionalManifests.namespace }}
62+
namespace: {{ $infra.additionalManifests.namespace }}
63+
{{- end }} {{/* if $infra.additionalManifests.namespace */}}
64+
{{- end }} {{/* if $infra.additionalManifests */}}
65+
{{- if $infra.additionalManifests }}
66+
---
67+
apiVersion: v1
68+
kind: ConfigMap
69+
metadata:
70+
name: {{ $infra.additionalManifests.name }}
71+
namespace: {{ default $infrastructureNamespace $infra.additionalManifests.namespace }}
72+
data:
73+
manifests: {{- toYaml $infra.additionalManifests.manifests | nindent 4 }}
74+
{{- end }}
5875
{{- end }} {{/* range $infra := .Values.infrastructure */}}
5976
{{- end }} {{/* if .Values.infrastructure */}}

0 commit comments

Comments
 (0)