File tree Expand file tree Collapse file tree 15 files changed +79
-37
lines changed
hack/charts/cluster-api-operator Expand file tree Collapse file tree 15 files changed +79
-37
lines changed Original file line number Diff line number Diff line change @@ -22,3 +22,13 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
22
22
{ {- end -} }
23
23
{ {- end -} }
24
24
{ {- end -} }
25
+
26
+ { {- define " capi-operator.configSecret" -} }
27
+ { {- $ := .ROOT -} }
28
+ { {- $arg := .ARGUMENT -} }
29
+ configSecret:
30
+ name: { { default (($arg ).configSecret).name (($.Values).configSecret).name } }
31
+ { {- if (default (($arg ).configSecret).namespace (($.Values).configSecret).namespace) } }
32
+ namespace: { { default (($arg ).configSecret).namespace (($.Values).configSecret).namespace } }
33
+ { {- end } }
34
+ { {- end -} }
Original file line number Diff line number Diff line change @@ -28,12 +28,15 @@ metadata:
28
28
" helm.sh/hook-weight " : " 2"
29
29
{{- end }}
30
30
" argocd.argoproj.io/sync-wave " : " 2"
31
- {{- if or $addonVersion $.Values.secretName }}
31
+ {{- if or $addonVersion $.Values.secretName $.Values.configSecret.name (($addon).configSecret).name }}
32
32
spec :
33
33
{{- end}}
34
34
{{- if $addonVersion }}
35
35
version : {{ $addonVersion }}
36
36
{{- end }}
37
+ {{- if (default (($addon).configSecret).name (($.Values).configSecret).name) }}
38
+ {{- include "capi-operator.configSecret" (dict "ROOT" $ "ARGUMENT" $addon) | nindent 2 }}
39
+ {{- end }}
37
40
{{- if $.Values.secretName }}
38
41
secretName : {{ $.Values.secretName }}
39
42
{{- end }}
43
46
{{- if $addon.manifestPatches }}
44
47
manifestPatches : {{ toYaml $addon.manifestPatches | nindent 4 }}
45
48
{{- end }}
49
+ {{- if $addon.fetchConfig }}
50
+ fetchConfig : {{ toYaml $addon.fetchConfig | nindent 4 }}
51
+ {{- end }}
46
52
{{- if $addon.additionalManifests }}
47
53
additionalManifests :
48
54
name : {{ $addon.additionalManifests.name }}
Original file line number Diff line number Diff line change @@ -28,22 +28,21 @@ metadata:
28
28
" helm.sh/hook-weight " : " 2"
29
29
{{- end }}
30
30
" argocd.argoproj.io/sync-wave " : " 2"
31
- {{- if or $bootstrapVersion $.Values.configSecret.name }}
31
+ {{- if or $bootstrapVersion $.Values.configSecret.name (($bootstrap).configSecret).name }}
32
32
spec :
33
33
{{- end}}
34
34
{{- if $bootstrapVersion }}
35
35
version : {{ $bootstrapVersion }}
36
36
{{- end }}
37
- {{- if $.Values.configSecret.name }}
38
- configSecret :
39
- name : {{ $.Values.configSecret.name }}
40
- {{- if $.Values.configSecret.namespace }}
41
- namespace : {{ $.Values.configSecret.namespace }}
42
- {{- end }}
37
+ {{- if (default (($bootstrap).configSecret).name (($.Values).configSecret).name) }}
38
+ {{- include "capi-operator.configSecret" (dict "ROOT" $ "ARGUMENT" $bootstrap) | nindent 2 }}
43
39
{{- end }}
44
40
{{- if $bootstrap.manifestPatches }}
45
41
manifestPatches : {{ toYaml $bootstrap.manifestPatches | nindent 4 }}
46
42
{{- end }}
43
+ {{- if $bootstrap.fetchConfig }}
44
+ fetchConfig : {{ toYaml $bootstrap.fetchConfig | nindent 4 }}
45
+ {{- end }}
47
46
{{- if $bootstrap.additionalManifests }}
48
47
additionalManifests :
49
48
name : {{ $bootstrap.additionalManifests.name }}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ metadata:
28
28
" helm.sh/hook-weight " : " 2"
29
29
{{- end }}
30
30
" argocd.argoproj.io/sync-wave " : " 2"
31
- {{- if or $controlPlaneVersion $.Values.configSecret.name $.Values.manager }}
31
+ {{- if or $controlPlaneVersion $.Values.configSecret.name $.Values.manager (($controlPlane).configSecret).name }}
32
32
spec :
33
33
{{- end}}
34
34
{{- if $controlPlaneVersion }}
@@ -47,16 +47,15 @@ spec:
47
47
{{- end }}
48
48
{{- end }}
49
49
{{- end }}
50
- {{- if $.Values.configSecret.name }}
51
- configSecret :
52
- name : {{ $.Values.configSecret.name }}
53
- {{- if $.Values.configSecret.namespace }}
54
- namespace : {{ $.Values.configSecret.namespace }}
55
- {{- end }}
50
+ {{- if (default (($controlPlane).configSecret).name (($.Values).configSecret).name) }}
51
+ {{- include "capi-operator.configSecret" (dict "ROOT" $ "ARGUMENT" $controlPlane) | nindent 2 }}
56
52
{{- end }}
57
53
{{- if $controlPlane.manifestPatches }}
58
54
manifestPatches : {{ toYaml $controlPlane.manifestPatches | nindent 4 }}
59
55
{{- end }}
56
+ {{- if $controlPlane.fetchConfig }}
57
+ fetchConfig : {{ toYaml $controlPlane.fetchConfig | nindent 4 }}
58
+ {{- end }}
60
59
{{- if $controlPlane.additionalManifests }}
61
60
additionalManifests :
62
61
name : {{ $controlPlane.additionalManifests.name }}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ metadata:
28
28
" helm.sh/hook-weight " : " 2"
29
29
{{- end }}
30
30
" argocd.argoproj.io/sync-wave " : " 2"
31
- {{- if or $coreVersion $.Values.configSecret.name $.Values.manager }}
31
+ {{- if or $coreVersion $.Values.configSecret.name $.Values.manager (($core).configSecret).name }}
32
32
spec :
33
33
{{- end}}
34
34
{{- if $coreVersion }}
@@ -43,16 +43,15 @@ spec:
43
43
{{- end }}
44
44
{{- end }}
45
45
{{- end }}
46
- {{- if $.Values.configSecret.name }}
47
- configSecret :
48
- name : {{ $.Values.configSecret.name }}
49
- {{- if $.Values.configSecret.namespace }}
50
- namespace : {{ $.Values.configSecret.namespace }}
51
- {{- end }}
46
+ {{- if (default (($core).configSecret).name (($.Values).configSecret).name) }}
47
+ {{- include "capi-operator.configSecret" (dict "ROOT" $ "ARGUMENT" $core) | nindent 2 }}
52
48
{{- end }}
53
49
{{- if $core.manifestPatches }}
54
50
manifestPatches : {{ toYaml $core.manifestPatches | nindent 4 }}
55
51
{{- end }}
52
+ {{- if $core.fetchConfig }}
53
+ fetchConfig : {{ toYaml $core.fetchConfig | nindent 4 }}
54
+ {{- end }}
56
55
{{- if $core.additionalManifests }}
57
56
additionalManifests :
58
57
name : {{ $core.additionalManifests.name }}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ metadata:
28
28
" helm.sh/hook-weight " : " 2"
29
29
{{- end }}
30
30
" argocd.argoproj.io/sync-wave " : " 2"
31
- {{- if or $infrastructureVersion $.Values.configSecret.name $.Values.manager $.Values.additionalDeployments }}
31
+ {{- if or $infrastructureVersion $.Values.configSecret.name $.Values.manager $.Values.additionalDeployments (($infra).configSecret).name }}
32
32
spec :
33
33
{{- end }}
34
34
{{- if $infrastructureVersion }}
@@ -57,19 +57,18 @@ spec:
57
57
{{- end }}
58
58
{{- end }}
59
59
{{- end }}
60
- {{- if $.Values.configSecret.name }}
61
- configSecret :
62
- name : {{ $.Values.configSecret.name }}
63
- {{- if $.Values.configSecret.namespace }}
64
- namespace : {{ $.Values.configSecret.namespace }}
65
- {{- end }}
60
+ {{- if (default (($infra).configSecret).name (($.Values).configSecret).name) }}
61
+ {{- include "capi-operator.configSecret" (dict "ROOT" $ "ARGUMENT" $infra) | nindent 2 }}
66
62
{{- end }}
67
63
{{- if $.Values.additionalDeployments }}
68
64
additionalDeployments : {{ toYaml $.Values.additionalDeployments | nindent 4 }}
69
65
{{- end }}
70
66
{{- if $infra.manifestPatches }}
71
67
manifestPatches : {{- toYaml $infra.manifestPatches | nindent 4 }}
72
68
{{- end }} {{/* if $infra.manifestPatches */}}
69
+ {{- if $infra.fetchConfig }}
70
+ fetchConfig : {{ toYaml $infra.fetchConfig | nindent 4 }}
71
+ {{- end }}
73
72
{{- if $infra.additionalManifests }}
74
73
additionalManifests :
75
74
name : {{ $infra.additionalManifests.name }}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ metadata:
28
28
" helm.sh/hook-weight " : " 2"
29
29
{{- end }}
30
30
" argocd.argoproj.io/sync-wave " : " 2"
31
- {{- if or $ipamVersion $.Values.configSecret.name $.Values.manager $.Values.additionalDeployments }}
31
+ {{- if or $ipamVersion $.Values.configSecret.name $.Values.manager $.Values.additionalDeployments (($ipam).configSecret).name }}
32
32
spec :
33
33
{{- end }}
34
34
{{- if $ipamVersion }}
@@ -57,16 +57,15 @@ spec:
57
57
{{- end }}
58
58
{{- end }}
59
59
{{- end }}
60
- {{- if $.Values.configSecret.name }}
61
- configSecret :
62
- name : {{ $.Values.configSecret.name }}
63
- {{- if $.Values.configSecret.namespace }}
64
- namespace : {{ $.Values.configSecret.namespace }}
65
- {{- end }}
60
+ {{- if (default (($ipam).configSecret).name (($.Values).configSecret).name) }}
61
+ {{- include "capi-operator.configSecret" (dict "ROOT" $ "ARGUMENT" $ipam) | nindent 2 }}
66
62
{{- end }}
67
63
{{- if $ipam.manifestPatches }}
68
64
manifestPatches : {{ toYaml $ipam.manifestPatches | nindent 4 }}
69
65
{{- end }}
66
+ {{- if $ipam.fetchConfig }}
67
+ fetchConfig : {{ toYaml $ipam.fetchConfig | nindent 4 }}
68
+ {{- end }}
70
69
{{- if $.Values.additionalDeployments }}
71
70
additionalDeployments : {{ toYaml $.Values.additionalDeployments | nindent 4 }}
72
71
{{- end }}
Original file line number Diff line number Diff line change 1
1
{
2
- "$schema" : " http ://json-schema.org/draft-07 /schema#" ,
2
+ "$schema" : " https ://json-schema.org/draft/2020-12 /schema#" ,
3
3
"type" : " object" ,
4
4
"properties" : {
5
+ "fetchConfig" : {
6
+ "type" : " object" ,
7
+ "deprecated" : true ,
8
+ "description" : " This field is deprecated and will be removed in future versions. Prefer declaring fetchConfig under the individual providers instead."
9
+ },
5
10
"core" : {
6
11
"oneOf" : [
7
12
{ "type" : " object" },
Original file line number Diff line number Diff line change @@ -71,6 +71,9 @@ metadata:
71
71
" argocd.argoproj.io/sync-wave " : " 2"
72
72
spec :
73
73
version : v0.2.6
74
+ configSecret :
75
+ name : test-secret-name
76
+ namespace : test-secret-namespace
74
77
---
75
78
# Source: cluster-api-operator/templates/bootstrap.yaml
76
79
apiVersion : operator.cluster.x-k8s.io/v1alpha2
Original file line number Diff line number Diff line change @@ -71,6 +71,9 @@ metadata:
71
71
" argocd.argoproj.io/sync-wave " : " 2"
72
72
spec :
73
73
version : v0.2.6
74
+ configSecret :
75
+ name : test-secret-name
76
+ namespace : test-secret-namespace
74
77
---
75
78
# Source: cluster-api-operator/templates/bootstrap.yaml
76
79
apiVersion : operator.cluster.x-k8s.io/v1alpha2
You can’t perform that action at this time.
0 commit comments