Skip to content

Commit 4e0f131

Browse files
rbjorklinkahirokunn
authored andcommitted
feat: make it possible to define fetchConfig per component
1 parent c76171f commit 4e0f131

File tree

7 files changed

+52
-133
lines changed

7 files changed

+52
-133
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ spec:
4343
{{- if $addon.manifestPatches }}
4444
manifestPatches: {{ toYaml $addon.manifestPatches | nindent 4 }}
4545
{{- end }}
46+
{{- if $addon.fetchConfig }}
47+
fetchConfig: {{ toYaml $addon.fetchConfig | nindent 4 }}
48+
{{- end }}
4649
{{- if $addon.additionalManifests }}
4750
additionalManifests:
4851
name: {{ $addon.additionalManifests.name }}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ spec:
4545
{{- if $bootstrap.manifestPatches }}
4646
manifestPatches: {{ toYaml $bootstrap.manifestPatches | nindent 4 }}
4747
{{- end }}
48+
{{- if $bootstrap.fetchConfig }}
49+
fetchConfig: {{ toYaml $bootstrap.fetchConfig | nindent 4 }}
50+
{{- end }}
4851
{{- if $bootstrap.additionalManifests }}
4952
additionalManifests:
5053
name: {{ $bootstrap.additionalManifests.name }}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ spec:
5858
{{- if $controlPlane.manifestPatches }}
5959
manifestPatches: {{ toYaml $controlPlane.manifestPatches | nindent 4 }}
6060
{{- end }}
61+
{{- if $controlPlane.fetchConfig }}
62+
fetchConfig: {{ toYaml $controlPlane.fetchConfig | nindent 4 }}
63+
{{- end }}
6164
{{- if $controlPlane.additionalManifests }}
6265
additionalManifests:
6366
name: {{ $controlPlane.additionalManifests.name }}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ spec:
5454
{{- if $core.manifestPatches }}
5555
manifestPatches: {{ toYaml $core.manifestPatches | nindent 4 }}
5656
{{- end }}
57+
{{- if $core.fetchConfig }}
58+
fetchConfig: {{ toYaml $core.fetchConfig | nindent 4 }}
59+
{{- end }}
5760
{{- if $core.additionalManifests }}
5861
additionalManifests:
5962
name: {{ $core.additionalManifests.name }}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ spec:
7171
{{- if $infra.manifestPatches }}
7272
manifestPatches: {{- toYaml $infra.manifestPatches | nindent 4 }}
7373
{{- end }} {{/* if $infra.manifestPatches */}}
74+
{{- if $infra.fetchConfig }}
75+
fetchConfig: {{ toYaml $infra.fetchConfig | nindent 4 }}
76+
{{- end }}
7477
{{- if $infra.additionalManifests }}
7578
additionalManifests:
7679
name: {{ $infra.additionalManifests.name }}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ spec:
6868
{{- if $ipam.manifestPatches }}
6969
manifestPatches: {{ toYaml $ipam.manifestPatches | nindent 4 }}
7070
{{- end }}
71+
{{- if $ipam.fetchConfig }}
72+
fetchConfig: {{ toYaml $ipam.fetchConfig | nindent 4 }}
73+
{{- end }}
7174
{{- if $.Values.additionalDeployments }}
7275
additionalDeployments: {{ toYaml $.Values.additionalDeployments | nindent 4 }}
7376
{{- end }}

hack/charts/cluster-api-operator/values.schema.json

