Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions hack/charts/cluster-api-operator/templates/addon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ spec:
{{- if $addon.manifestPatches }}
manifestPatches: {{ toYaml $addon.manifestPatches | nindent 4 }}
{{- end }}
{{- if and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $addonName) }}
fetchConfig:
{{- index $.Values.fetchConfig $addonName | toYaml | nindent 4 }}
{{- end }}
{{- if $addon.additionalManifests }}
additionalManifests:
name: {{ $addon.additionalManifests.name }}
Expand Down
4 changes: 4 additions & 0 deletions hack/charts/cluster-api-operator/templates/bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ spec:
{{- if $bootstrap.manifestPatches }}
manifestPatches: {{ toYaml $bootstrap.manifestPatches | nindent 4 }}
{{- end }}
{{- if and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $bootstrapName) }}
fetchConfig:
{{- index $.Values.fetchConfig $bootstrapName | toYaml | nindent 4 }}
{{- end }}
{{- if $bootstrap.additionalManifests }}
additionalManifests:
name: {{ $bootstrap.additionalManifests.name }}
Expand Down
8 changes: 6 additions & 2 deletions hack/charts/cluster-api-operator/templates/control-plane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ spec:
{{- range $key, $value := $.Values.manager.featureGates }}
{{- if eq $key $controlPlaneName }}
featureGates:
{{- range $k, $v := $value }}
{{ $k }}: {{ $v }}
{{- range $key, $value := $value }}
{{ $key }}: {{ $value }}
{{- end }}
{{- end }}
{{- end }}
Expand All @@ -57,6 +57,10 @@ spec:
{{- if $controlPlane.manifestPatches }}
manifestPatches: {{ toYaml $controlPlane.manifestPatches | nindent 4 }}
{{- end }}
{{- if and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $controlPlaneName) }}
fetchConfig:
{{- index $.Values.fetchConfig $controlPlaneName | toYaml | nindent 4 }}
{{- end }}
{{- if $controlPlane.additionalManifests }}
additionalManifests:
name: {{ $controlPlane.additionalManifests.name }}
Expand Down
4 changes: 4 additions & 0 deletions hack/charts/cluster-api-operator/templates/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ spec:
{{- if $core.manifestPatches }}
manifestPatches: {{ toYaml $core.manifestPatches | nindent 4 }}
{{- end }}
{{- if and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $coreName) }}
fetchConfig:
{{- index $.Values.fetchConfig $coreName | toYaml | nindent 4 }}
{{- end }}
{{- if $core.additionalManifests }}
additionalManifests:
name: {{ $core.additionalManifests.name }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if .Values.infrastructure }}

# Deploy bootstrap, and infrastructure components if not specified
# Deploy bootstrap, and control plane components if not specified
{{- if not .Values.bootstrap }}
---
apiVersion: v1
Expand Down
12 changes: 3 additions & 9 deletions hack/charts/cluster-api-operator/templates/infra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,16 @@ spec:
{{- range $key, $value := $.Values.manager.featureGates }}
{{- if eq $key $infrastructureName }}
featureGates:
{{- range $k, $v := $value }}
{{ $k }}: {{ $v }}
{{- range $key, $value := $value }}
{{ $key }}: {{ $value }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $infrastructureName) }}
{{- range $key, $value := $.Values.fetchConfig }}
{{- if eq $key $infrastructureName }}
fetchConfig:
{{- range $k, $v := $value }}
{{ $k }}: {{ $v }}
{{- end }}
{{- end }}
{{- end }}
{{- index $.Values.fetchConfig $infrastructureName | toYaml | nindent 4 }}
{{- end }}
{{- if $.Values.configSecret.name }}
configSecret:
Expand Down
12 changes: 3 additions & 9 deletions hack/charts/cluster-api-operator/templates/ipam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,16 @@ spec:
{{- range $key, $value := $.Values.manager.featureGates }}
{{- if eq $key $ipamName }}
featureGates:
{{- range $k, $v := $value }}
{{ $k }}: {{ $v }}
{{- range $key, $value := $value }}
{{ $key }}: {{ $value }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $ipamName) }}
{{- range $key, $value := $.Values.fetchConfig }}
{{- if eq $key $ipamName }}
fetchConfig:
{{- range $k, $v := $value }}
{{ $k }}: {{ $v }}
{{- end }}
{{- end }}
{{- end }}
{{- index $.Values.fetchConfig $ipamName | toYaml | nindent 4 }}
{{- end }}
{{- if $.Values.configSecret.name }}
configSecret:
Expand Down
12 changes: 12 additions & 0 deletions hack/charts/cluster-api-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@
{ "type": "object" },
{ "type": "null" }
]
},
"fetchConfig": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"oci": { "type": "string" },
"selector": { "type": "object" },
"url": { "type": "string" }
},
"additionalProperties": false
}
}
}
}
4 changes: 4 additions & 0 deletions hack/charts/cluster-api-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ manager.featureGates: {}
# kubeadm:
# ClusterTopology: true
fetchConfig: {}
# k3s: # Name, required, must match any provider type name
# oci: "" # Optional
# selector: {} # Optional
# url: "" # Optional
# ---
# Common configuration secret options
configSecret: {}
Expand Down