diff --git a/charts/capi-operator-providers-config/.helmignore b/charts/capi-operator-providers-config/.helmignore new file mode 100644 index 000000000..619a667fe --- /dev/null +++ b/charts/capi-operator-providers-config/.helmignore @@ -0,0 +1,27 @@ +# SPDX-FileCopyrightText: 2025 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 + +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/capi-operator-providers-config/Chart.yaml b/charts/capi-operator-providers-config/Chart.yaml new file mode 100644 index 000000000..777da9e18 --- /dev/null +++ b/charts/capi-operator-providers-config/Chart.yaml @@ -0,0 +1,9 @@ +# SPDX-FileCopyrightText: 2025 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +--- +apiVersion: v1 +description: A Helm chart for capi providers configuration via capi operators CRs +name: capi-providers-config +version: 0.0.1 +appVersion: "0.0.1" diff --git a/charts/capi-operator-providers-config/templates/bootstrap-provider.yaml b/charts/capi-operator-providers-config/templates/bootstrap-provider.yaml new file mode 100644 index 000000000..09483a2e3 --- /dev/null +++ b/charts/capi-operator-providers-config/templates/bootstrap-provider.yaml @@ -0,0 +1,11 @@ +# SPDX-FileCopyrightText: 2025 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +--- +apiVersion: operator.cluster.x-k8s.io/v1alpha2 +kind: BootstrapProvider +metadata: + name: {{ .Values.bootstrap.name }} + namespace: {{ .Values.bootstrap.namespace }} +spec: + {{- toYaml .Values.bootstrap.spec | nindent 2 }} \ No newline at end of file diff --git a/charts/capi-operator-providers-config/templates/controlplane-provider.yaml b/charts/capi-operator-providers-config/templates/controlplane-provider.yaml new file mode 100644 index 000000000..847be0c8d --- /dev/null +++ b/charts/capi-operator-providers-config/templates/controlplane-provider.yaml @@ -0,0 +1,11 @@ +# SPDX-FileCopyrightText: 2025 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +--- +apiVersion: operator.cluster.x-k8s.io/v1alpha2 +kind: ControlPlaneProvider +metadata: + name: {{ .Values.controlplane.name }} + namespace: {{ .Values.controlplane.namespace }} +spec: + {{- toYaml .Values.controlplane.spec | nindent 2 }} \ No newline at end of file diff --git a/charts/capi-operator-providers-config/templates/core-provider.yaml b/charts/capi-operator-providers-config/templates/core-provider.yaml new file mode 100644 index 000000000..41d2f4fc6 --- /dev/null +++ b/charts/capi-operator-providers-config/templates/core-provider.yaml @@ -0,0 +1,11 @@ +# SPDX-FileCopyrightText: 2025 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +--- +apiVersion: operator.cluster.x-k8s.io/v1alpha2 +kind: CoreProvider +metadata: + name: {{ .Values.core.name }} + namespace: {{ .Values.core.namespace }} +spec: + {{- toYaml .Values.core.spec | nindent 2 }} \ No newline at end of file diff --git a/charts/capi-operator-providers-config/templates/namespaces.yaml b/charts/capi-operator-providers-config/templates/namespaces.yaml new file mode 100644 index 000000000..6aeee3a37 --- /dev/null +++ b/charts/capi-operator-providers-config/templates/namespaces.yaml @@ -0,0 +1,14 @@ +# SPDX-FileCopyrightText: 2025 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +--- +{{- $namespaces := list .Values.core.namespace .Values.bootstrap.namespace .Values.controlplane.namespace | uniq }} +{{- range $namespace := $namespaces }} +{{- if $namespace }} +apiVersion: v1 +kind: Namespace +metadata: + name: {{ $namespace }} +--- +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/capi-operator-providers-config/values.yaml b/charts/capi-operator-providers-config/values.yaml new file mode 100644 index 000000000..3650807f8 --- /dev/null +++ b/charts/capi-operator-providers-config/values.yaml @@ -0,0 +1,37 @@ +# SPDX-FileCopyrightText: 2025 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +--- + +# CAPI providers are deployed via CAPI operator and configured via its CRds +# the helmchart .spec is passed unmodified to the CRD .spec + +# https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api-operator/operator.cluster.x-k8s.io/CoreProvider/v1alpha2@v0.15.1 +core: + name: cluster-api + namespace: capi-system + spec: + version: "v1.9.0" + configSecret: + namespace: capi-variables + name: capi-variables + +# https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api-operator/operator.cluster.x-k8s.io/BootstrapProvider/v1alpha2@v0.15.1 +bootstrap: + name: rke2 + namespace: capr-system + spec: + version: v0.12.0 + configSecret: + namespace: capi-variables + name: capi-variables + +# https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api-operator/operator.cluster.x-k8s.io/ControlPlaneProvider/v1alpha2@v0.15.1 +controlplane: + name: rke2 + namespace: capr-system + spec: + version: v0.12.0 + configSecret: + namespace: capi-variables + name: capi-variables