Lines changed: 34 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -2,150 +2,51 @@
22
"$schema": "https://json-schema.org/draft/2020-12/schema#",
33
"type": "object",
44
"properties": {
5-
"logLevel": {
6-
"type": "integer",
7-
"default": 2
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."
89
},
9-
"replicaCount": {
10-
"type": "integer",
11-
"default": 1
10+
"core": {
11+
"oneOf": [
12+
{ "type": "object" },
13+
{ "type": "null" }
14+
]
1215
},
13-
"leaderElection": {
16+
"bootstrap": {
1417
"type": "object",
15-
"properties": {
16-
"enabled": {
17-
"type": "boolean",
18-
"default": true
19-
},
20-
"leaseDuration": {
21-
"type": "string"
22-
},
23-
"renewDeadline": {
24-
"type": "string"
25-
},
26-
"retryPeriod": {
27-
"type": "string"
28-
}
29-
}
18+
"oneOf": [
19+
{ "type": "object" },
20+
{ "type": "null" }
21+
]
3022
},
31-
"image": {
23+
"controlPlane": {
3224
"type": "object",
33-
"properties": {
34-
"manager": {
35-
"type": "object",
36-
"properties": {
37-
"repository": {
38-
"type": "string"
39-
},
40-
"tag": {
41-
"type": "string"
42-
},
43-
"pullPolicy": {
44-
"type": "string",
45-
"enum": ["Always", "IfNotPresent", "Never"]
46-
},
47-
"registry": {
48-
"type": "string"
49-
},
50-
"digest": {
51-
"type": "string"
52-
}
53-
}
54-
}
55-
}
25+
"oneOf": [
26+
{ "type": "object" },
27+
{ "type": "null" }
28+
]
5629
},
57-
"env": {
30+
"infrastructure": {
5831
"type": "object",
59-
"properties": {
60-
"manager": {
61-
"type": "array"
62-
}
63-
}
64-
},
65-
"diagnosticsAddress": {
66-
"type": "string",
67-
"default": ":8443"
68-
},
69-
"healthAddr": {
70-
"type": "string",
71-
"default": ":9440"
72-
},
73-
"profilerAddress": {
74-
"type": "string",
75-
"default": ":6060"
76-
},
77-
"contentionProfiling": {
78-
"type": "boolean",
79-
"default": false
80-
},
81-
"insecureDiagnostics": {
82-
"type": "boolean",
83-
"default": false
32+
"oneOf": [
33+
{ "type": "object" },
34+
{ "type": "null" }
35+
]
8436
},
85-
"watchConfigSecret": {
86-
"type": "boolean",
87-
"default": false
88-
},
89-
"imagePullSecrets": {
90-
"type": "object"
91-
},
92-
"resources": {
37+
"addon": {
9338
"type": "object",
94-
"properties": {
95-
"manager": {
96-
"type": "object"
97-
}
98-
}
99-
},
100-
"containerSecurityContext": {
101-
"type": "object"
102-
},
103-
"affinity": {
104-
"type": "object"
105-
},
106-
"tolerations": {
107-
"type": "array"
39+
"oneOf": [
40+
{ "type": "object" },
41+
{ "type": "null" }
42+
]
10843
},
109-
"volumes": {
110-
"type": "array"
111-
},
112-
"volumeMounts": {
44+
"ipam": {
11345
"type": "object",
114-
"properties": {
115-
"manager": {
116-
"type": "array"
117-
}
118-
}
119-
},
120-
"deploymentLabels": {
121-
"type": "object"
122-
},
123-
"deploymentAnnotations": {
124-
"type": "object"
125-
},
126-
"podLabels": {
127-
"type": "object"
128-
},
129-
"podAnnotations": {
130-
"type": "object"
131-
},
132-
"securityContext": {
133-
"type": "object"
134-
},
135-
"strategy": {
136-
"type": "object"
137-
},
138-
"nodeSelector": {
139-
"type": "object"
140-
},
141-
"topologySpreadConstraints": {
142-
"type": "array"
143-
},
144-
"podDnsPolicy": {
145-
"type": "string"
146-
},
147-
"podDnsConfig": {
148-
"type": "object"
46+
"oneOf": [
47+
{ "type": "object" },
48+
{ "type": "null" }
49+
]
14950
}
15051
}
15152
}

0 commit comments

Comments
 (0)