diff --git a/.github/workflows/smoke-test.yaml b/.github/workflows/smoke-test.yaml new file mode 100644 index 000000000..67806b0d4 --- /dev/null +++ b/.github/workflows/smoke-test.yaml @@ -0,0 +1,232 @@ +name: Smoke Test + +on: + pull_request: + branches: [main, 'release-*'] + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + +env: + CLUSTER_NAME: capi-quickstart + KIND_CLUSTER_NAME: capi-operator-smoke-test + KUBERNETES_VERSION: v1.33.0 + CONTROLLER_IMG: cluster-api-operator + TAG: smoke-test + ARCH: amd64 + +jobs: + smoke-test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + + - name: Install tools + run: | + # kubectl + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${ARCH}/kubectl" + chmod +x kubectl && sudo mv kubectl /usr/local/bin/ + + # yq + wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_${ARCH} -O yq + chmod +x yq && sudo mv yq /usr/local/bin/ + + # helm + curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash + + # clusterctl + VERSION=v1.11.1 + curl -L "https://github.com/kubernetes-sigs/cluster-api/releases/download/${VERSION}/clusterctl-linux-${ARCH}" -o clusterctl + sudo install -o root -g root -m 0755 clusterctl /usr/local/bin/clusterctl + clusterctl version + + - name: Build Docker image + run: | + make docker-build + docker tag ${CONTROLLER_IMG}-${ARCH}:${TAG} ${CONTROLLER_IMG}:${TAG} + + - name: Build charts + run: | + make release-chart + echo "HELM_CHART_TAG=$(make -s -f Makefile -p | grep '^HELM_CHART_TAG :=' | cut -d' ' -f3)" >> $GITHUB_ENV + + - name: Create kind cluster + run: | + chmod +x ./hack/ensure-kind.sh + ./hack/ensure-kind.sh + + cat < /tmp/kind-config.yaml + kind: Cluster + apiVersion: kind.x-k8s.io/v1alpha4 + networking: + ipFamily: ipv4 + nodes: + - role: control-plane + extraMounts: + - hostPath: /var/run/docker.sock + containerPath: /var/run/docker.sock + containerdConfigPatches: + - |- + [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"] + endpoint = ["https://mirror.gcr.io", "https://registry-1.docker.io"] + EOF + + kind create cluster --name ${KIND_CLUSTER_NAME} --config /tmp/kind-config.yaml --wait 5m + kind load docker-image ${CONTROLLER_IMG}:${TAG} --name ${KIND_CLUSTER_NAME} + + - name: Install cert-manager + run: | + helm repo add jetstack https://charts.jetstack.io + helm repo update + helm install cert-manager jetstack/cert-manager \ + --namespace cert-manager \ + --create-namespace \ + --set installCRDs=true \ + --wait \ + --timeout 5m + + - name: Install Cluster API Operator + run: | + CHART_PACKAGE="out/package/cluster-api-operator-${HELM_CHART_TAG}.tgz" + helm install capi-operator "$CHART_PACKAGE" \ + --create-namespace \ + -n capi-operator-system \ + --set image.manager.repository=${CONTROLLER_IMG} \ + --set image.manager.tag=${TAG} \ + --set image.manager.pullPolicy=IfNotPresent \ + --wait \ + --timeout 90s + + - name: Deploy providers + run: | + cat < /tmp/providers-values.yaml + core: + cluster-api: + namespace: capi-system + bootstrap: + kubeadm: + namespace: capi-kubeadm-bootstrap-system + controlPlane: + kubeadm: + namespace: capi-kubeadm-control-plane-system + infrastructure: + docker: + namespace: capd-system + manager: + featureGates: + core: + ClusterTopology: true + ClusterResourceSet: true + MachinePool: true + kubeadm: + ClusterTopology: true + MachinePool: true + docker: + ClusterTopology: true + EOF + + PROVIDERS_CHART_PACKAGE="out/package/cluster-api-operator-providers-${HELM_CHART_TAG}.tgz" + helm install capi-providers "$PROVIDERS_CHART_PACKAGE" \ + -f /tmp/providers-values.yaml \ + --set cluster-api-operator.install=false \ + --set enableHelmHook=false \ + --wait + + - name: Wait for providers + run: | + kubectl wait --for=condition=Ready --timeout=300s -n capi-system coreprovider/cluster-api + kubectl wait --for=condition=Ready --timeout=300s -n capi-kubeadm-bootstrap-system bootstrapprovider/kubeadm + kubectl wait --for=condition=Ready --timeout=300s -n capi-kubeadm-control-plane-system controlplaneprovider/kubeadm + kubectl wait --for=condition=Ready --timeout=300s -n capd-system infrastructureprovider/docker + + kubectl wait --for=condition=Available --timeout=300s -n capi-system deployment/capi-controller-manager + kubectl wait --for=condition=Available --timeout=300s -n capi-kubeadm-bootstrap-system deployment/capi-kubeadm-bootstrap-controller-manager + kubectl wait --for=condition=Available --timeout=300s -n capi-kubeadm-control-plane-system deployment/capi-kubeadm-control-plane-controller-manager + kubectl wait --for=condition=Available --timeout=300s -n capd-system deployment/capd-controller-manager + + - name: Verify providers + run: | + kubectl get coreprovider,bootstrapprovider,controlplaneprovider,infrastructureprovider -A + kubectl get pods -A | grep -E "(capi-|capd-)" + + - name: Create workload cluster + run: | + clusterctl generate cluster ${CLUSTER_NAME} \ + --infrastructure docker:v1.10.0 \ + --flavor development \ + --kubernetes-version ${KUBERNETES_VERSION} \ + --control-plane-machine-count=1 \ + --worker-machine-count=2 \ + > capi-quickstart.yaml + + kubectl apply -f capi-quickstart.yaml + + - name: Get workload cluster kubeconfig + run: | + timeout 300s bash -c "until kubectl get secret ${CLUSTER_NAME}-kubeconfig -n default &>/dev/null; do sleep 2; done" + clusterctl get kubeconfig ${CLUSTER_NAME} --namespace default > ${CLUSTER_NAME}.kubeconfig + echo "KUBECONFIG=$(pwd)/${CLUSTER_NAME}.kubeconfig" >> $GITHUB_ENV + + - name: Wait for workload cluster API server + run: | + timeout 300s bash -c "until kubectl cluster-info &>/dev/null; do sleep 5; done" + + - name: Install CNI + run: | + kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/calico.yaml + kubectl wait --for=condition=Ready --timeout=300s pods -n tigera-operator -l app.kubernetes.io/name=tigera-operator || true + kubectl wait --for=condition=Ready --timeout=300s pods -n calico-system --all || true + + - name: Wait for nodes + run: | + kubectl wait --for=condition=Ready --timeout=300s nodes --all + kubectl get nodes -o wide + + - name: Verify cluster + run: | + kubectl get po -A + kubectl wait --for=condition=Ready --timeout=300s pods -n kube-system -l k8s-app=kube-proxy + kubectl wait --for=condition=Ready --timeout=300s pods -n kube-system -l component=kube-apiserver + kubectl wait --for=condition=Ready --timeout=300s pods -n kube-system -l component=kube-controller-manager + kubectl wait --for=condition=Ready --timeout=300s pods -n kube-system -l component=kube-scheduler + + - name: Collect logs on failure + if: failure() + run: | + echo "=== Recent Events ===" + kubectl get events -A --sort-by='.lastTimestamp' | tail -50 + + echo -e "\n=== Provider Logs ===" + kubectl logs -n capi-operator-system deployment/capi-operator-cluster-api-operator --tail=50 || true + kubectl logs -n capi-system deployment/capi-controller-manager --tail=50 || true + kubectl logs -n capd-system deployment/capd-controller-manager --tail=50 || true + + echo -e "\n=== Cluster Resources ===" + kubectl get cluster,dockercluster,kubeadmcontrolplane,machine,dockermachine -A -o wide || true + + echo -e "\n=== Failed Pods ===" + kubectl get pods -A | grep -v Running | grep -v Completed || true + + if [ -f "${CLUSTER_NAME}.kubeconfig" ]; then + export KUBECONFIG=$(pwd)/${CLUSTER_NAME}.kubeconfig + echo -e "\n=== Workload Cluster Status ===" + kubectl get nodes -o wide || true + kubectl get pods -A --field-selector=status.phase!=Running,status.phase!=Succeeded || true + fi + + - name: Cleanup + if: always() + run: | + kind delete cluster --name ${CLUSTER_NAME} || true + kind delete cluster --name ${KIND_CLUSTER_NAME} || true diff --git a/.gitignore b/.gitignore index 0b5cb6c04..ac24f7cd2 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,5 @@ _releasenotes # Helm .helm +Chart.lock +hack/charts/cluster-api-operator-providers/charts diff --git a/Makefile b/Makefile index a0eb31393..37dc46445 100644 --- a/Makefile +++ b/Makefile @@ -180,6 +180,7 @@ endif RELEASE_ALIAS_TAG ?= $(PULL_BASE_REF) RELEASE_DIR := $(ROOT)/out CHART_DIR := $(RELEASE_DIR)/charts/cluster-api-operator +CHART_PROVIDERS_DIR := $(RELEASE_DIR)/charts/cluster-api-operator-providers CHART_PACKAGE_DIR := $(RELEASE_DIR)/package # Set --output-base for conversion-gen if we are not within GOPATH @@ -455,6 +456,9 @@ $(CHART_DIR): $(CHART_PACKAGE_DIR): mkdir -p $(CHART_PACKAGE_DIR) +$(CHART_PROVIDERS_DIR): + mkdir -p $(CHART_PROVIDERS_DIR)/templates + .PHONY: release release: clean-release $(RELEASE_DIR) ## Builds and push container images using the latest git tag for the commit. @if [ -z "${RELEASE_TAG}" ]; then echo "RELEASE_TAG is not set"; exit 1; fi @@ -485,11 +489,16 @@ release-manifests: $(KUSTOMIZE) $(RELEASE_DIR) ## Builds the manifests to publis $(KUSTOMIZE) build ./config/default > $(RELEASE_DIR)/operator-components.yaml .PHONY: release-chart -release-chart: $(HELM) $(KUSTOMIZE) $(RELEASE_DIR) $(CHART_DIR) $(CHART_PACKAGE_DIR) ## Builds the chart to publish with a release +release-chart: $(HELM) $(KUSTOMIZE) $(RELEASE_DIR) $(CHART_DIR) $(CHART_PROVIDERS_DIR) $(CHART_PACKAGE_DIR) ## Builds the chart to publish with a release + # Processing the cluster-api-operator chart cp -rf $(ROOT)/hack/charts/cluster-api-operator/. $(CHART_DIR) $(KUSTOMIZE) build ./config/chart > $(CHART_DIR)/templates/operator-components.yaml $(HELM) package $(CHART_DIR) --app-version=$(HELM_CHART_TAG) --version=$(HELM_CHART_TAG) --destination=$(CHART_PACKAGE_DIR) + # Processing the cluster-api-operator-providers chart + cp -rf $(ROOT)/hack/charts/cluster-api-operator-providers/. $(CHART_PROVIDERS_DIR) + $(HELM) package $(CHART_PROVIDERS_DIR) --app-version=$(HELM_CHART_TAG) --version=$(HELM_CHART_TAG) --destination=$(CHART_PACKAGE_DIR) + .PHONY: release-staging release-staging: ## Builds and push container images and manifests to the staging bucket. $(MAKE) docker-build-all diff --git a/hack/chart-update/main.go b/hack/chart-update/main.go index 3d55138ef..7cb6901fa 100644 --- a/hack/chart-update/main.go +++ b/hack/chart-update/main.go @@ -24,6 +24,24 @@ const ( repoName = "cluster-api-operator" ) +// chartInfo represents information about a chart to be processed +type chartInfo struct { + name string + description string +} + +// List of charts to process +var charts = []chartInfo{ + { + name: "cluster-api-operator", + description: "Cluster API Operator", + }, + { + name: "cluster-api-operator-providers", + description: "Cluster API Provider Custom Resources", + }, +} + func main() { fmt.Println("šŸš€ Starting index.yaml update tool") @@ -38,45 +56,66 @@ func main() { fmt.Println("āš™ļø Loading index.yaml file from repo root directory") - indexFile := loadIndexFile(tag) + indexFile := loadIndexFile() + + fmt.Println("šŸ”Ž Finding chart archives in release assets") - fmt.Println("šŸ”Ž Finding chart archive in release assets") + // Get all release assets once + releaseAssets := getReleaseAssets(tag) - chartAsset := findChartReleaseAsset(tag) + // Process each chart + processedCharts := 0 + for _, chartInfo := range charts { + fmt.Printf("\nšŸ“Š Processing chart: %s\n", chartInfo.name) - fmt.Println("šŸ“¦ Downloading chart archive to a temp directory") + // Check if chart already exists in index + if _, err := indexFile.Get(chartInfo.name, tag[1:]); err == nil { + fmt.Printf("āœ… Chart %s already exists in index file, skipping\n", chartInfo.name) + continue + } - archivePath, chart := downloadChart(chartAsset) + // Find chart asset + chartAsset := findChartAsset(releaseAssets, chartInfo.name, tag) + if chartAsset == nil { + fmt.Printf("āš ļø Chart archive for %s not found in release assets, skipping\n", chartInfo.name) + continue + } + + fmt.Printf("šŸ“¦ Downloading %s chart archive to a temp directory\n", chartInfo.name) + archivePath, chart := downloadChart(chartAsset) + + fmt.Printf("šŸ‘‰šŸ» Adding %s entry to index.yaml\n", chartInfo.name) + addEntryToIndexFile(indexFile, chartAsset, archivePath, chart) + + processedCharts++ + } - fmt.Println("šŸ‘‰šŸ» Adding entry to index.yaml") - addEntryToIndexFile(indexFile, chartAsset, archivePath, chart) + if processedCharts == 0 { + fmt.Println("\nāš ļø No new charts were added to index.yaml") + os.Exit(0) + } - fmt.Println("šŸ“ Writing index.yaml file to repo root directory") + fmt.Println("\nšŸ“ Writing index.yaml file to repo root directory") if err := indexFile.WriteFile(indexFilePath, 0644); err != nil { fmt.Println("āŒ Error writing index file: ", err) os.Exit(1) } - fmt.Println("āœ… Done updating index.yaml file") + fmt.Printf("\nāœ… Done updating index.yaml file. Added %d chart(s)\n", processedCharts) } -func loadIndexFile(tag string) *repo.IndexFile { +func loadIndexFile() *repo.IndexFile { indexFile, err := repo.LoadIndexFile(indexFilePath) if err != nil { fmt.Println("āŒ Error loading index file: ", err) os.Exit(1) } - if _, err := indexFile.Get(repoName, tag[1:]); err == nil { - fmt.Println("āœ… Chart already exists in index file, no need to update") - os.Exit(0) - } - return indexFile } -func findChartReleaseAsset(tag string) *github.ReleaseAsset { +func getReleaseAssets(tag string) []*github.ReleaseAsset { ghClient := github.NewClient(nil) release, _, err := ghClient.Repositories.GetReleaseByTag(context.TODO(), gitHubOrgName, repoName, tag) @@ -85,22 +124,19 @@ func findChartReleaseAsset(tag string) *github.ReleaseAsset { os.Exit(1) } - chartAsset := &github.ReleaseAsset{} - found := false - for _, asset := range release.Assets { - if *asset.Name == fmt.Sprintf("%s-%s.tgz", repoName, tag[1:]) { - chartAsset = asset - found = true - break - } - } + return release.Assets +} - if !found { - fmt.Printf("āŒ Chart archive not found in release assets for release %s, please check if release was published correctly\n", tag) - os.Exit(1) +func findChartAsset(assets []*github.ReleaseAsset, chartName, tag string) *github.ReleaseAsset { + expectedFileName := fmt.Sprintf("%s-%s.tgz", chartName, tag[1:]) + + for _, asset := range assets { + if *asset.Name == expectedFileName { + return asset + } } - return chartAsset + return nil } func downloadChart(chartAsset *github.ReleaseAsset) (string, *chart.Chart) { diff --git a/hack/charts/cluster-api-operator-providers/.helmignore b/hack/charts/cluster-api-operator-providers/.helmignore new file mode 100644 index 000000000..0e8a0eb36 --- /dev/null +++ b/hack/charts/cluster-api-operator-providers/.helmignore @@ -0,0 +1,23 @@ +# 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/hack/charts/cluster-api-operator-providers/Chart.yaml b/hack/charts/cluster-api-operator-providers/Chart.yaml new file mode 100644 index 000000000..994567bb0 --- /dev/null +++ b/hack/charts/cluster-api-operator-providers/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: cluster-api-operator-providers +description: Cluster API Provider Custom Resources +type: application +version: 0.0.0 +appVersion: "0.0.0" diff --git a/hack/charts/cluster-api-operator-providers/templates/_helpers.tpl b/hack/charts/cluster-api-operator-providers/templates/_helpers.tpl new file mode 100644 index 000000000..a4c8b733d --- /dev/null +++ b/hack/charts/cluster-api-operator-providers/templates/_helpers.tpl @@ -0,0 +1,24 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "capi-operator.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "capi-operator.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} diff --git a/hack/charts/cluster-api-operator/templates/addon.yaml b/hack/charts/cluster-api-operator-providers/templates/addon.yaml similarity index 95% rename from hack/charts/cluster-api-operator/templates/addon.yaml rename to hack/charts/cluster-api-operator-providers/templates/addon.yaml index 43a705c3f..076d3b322 100644 --- a/hack/charts/cluster-api-operator/templates/addon.yaml +++ b/hack/charts/cluster-api-operator-providers/templates/addon.yaml @@ -43,6 +43,9 @@ spec: {{- if $addon.manifestPatches }} manifestPatches: {{ toYaml $addon.manifestPatches | nindent 4 }} {{- end }} +{{- if $addon.fetchConfig }} + fetchConfig: {{ toYaml $addon.fetchConfig | nindent 4 }} +{{- end }} {{- if $addon.additionalManifests }} additionalManifests: name: {{ $addon.additionalManifests.name }} diff --git a/hack/charts/cluster-api-operator/templates/bootstrap.yaml b/hack/charts/cluster-api-operator-providers/templates/bootstrap.yaml similarity index 82% rename from hack/charts/cluster-api-operator/templates/bootstrap.yaml rename to hack/charts/cluster-api-operator-providers/templates/bootstrap.yaml index 65378bedc..5b78cfb5e 100644 --- a/hack/charts/cluster-api-operator/templates/bootstrap.yaml +++ b/hack/charts/cluster-api-operator-providers/templates/bootstrap.yaml @@ -28,22 +28,26 @@ metadata: "helm.sh/hook-weight": "2" {{- end }} "argocd.argoproj.io/sync-wave": "2" -{{- if or $bootstrapVersion $.Values.configSecret.name }} +{{- if or $bootstrapVersion $bootstrap.configSecret $.Values.configSecret.name }} spec: {{- end}} {{- if $bootstrapVersion }} version: {{ $bootstrapVersion }} {{- end }} -{{- if $.Values.configSecret.name }} +{{- $configSecret := default $.Values.configSecret $bootstrap.configSecret }} +{{- if $configSecret.name }} configSecret: - name: {{ $.Values.configSecret.name }} - {{- if $.Values.configSecret.namespace }} - namespace: {{ $.Values.configSecret.namespace }} + name: {{ $configSecret.name }} + {{- if $configSecret.namespace }} + namespace: {{ $configSecret.namespace }} {{- end }} {{- end }} {{- if $bootstrap.manifestPatches }} manifestPatches: {{ toYaml $bootstrap.manifestPatches | nindent 4 }} {{- end }} +{{- if $bootstrap.fetchConfig }} + fetchConfig: {{ toYaml $bootstrap.fetchConfig | nindent 4 }} +{{- end }} {{- if $bootstrap.additionalManifests }} additionalManifests: name: {{ $bootstrap.additionalManifests.name }} diff --git a/hack/charts/cluster-api-operator/templates/control-plane.yaml b/hack/charts/cluster-api-operator-providers/templates/control-plane.yaml similarity index 83% rename from hack/charts/cluster-api-operator/templates/control-plane.yaml rename to hack/charts/cluster-api-operator-providers/templates/control-plane.yaml index 33794af9a..30d5cd44b 100644 --- a/hack/charts/cluster-api-operator/templates/control-plane.yaml +++ b/hack/charts/cluster-api-operator-providers/templates/control-plane.yaml @@ -28,7 +28,7 @@ metadata: "helm.sh/hook-weight": "2" {{- end }} "argocd.argoproj.io/sync-wave": "2" -{{- if or $controlPlaneVersion $.Values.configSecret.name $.Values.manager }} +{{- if or $controlPlaneVersion $controlPlane.configSecret $.Values.configSecret.name $.Values.manager }} spec: {{- end}} {{- if $controlPlaneVersion }} @@ -47,16 +47,20 @@ spec: {{- end }} {{- end }} {{- end }} -{{- if $.Values.configSecret.name }} +{{- $configSecret := default $.Values.configSecret $controlPlane.configSecret }} +{{- if $configSecret.name }} configSecret: - name: {{ $.Values.configSecret.name }} - {{- if $.Values.configSecret.namespace }} - namespace: {{ $.Values.configSecret.namespace }} + name: {{ $configSecret.name }} + {{- if $configSecret.namespace }} + namespace: {{ $configSecret.namespace }} {{- end }} {{- end }} {{- if $controlPlane.manifestPatches }} manifestPatches: {{ toYaml $controlPlane.manifestPatches | nindent 4 }} {{- end }} +{{- if $controlPlane.fetchConfig }} + fetchConfig: {{ toYaml $controlPlane.fetchConfig | nindent 4 }} +{{- end }} {{- if $controlPlane.additionalManifests }} additionalManifests: name: {{ $controlPlane.additionalManifests.name }} diff --git a/hack/charts/cluster-api-operator/templates/core-conditions.yaml b/hack/charts/cluster-api-operator-providers/templates/core-conditions.yaml similarity index 100% rename from hack/charts/cluster-api-operator/templates/core-conditions.yaml rename to hack/charts/cluster-api-operator-providers/templates/core-conditions.yaml diff --git a/hack/charts/cluster-api-operator/templates/core.yaml b/hack/charts/cluster-api-operator-providers/templates/core.yaml similarity index 82% rename from hack/charts/cluster-api-operator/templates/core.yaml rename to hack/charts/cluster-api-operator-providers/templates/core.yaml index 57629497d..d805e7127 100644 --- a/hack/charts/cluster-api-operator/templates/core.yaml +++ b/hack/charts/cluster-api-operator-providers/templates/core.yaml @@ -28,7 +28,7 @@ metadata: "helm.sh/hook-weight": "2" {{- end }} "argocd.argoproj.io/sync-wave": "2" -{{- if or $coreVersion $.Values.configSecret.name $.Values.manager }} +{{- if or $coreVersion $core.configSecret $.Values.configSecret.name $.Values.manager }} spec: {{- end}} {{- if $coreVersion }} @@ -43,16 +43,20 @@ spec: {{- end }} {{- end }} {{- end }} -{{- if $.Values.configSecret.name }} +{{- $configSecret := default $.Values.configSecret $core.configSecret }} +{{- if $configSecret.name }} configSecret: - name: {{ $.Values.configSecret.name }} - {{- if $.Values.configSecret.namespace }} - namespace: {{ $.Values.configSecret.namespace }} + name: {{ $configSecret.name }} + {{- if $configSecret.namespace }} + namespace: {{ $configSecret.namespace }} {{- end }} {{- end }} {{- if $core.manifestPatches }} manifestPatches: {{ toYaml $core.manifestPatches | nindent 4 }} {{- end }} +{{- if $core.fetchConfig }} + fetchConfig: {{ toYaml $core.fetchConfig | nindent 4 }} +{{- end }} {{- if $core.additionalManifests }} additionalManifests: name: {{ $core.additionalManifests.name }} diff --git a/hack/charts/cluster-api-operator/templates/infra-conditions.yaml b/hack/charts/cluster-api-operator-providers/templates/infra-conditions.yaml similarity index 100% rename from hack/charts/cluster-api-operator/templates/infra-conditions.yaml rename to hack/charts/cluster-api-operator-providers/templates/infra-conditions.yaml diff --git a/hack/charts/cluster-api-operator/templates/infra.yaml b/hack/charts/cluster-api-operator-providers/templates/infra.yaml similarity index 86% rename from hack/charts/cluster-api-operator/templates/infra.yaml rename to hack/charts/cluster-api-operator-providers/templates/infra.yaml index 8e68b3bf8..735532a63 100644 --- a/hack/charts/cluster-api-operator/templates/infra.yaml +++ b/hack/charts/cluster-api-operator-providers/templates/infra.yaml @@ -28,7 +28,7 @@ metadata: "helm.sh/hook-weight": "2" {{- end }} "argocd.argoproj.io/sync-wave": "2" -{{- if or $infrastructureVersion $.Values.configSecret.name $.Values.manager $.Values.additionalDeployments }} +{{- if or $infrastructureVersion $infra.configSecret $.Values.configSecret.name $.Values.manager $.Values.additionalDeployments }} spec: {{- end }} {{- if $infrastructureVersion }} @@ -57,11 +57,12 @@ spec: {{- end }} {{- end }} {{- end }} -{{- if $.Values.configSecret.name }} +{{- $configSecret := default $.Values.configSecret $infra.configSecret }} +{{- if $configSecret.name }} configSecret: - name: {{ $.Values.configSecret.name }} - {{- if $.Values.configSecret.namespace }} - namespace: {{ $.Values.configSecret.namespace }} + name: {{ $configSecret.name }} + {{- if $configSecret.namespace }} + namespace: {{ $configSecret.namespace }} {{- end }} {{- end }} {{- if $.Values.additionalDeployments }} @@ -70,6 +71,9 @@ spec: {{- if $infra.manifestPatches }} manifestPatches: {{- toYaml $infra.manifestPatches | nindent 4 }} {{- end }} {{/* if $infra.manifestPatches */}} +{{- if $infra.fetchConfig }} + fetchConfig: {{ toYaml $infra.fetchConfig | nindent 4 }} +{{- end }} {{- if $infra.additionalManifests }} additionalManifests: name: {{ $infra.additionalManifests.name }} diff --git a/hack/charts/cluster-api-operator/templates/ipam.yaml b/hack/charts/cluster-api-operator-providers/templates/ipam.yaml similarity index 85% rename from hack/charts/cluster-api-operator/templates/ipam.yaml rename to hack/charts/cluster-api-operator-providers/templates/ipam.yaml index 314306ffc..b4e1d8500 100644 --- a/hack/charts/cluster-api-operator/templates/ipam.yaml +++ b/hack/charts/cluster-api-operator-providers/templates/ipam.yaml @@ -28,7 +28,7 @@ metadata: "helm.sh/hook-weight": "2" {{- end }} "argocd.argoproj.io/sync-wave": "2" -{{- if or $ipamVersion $.Values.configSecret.name $.Values.manager $.Values.additionalDeployments }} +{{- if or $ipamVersion $ipam.configSecret $.Values.configSecret.name $.Values.manager $.Values.additionalDeployments }} spec: {{- end }} {{- if $ipamVersion }} @@ -57,16 +57,20 @@ spec: {{- end }} {{- end }} {{- end }} -{{- if $.Values.configSecret.name }} +{{- $configSecret := default $.Values.configSecret $ipam.configSecret }} +{{- if $configSecret.name }} configSecret: - name: {{ $.Values.configSecret.name }} - {{- if $.Values.configSecret.namespace }} - namespace: {{ $.Values.configSecret.namespace }} + name: {{ $configSecret.name }} + {{- if $configSecret.namespace }} + namespace: {{ $configSecret.namespace }} {{- end }} {{- end }} {{- if $ipam.manifestPatches }} manifestPatches: {{ toYaml $ipam.manifestPatches | nindent 4 }} {{- end }} +{{- if $ipam.fetchConfig }} + fetchConfig: {{ toYaml $ipam.fetchConfig | nindent 4 }} +{{- end }} {{- if $.Values.additionalDeployments }} additionalDeployments: {{ toYaml $.Values.additionalDeployments | nindent 4 }} {{- end }} diff --git a/hack/charts/cluster-api-operator-providers/values.schema.json b/hack/charts/cluster-api-operator-providers/values.schema.json new file mode 100644 index 000000000..101fc5823 --- /dev/null +++ b/hack/charts/cluster-api-operator-providers/values.schema.json @@ -0,0 +1,74 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "type": "object", + "properties": { + "cluster-api-operator": { + "type": "object", + "properties": { + "install": { + "type": "boolean", + "default": true + } + } + }, + "core": { + "oneOf": [ + { "type": "object" }, + { "type": "null" } + ] + }, + "bootstrap": { + "type": "object", + "oneOf": [ + { "type": "object" }, + { "type": "null" } + ] + }, + "controlPlane": { + "type": "object", + "oneOf": [ + { "type": "object" }, + { "type": "null" } + ] + }, + "infrastructure": { + "type": "object", + "oneOf": [ + { "type": "object" }, + { "type": "null" } + ] + }, + "addon": { + "type": "object", + "oneOf": [ + { "type": "object" }, + { "type": "null" } + ] + }, + "ipam": { + "type": "object", + "oneOf": [ + { "type": "object" }, + { "type": "null" } + ] + }, + "manager": { + "type": "object", + "properties": { + "featureGates": { + "type": "object" + } + } + }, + "fetchConfig": { + "type": "object" + }, + "configSecret": { + "type": "object" + }, + "enableHelmHook": { + "type": "boolean", + "default": false + } + } +} diff --git a/hack/charts/cluster-api-operator-providers/values.yaml b/hack/charts/cluster-api-operator-providers/values.yaml new file mode 100644 index 000000000..0d1415da8 --- /dev/null +++ b/hack/charts/cluster-api-operator-providers/values.yaml @@ -0,0 +1,57 @@ +--- +# Cluster API Operator installation control +cluster-api-operator: + install: true + +# Cluster API provider options +core: {} +# cluster-api: {} # Name, required +# namespace: "" # Optional +# version: "" # Optional +# createNamespace: true # Optional +bootstrap: {} +# kubeadm: {} # Name, required +# namespace: "" # Optional +# version: "" # Optional +# createNamespace: true # Optional +controlPlane: {} +# kubeadm: {} # Name, required +# namespace: "" # Optional +# version: "" # Optional +# createNamespace: true # Optional +infrastructure: {} +# docker: {} # Name, required +# namespace: "" # Optional +# version: "" # Optional +# createNamespace: true # Optional +# configSecret: # Optional +# name: some-secret # Optional +# namespace: default # Optional +addon: {} +# helm: {} # Name, required +# namespace: "" # Optional +# version: "" # Optional +# createNamespace: true # Optional +ipam: {} +# in-cluster: {} # Name, required +# namespace: "" # Optional +# version: "" # Optional +# createNamespace: true # Optional +manager: + featureGates: {} +# Configuration for enabling feature gates in different providers +# manager: +# featureGates: +# proxmox: # Name of the provider +# ClusterTopology: true +# core: +# ClusterTopology: true +# kubeadm: +# ClusterTopology: true +fetchConfig: {} +# --- +# Common configuration secret options +configSecret: {} +# name: global-secret # Required +# namespace: default # Optional +enableHelmHook: true # Workaround to avoid ensuring CRDs are installed first diff --git a/hack/charts/cluster-api-operator/values.schema.json b/hack/charts/cluster-api-operator/values.schema.json index d22038fce..0107bc0c8 100644 --- a/hack/charts/cluster-api-operator/values.schema.json +++ b/hack/charts/cluster-api-operator/values.schema.json @@ -1,7 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "type": "object", "properties": { + "fetchConfig": { + "type": "object", + "deprecated": true, + "description": "This field is deprecated and will be removed in future versions. Prefer declaring fetchConfig under the individual providers instead." + }, "core": { "oneOf": [ { "type": "object" }, diff --git a/hack/charts/cluster-api-operator/values.yaml b/hack/charts/cluster-api-operator/values.yaml index 745ff9e99..87d80b812 100644 --- a/hack/charts/cluster-api-operator/values.yaml +++ b/hack/charts/cluster-api-operator/values.yaml @@ -1,51 +1,4 @@ --- -# --- -# Cluster API provider options -core: {} -# cluster-api: {} # Name, required -# namespace: "" # Optional -# version: "" # Optional -# createNamespace: true # Optional -bootstrap: {} -# kubeadm: {} # Name, required -# namespace: "" # Optional -# version: "" # Optional -# createNamespace: true # Optional -controlPlane: {} -# kubeadm: {} # Name, required -# namespace: "" # Optional -# version: "" # Optional -# createNamespace: true # Optional -infrastructure: {} -# docker: {} # Name, required -# namespace: "" # Optional -# version: "" # Optional -# createNamespace: true # Optional -addon: {} -# helm: {} # Name, required -# namespace: "" # Optional -# version: "" # Optional -# createNamespace: true # Optional -ipam: {} -# in-cluster: {} # Name, required -# namespace: "" # Optional -# version: "" # Optional -# createNamespace: true # Optional -manager.featureGates: {} -# Configuration for enabling feature gates in different providers -# manager: -# featureGates: -# proxmox: # Name of the provider -# ClusterTopology: true -# core: -# ClusterTopology: true -# kubeadm: -# ClusterTopology: true -fetchConfig: {} -# --- -# Common configuration secret options -configSecret: {} -# --- # CAPI operator deployment options logLevel: 2 replicaCount: 1 @@ -105,4 +58,3 @@ volumeMounts: - mountPath: /tmp/k8s-webhook-server/serving-certs name: cert readOnly: true -enableHelmHook: true diff --git a/test/e2e/helm_test.go b/test/e2e/helm_test.go index a6178f654..49673724d 100644 --- a/test/e2e/helm_test.go +++ b/test/e2e/helm_test.go @@ -21,6 +21,7 @@ package e2e import ( "os" "path/filepath" + "strings" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -28,12 +29,12 @@ import ( apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" + operatorv1 "sigs.k8s.io/cluster-api-operator/api/v1alpha2" + . "sigs.k8s.io/cluster-api-operator/test/framework" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/controller-runtime/pkg/client" - - . "sigs.k8s.io/cluster-api-operator/test/framework" ) var _ = Describe("Create a proper set of manifests when using helm charts", func() { @@ -42,7 +43,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func deleteClusterAPICRDs(helmClusterProxy) }) - It("should deploy a quick-start cluster-api-operator chart", func() { + It("should deploy a quick-start cluster-api-operator-providers chart", func() { clusterProxy := helmClusterProxy.GetClient() fullHelmChart := &HelmChart{ @@ -129,7 +130,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func Expect(clusterProxy.Delete(ctx, coreProvider)).To(Succeed()) }) - It("should deploy default manifest set for quick-start process", func() { + It("should render operator chart manifests matching expected output", func() { fullRun := &HelmChart{ BinaryPath: helmChart.BinaryPath, Path: helmChart.Path, @@ -143,284 +144,6 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func Expect(err).ToNot(HaveOccurred()) fullChartInstall, err := os.ReadFile(filepath.Join(customManifestsFolder, "full-chart-install.yaml")) Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(fullChartInstall))) - }) - - It("should not deploy providers when none specified", func() { - manifests, err := helmChart.Run(nil) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(BeEmpty()) - }) - - It("should deploy all providers with custom namespace and versions", func() { - manifests, err := helmChart.Run(map[string]string{ - "configSecret.name": "test-secret-name", - "configSecret.namespace": "test-secret-namespace", - "core.cluster-api.namespace": "capi-custom-ns", - "core.cluster-api.version": "v1.7.7", - "controlPlane.kubeadm.namespace": "kubeadm-control-plane-custom-ns", - "controlPlane.kubeadm.version": "v1.7.7", - "bootstrap.kubeadm.namespace": "kubeadm-bootstrap-custom-ns", - "bootstrap.kubeadm.version": "v1.7.7", - "infrastructure.docker.namespace": "capd-custom-ns", - "infrastructure.docker.version": "v1.7.7", - "ipam.in-cluster.namespace": "in-cluster-custom-ns", - "ipam.in-cluster.version": "v1.0.0", - "addon.helm.namespace": "helm-custom-ns", - "addon.helm.version": "v0.2.6", - }) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).ToNot(BeEmpty()) - expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "all-providers-custom-ns-versions.yaml")) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) - }) - - It("should deploy all providers with custom versions", func() { - manifests, err := helmChart.Run(map[string]string{ - "configSecret.name": "test-secret-name", - "configSecret.namespace": "test-secret-namespace", - "core.cluster-api.version": "v1.7.7", - "controlPlane.kubeadm.version": "v1.7.7", - "bootstrap.kubeadm.version": "v1.7.7", - "infrastructure.docker.version": "v1.7.7", - "ipam.in-cluster.version": "v1.0.0", - "addon.helm.version": "v0.2.6", - }) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).ToNot(BeEmpty()) - expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "all-providers-custom-versions.yaml")) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) - }) - - It("should deploy all providers with latest version", func() { - manifests, err := helmChart.Run(map[string]string{ - "configSecret.name": "test-secret-name", - "configSecret.namespace": "test-secret-namespace", - "core.cluster-api.enabled": "true", - "controlPlane.kubeadm.enabled": "true", - "bootstrap.kubeadm.enabled": "true", - "infrastructure.docker.enabled": "true", - "ipam.in-cluster.enabled": "true", - "addon.helm.enabled": "true", - }) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).ToNot(BeEmpty()) - expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "all-providers-latest-versions.yaml")) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) - }) - - It("should deploy core, bootstrap, control plane when only infra is specified", func() { - manifests, err := helmChart.Run(map[string]string{ - "configSecret.name": "test-secret-name", - "configSecret.namespace": "test-secret-namespace", - "infrastructure.docker.enabled": "true", - }) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).ToNot(BeEmpty()) - expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "only-infra.yaml")) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) - }) - - It("should deploy core when only bootstrap is specified", func() { - manifests, err := helmChart.Run(map[string]string{ - "configSecret.name": "test-secret-name", - "configSecret.namespace": "test-secret-namespace", - "bootstrap.kubeadm.enabled": "true", - }) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).ToNot(BeEmpty()) - expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "only-bootstrap.yaml")) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) - }) - - It("should deploy core when only control plane is specified", func() { - manifests, err := helmChart.Run(map[string]string{ - "configSecret.name": "test-secret-name", - "configSecret.namespace": "test-secret-namespace", - "controlPlane.kubeadm.enabled": "true", - }) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).ToNot(BeEmpty()) - expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "only-control-plane.yaml")) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) - }) - - It("should deploy core when only ipam is specified", func() { - manifests, err := helmChart.Run(map[string]string{ - "configSecret.name": "test-secret-name", - "configSecret.namespace": "test-secret-namespace", - "ipam.in-cluster.enabled": "true", - }) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).ToNot(BeEmpty()) - expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "only-ipam.yaml")) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) - }) - - It("should deploy core, bootstrap, control plane when only infra and ipam is specified", func() { - manifests, err := helmChart.Run(map[string]string{ - "configSecret.name": "test-secret-name", - "configSecret.namespace": "test-secret-namespace", - "infrastructure.docker.enabled": "true", - "ipam.in-cluster.enabled": "true", - }) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).ToNot(BeEmpty()) - expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "only-infra-and-ipam.yaml")) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) - }) - - It("should deploy multiple infra providers with custom namespace and versions", func() { - manifests, err := helmChart.Run(map[string]string{ - "configSecret.name": "test-secret-name", - "configSecret.namespace": "test-secret-namespace", - "infrastructure.docker.namespace": "capd-custom-ns", - "infrastructure.docker.version": "v1.7.7", - "infrastructure.azure.namespace": "capz-custom-ns", - "infrastructure.azure.version": "v1.10.0", - }) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).ToNot(BeEmpty()) - expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "multiple-infra-custom-ns-versions.yaml")) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) - }) - - It("should deploy multiple control plane providers with custom namespace and versions", func() { - manifests, err := helmChart.Run(map[string]string{ - "configSecret.name": "test-secret-name", - "configSecret.namespace": "test-secret-namespace", - "controlPlane.kubeadm.namespace": "kubeadm-control-plane-custom-ns", - "controlPlane.kubeadm.version": "v1.7.7", - "controlPlane.rke2.namespace": "rke2-control-plane-custom-ns", - "controlPlane.rke2.version": "v0.8.0", - }) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).ToNot(BeEmpty()) - expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "multiple-control-plane-custom-ns-versions.yaml")) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) - }) - - It("should deploy multiple bootstrap providers with custom namespace and versions", func() { - manifests, err := helmChart.Run(map[string]string{ - "configSecret.name": "test-secret-name", - "configSecret.namespace": "test-secret-namespace", - "bootstrap.kubeadm.namespace": "kubeadm-bootstrap-custom-ns", - "bootstrap.kubeadm.version": "v1.7.7", - "bootstrap.rke2.namespace": "rke2-bootstrap-custom-ns", - "bootstrap.rke2.version": "v0.8.0", - }) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).ToNot(BeEmpty()) - expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "multiple-bootstrap-custom-ns-versions.yaml")) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) - }) - - It("should deploy core when only addon is specified", func() { - manifests, err := helmChart.Run(map[string]string{ - "configSecret.name": "test-secret-name", - "configSecret.namespace": "test-secret-namespace", - "addon.helm.enabled": "true", - }) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).ToNot(BeEmpty()) - expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "only-addon.yaml")) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) - }) - - It("should deploy core, bootstrap, control plane when only infra and addon is specified", func() { - manifests, err := helmChart.Run(map[string]string{ - "configSecret.name": "test-secret-name", - "configSecret.namespace": "test-secret-namespace", - "infrastructure.docker.enabled": "true", - "addon.helm.enabled": "true", - }) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).ToNot(BeEmpty()) - expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "only-infra-and-addon.yaml")) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) - }) - It("should deploy core and infra with feature gates enabled", func() { - manifests, err := helmChart.Run(map[string]string{ - "configSecret.name": "aws-variables", - "configSecret.namespace": "default", - "infrastructure.aws.version": "v2.4.0", - "ipam.in-cluster.enabled": "true", - "addon.helm.enabled": "true", - "image.manager.tag": "v0.9.1", - "core.cluster-api.version": "v1.6.2", - "manager.featureGates.core.ClusterTopology": "true", - "manager.featureGates.core.MachinePool": "true", - "manager.featureGates.aws.ClusterTopology": "true", - "manager.featureGates.aws.MachinePool": "true", - "manager.featureGates.aws.EKSEnableIAM": "true", - "manager.featureGates.aws.EKSAllowAddRoles": "true", - }) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).ToNot(BeEmpty()) - expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "feature-gates.yaml")) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) - }) - It("should deploy all providers with manager defined but no feature gates enabled", func() { - manifests, err := helmChart.Run(map[string]string{ - "configSecret.name": "test-secret-name", - "configSecret.namespace": "test-secret-namespace", - "core.cluster-api.enabled": "true", - "infrastructure.azure.enabled": "true", - "ipam.in-cluster.enabled": "true", - "addon.helm.enabled": "true", - }) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).ToNot(BeEmpty()) - expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "all-providers-manager-defined-no-feature-gates.yaml")) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) - }) - It("should deploy all providers when manager is defined but another infrastructure spec field is defined", func() { - manifests, err := helmChart.Run(map[string]string{ - "core.cluster-api.enabled": "true", - "controlPlane.kubeadm.enabled": "true", - "bootstrap.kubeadm.enabled": "true", - "infrastructure.docker.enabled": "true", - "ipam.in-cluster.enabled": "true", - "addon.helm.enabled": "true", - "manager.featureGates.core.ClusterTopology": "true", - "manager.featureGates.core.MachinePool": "true", - }) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).ToNot(BeEmpty()) - expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "manager-defined-missing-other-infra-spec.yaml")) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) - }) - It("should deploy kubeadm control plane with manager specified", func() { - manifests, err := helmChart.Run(map[string]string{ - "core.cluster-api.enabled": "true", - "controlPlane.kubeadm.enabled": "true", - "bootstrap.kubeadm.enabled": "true", - "infrastructure.docker.enabled": "true", - "ipam.in-cluster.enabled": "true", - "addon.helm.enabled": "true", - "manager.featureGates.kubeadm.ClusterTopology": "true", - "manager.featureGates.kubeadm.MachinePool": "true", - }) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).ToNot(BeEmpty()) - expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "kubeadm-manager-defined.yaml")) - Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) + Expect(manifests).To(Equal(strings.TrimSpace(string(fullChartInstall)))) }) }) diff --git a/test/e2e/resources/all-providers-custom-ns-versions.yaml b/test/e2e/resources/all-providers-custom-ns-versions.yaml index 71e38b203..315c60518 100644 --- a/test/e2e/resources/all-providers-custom-ns-versions.yaml +++ b/test/e2e/resources/all-providers-custom-ns-versions.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: v1 kind: Namespace metadata: @@ -9,7 +9,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: helm-custom-ns --- -# Source: cluster-api-operator/templates/bootstrap.yaml +# Source: cluster-api-operator-providers/templates/bootstrap.yaml apiVersion: v1 kind: Namespace metadata: @@ -19,7 +19,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: kubeadm-bootstrap-custom-ns --- -# Source: cluster-api-operator/templates/control-plane.yaml +# Source: cluster-api-operator-providers/templates/control-plane.yaml apiVersion: v1 kind: Namespace metadata: @@ -29,7 +29,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: kubeadm-control-plane-custom-ns --- -# Source: cluster-api-operator/templates/core.yaml +# Source: cluster-api-operator-providers/templates/core.yaml apiVersion: v1 kind: Namespace metadata: @@ -39,7 +39,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-custom-ns --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: v1 kind: Namespace metadata: @@ -49,7 +49,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capd-custom-ns --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: v1 kind: Namespace metadata: @@ -59,7 +59,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: in-cluster-custom-ns --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: AddonProvider metadata: @@ -72,7 +72,7 @@ metadata: spec: version: v0.2.6 --- -# Source: cluster-api-operator/templates/bootstrap.yaml +# Source: cluster-api-operator-providers/templates/bootstrap.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: @@ -88,7 +88,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/control-plane.yaml +# Source: cluster-api-operator-providers/templates/control-plane.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: @@ -104,7 +104,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/core.yaml +# Source: cluster-api-operator-providers/templates/core.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: @@ -120,7 +120,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: IPAMProvider metadata: @@ -136,7 +136,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: @@ -150,4 +150,4 @@ spec: version: v1.7.7 configSecret: name: test-secret-name - namespace: test-secret-namespace \ No newline at end of file + namespace: test-secret-namespace diff --git a/test/e2e/resources/all-providers-custom-versions.yaml b/test/e2e/resources/all-providers-custom-versions.yaml index 02bcae0a8..1f77c8713 100644 --- a/test/e2e/resources/all-providers-custom-versions.yaml +++ b/test/e2e/resources/all-providers-custom-versions.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: v1 kind: Namespace metadata: @@ -9,7 +9,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: helm-addon-system --- -# Source: cluster-api-operator/templates/bootstrap.yaml +# Source: cluster-api-operator-providers/templates/bootstrap.yaml apiVersion: v1 kind: Namespace metadata: @@ -19,7 +19,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: kubeadm-bootstrap-system --- -# Source: cluster-api-operator/templates/control-plane.yaml +# Source: cluster-api-operator-providers/templates/control-plane.yaml apiVersion: v1 kind: Namespace metadata: @@ -29,7 +29,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: kubeadm-control-plane-system --- -# Source: cluster-api-operator/templates/core.yaml +# Source: cluster-api-operator-providers/templates/core.yaml apiVersion: v1 kind: Namespace metadata: @@ -39,7 +39,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-system --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: v1 kind: Namespace metadata: @@ -49,7 +49,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: docker-infrastructure-system --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: v1 kind: Namespace metadata: @@ -59,7 +59,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: in-cluster-ipam-system --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: AddonProvider metadata: @@ -72,7 +72,7 @@ metadata: spec: version: v0.2.6 --- -# Source: cluster-api-operator/templates/bootstrap.yaml +# Source: cluster-api-operator-providers/templates/bootstrap.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: @@ -88,7 +88,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/control-plane.yaml +# Source: cluster-api-operator-providers/templates/control-plane.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: @@ -104,7 +104,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/core.yaml +# Source: cluster-api-operator-providers/templates/core.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: @@ -120,7 +120,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: IPAMProvider metadata: @@ -136,7 +136,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: @@ -150,4 +150,4 @@ spec: version: v1.7.7 configSecret: name: test-secret-name - namespace: test-secret-namespace \ No newline at end of file + namespace: test-secret-namespace diff --git a/test/e2e/resources/all-providers-latest-versions.yaml b/test/e2e/resources/all-providers-latest-versions.yaml index cd845d028..825bd92e7 100644 --- a/test/e2e/resources/all-providers-latest-versions.yaml +++ b/test/e2e/resources/all-providers-latest-versions.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: v1 kind: Namespace metadata: @@ -9,7 +9,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: helm-addon-system --- -# Source: cluster-api-operator/templates/bootstrap.yaml +# Source: cluster-api-operator-providers/templates/bootstrap.yaml apiVersion: v1 kind: Namespace metadata: @@ -19,7 +19,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: kubeadm-bootstrap-system --- -# Source: cluster-api-operator/templates/control-plane.yaml +# Source: cluster-api-operator-providers/templates/control-plane.yaml apiVersion: v1 kind: Namespace metadata: @@ -29,7 +29,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: kubeadm-control-plane-system --- -# Source: cluster-api-operator/templates/core.yaml +# Source: cluster-api-operator-providers/templates/core.yaml apiVersion: v1 kind: Namespace metadata: @@ -39,7 +39,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-system --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: v1 kind: Namespace metadata: @@ -49,7 +49,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: docker-infrastructure-system --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: v1 kind: Namespace metadata: @@ -59,7 +59,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: in-cluster-ipam-system --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: AddonProvider metadata: @@ -70,7 +70,7 @@ metadata: "helm.sh/hook-weight": "2" "argocd.argoproj.io/sync-wave": "2" --- -# Source: cluster-api-operator/templates/bootstrap.yaml +# Source: cluster-api-operator-providers/templates/bootstrap.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: @@ -85,7 +85,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/control-plane.yaml +# Source: cluster-api-operator-providers/templates/control-plane.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: @@ -100,7 +100,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/core.yaml +# Source: cluster-api-operator-providers/templates/core.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: @@ -115,7 +115,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: IPAMProvider metadata: @@ -130,7 +130,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: @@ -143,4 +143,4 @@ metadata: spec: configSecret: name: test-secret-name - namespace: test-secret-namespace \ No newline at end of file + namespace: test-secret-namespace diff --git a/test/e2e/resources/all-providers-manager-defined-no-feature-gates.yaml b/test/e2e/resources/all-providers-manager-defined-no-feature-gates.yaml index 0042c6889..fdd2a7e84 100644 --- a/test/e2e/resources/all-providers-manager-defined-no-feature-gates.yaml +++ b/test/e2e/resources/all-providers-manager-defined-no-feature-gates.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: v1 kind: Namespace metadata: @@ -9,7 +9,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: helm-addon-system --- -# Source: cluster-api-operator/templates/core.yaml +# Source: cluster-api-operator-providers/templates/core.yaml apiVersion: v1 kind: Namespace metadata: @@ -19,7 +19,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-system --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -29,7 +29,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-kubeadm-bootstrap-system --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -39,7 +39,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-kubeadm-control-plane-system --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: v1 kind: Namespace metadata: @@ -49,7 +49,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: azure-infrastructure-system --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: v1 kind: Namespace metadata: @@ -59,7 +59,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: in-cluster-ipam-system --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: AddonProvider metadata: @@ -70,7 +70,7 @@ metadata: "helm.sh/hook-weight": "2" "argocd.argoproj.io/sync-wave": "2" --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: @@ -85,7 +85,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: @@ -100,7 +100,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/core.yaml +# Source: cluster-api-operator-providers/templates/core.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: @@ -115,7 +115,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: IPAMProvider metadata: @@ -130,7 +130,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: @@ -143,4 +143,4 @@ metadata: spec: configSecret: name: test-secret-name - namespace: test-secret-namespace \ No newline at end of file + namespace: test-secret-namespace diff --git a/test/e2e/resources/feature-gates.yaml b/test/e2e/resources/feature-gates.yaml index 1fd336ce5..0b3d62ae1 100644 --- a/test/e2e/resources/feature-gates.yaml +++ b/test/e2e/resources/feature-gates.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: v1 kind: Namespace metadata: @@ -9,7 +9,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: helm-addon-system --- -# Source: cluster-api-operator/templates/core.yaml +# Source: cluster-api-operator-providers/templates/core.yaml apiVersion: v1 kind: Namespace metadata: @@ -19,7 +19,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-system --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -29,7 +29,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-kubeadm-bootstrap-system --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -39,7 +39,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-kubeadm-control-plane-system --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: v1 kind: Namespace metadata: @@ -49,7 +49,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: aws-infrastructure-system --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: v1 kind: Namespace metadata: @@ -59,7 +59,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: in-cluster-ipam-system --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: AddonProvider metadata: @@ -70,7 +70,7 @@ metadata: "helm.sh/hook-weight": "2" "argocd.argoproj.io/sync-wave": "2" --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: @@ -85,7 +85,7 @@ spec: name: aws-variables namespace: default --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: @@ -100,7 +100,7 @@ spec: name: aws-variables namespace: default --- -# Source: cluster-api-operator/templates/core.yaml +# Source: cluster-api-operator-providers/templates/core.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: @@ -120,7 +120,7 @@ spec: name: aws-variables namespace: default --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: IPAMProvider metadata: @@ -135,7 +135,7 @@ spec: name: aws-variables namespace: default --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: @@ -155,4 +155,4 @@ spec: MachinePool: true configSecret: name: aws-variables - namespace: default \ No newline at end of file + namespace: default diff --git a/test/e2e/resources/full-chart-install.yaml b/test/e2e/resources/full-chart-install.yaml index f094ff605..9fdefab6f 100644 --- a/test/e2e/resources/full-chart-install.yaml +++ b/test/e2e/resources/full-chart-install.yaml @@ -22075,24 +22075,6 @@ spec: - effect: NoSchedule key: node-role.kubernetes.io/control-plane --- -# Source: cluster-api-operator/templates/addon.yaml -# Addon provider ---- -# Source: cluster-api-operator/templates/bootstrap.yaml -# Bootstrap provider ---- -# Source: cluster-api-operator/templates/control-plane.yaml -# Control plane provider ---- -# Source: cluster-api-operator/templates/core.yaml -# Core provider ---- -# Source: cluster-api-operator/templates/infra.yaml -# Infrastructure providers ---- -# Source: cluster-api-operator/templates/ipam.yaml -# IPAM providers ---- # Source: cluster-api-operator/templates/operator-components.yaml apiVersion: cert-manager.io/v1 kind: Certificate diff --git a/test/e2e/resources/kubeadm-manager-defined.yaml b/test/e2e/resources/kubeadm-manager-defined.yaml index 9719171e7..41d5bdde4 100644 --- a/test/e2e/resources/kubeadm-manager-defined.yaml +++ b/test/e2e/resources/kubeadm-manager-defined.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: v1 kind: Namespace metadata: @@ -9,7 +9,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: helm-addon-system --- -# Source: cluster-api-operator/templates/bootstrap.yaml +# Source: cluster-api-operator-providers/templates/bootstrap.yaml apiVersion: v1 kind: Namespace metadata: @@ -19,7 +19,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: kubeadm-bootstrap-system --- -# Source: cluster-api-operator/templates/control-plane.yaml +# Source: cluster-api-operator-providers/templates/control-plane.yaml apiVersion: v1 kind: Namespace metadata: @@ -29,7 +29,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: kubeadm-control-plane-system --- -# Source: cluster-api-operator/templates/core.yaml +# Source: cluster-api-operator-providers/templates/core.yaml apiVersion: v1 kind: Namespace metadata: @@ -39,7 +39,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-system --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: v1 kind: Namespace metadata: @@ -49,7 +49,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: docker-infrastructure-system --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: v1 kind: Namespace metadata: @@ -59,7 +59,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: in-cluster-ipam-system --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: AddonProvider metadata: @@ -70,7 +70,7 @@ metadata: "helm.sh/hook-weight": "2" "argocd.argoproj.io/sync-wave": "2" --- -# Source: cluster-api-operator/templates/bootstrap.yaml +# Source: cluster-api-operator-providers/templates/bootstrap.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: @@ -81,7 +81,7 @@ metadata: "helm.sh/hook-weight": "2" "argocd.argoproj.io/sync-wave": "2" --- -# Source: cluster-api-operator/templates/control-plane.yaml +# Source: cluster-api-operator-providers/templates/control-plane.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: @@ -97,7 +97,7 @@ spec: ClusterTopology: true MachinePool: true --- -# Source: cluster-api-operator/templates/core.yaml +# Source: cluster-api-operator-providers/templates/core.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: @@ -109,7 +109,7 @@ metadata: "argocd.argoproj.io/sync-wave": "2" spec: --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: IPAMProvider metadata: @@ -121,7 +121,7 @@ metadata: "argocd.argoproj.io/sync-wave": "2" spec: --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: @@ -131,4 +131,4 @@ metadata: "helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook-weight": "2" "argocd.argoproj.io/sync-wave": "2" -spec: \ No newline at end of file +spec: diff --git a/test/e2e/resources/manager-defined-missing-other-infra-spec.yaml b/test/e2e/resources/manager-defined-missing-other-infra-spec.yaml index af8db65c4..7ab76f74b 100644 --- a/test/e2e/resources/manager-defined-missing-other-infra-spec.yaml +++ b/test/e2e/resources/manager-defined-missing-other-infra-spec.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: v1 kind: Namespace metadata: @@ -9,7 +9,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: helm-addon-system --- -# Source: cluster-api-operator/templates/bootstrap.yaml +# Source: cluster-api-operator-providers/templates/bootstrap.yaml apiVersion: v1 kind: Namespace metadata: @@ -19,7 +19,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: kubeadm-bootstrap-system --- -# Source: cluster-api-operator/templates/control-plane.yaml +# Source: cluster-api-operator-providers/templates/control-plane.yaml apiVersion: v1 kind: Namespace metadata: @@ -29,7 +29,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: kubeadm-control-plane-system --- -# Source: cluster-api-operator/templates/core.yaml +# Source: cluster-api-operator-providers/templates/core.yaml apiVersion: v1 kind: Namespace metadata: @@ -39,7 +39,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-system --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: v1 kind: Namespace metadata: @@ -49,7 +49,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: docker-infrastructure-system --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: v1 kind: Namespace metadata: @@ -59,7 +59,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: in-cluster-ipam-system --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: AddonProvider metadata: @@ -70,7 +70,7 @@ metadata: "helm.sh/hook-weight": "2" "argocd.argoproj.io/sync-wave": "2" --- -# Source: cluster-api-operator/templates/bootstrap.yaml +# Source: cluster-api-operator-providers/templates/bootstrap.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: @@ -81,7 +81,7 @@ metadata: "helm.sh/hook-weight": "2" "argocd.argoproj.io/sync-wave": "2" --- -# Source: cluster-api-operator/templates/control-plane.yaml +# Source: cluster-api-operator-providers/templates/control-plane.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: @@ -93,7 +93,7 @@ metadata: "argocd.argoproj.io/sync-wave": "2" spec: --- -# Source: cluster-api-operator/templates/core.yaml +# Source: cluster-api-operator-providers/templates/core.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: @@ -109,7 +109,7 @@ spec: ClusterTopology: true MachinePool: true --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: IPAMProvider metadata: @@ -121,7 +121,7 @@ metadata: "argocd.argoproj.io/sync-wave": "2" spec: --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: @@ -131,4 +131,4 @@ metadata: "helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook-weight": "2" "argocd.argoproj.io/sync-wave": "2" -spec: \ No newline at end of file +spec: diff --git a/test/e2e/resources/multiple-bootstrap-custom-ns-versions.yaml b/test/e2e/resources/multiple-bootstrap-custom-ns-versions.yaml index b95424c64..6d960f5de 100644 --- a/test/e2e/resources/multiple-bootstrap-custom-ns-versions.yaml +++ b/test/e2e/resources/multiple-bootstrap-custom-ns-versions.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/bootstrap.yaml +# Source: cluster-api-operator-providers/templates/bootstrap.yaml apiVersion: v1 kind: Namespace metadata: @@ -9,7 +9,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: kubeadm-bootstrap-custom-ns --- -# Source: cluster-api-operator/templates/bootstrap.yaml +# Source: cluster-api-operator-providers/templates/bootstrap.yaml apiVersion: v1 kind: Namespace metadata: @@ -19,7 +19,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: rke2-bootstrap-custom-ns --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -29,7 +29,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-system --- -# Source: cluster-api-operator/templates/bootstrap.yaml +# Source: cluster-api-operator-providers/templates/bootstrap.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: @@ -45,7 +45,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/bootstrap.yaml +# Source: cluster-api-operator-providers/templates/bootstrap.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: @@ -61,7 +61,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: @@ -74,4 +74,4 @@ metadata: spec: configSecret: name: test-secret-name - namespace: test-secret-namespace \ No newline at end of file + namespace: test-secret-namespace diff --git a/test/e2e/resources/multiple-control-plane-custom-ns-versions.yaml b/test/e2e/resources/multiple-control-plane-custom-ns-versions.yaml index 3ad73a632..4d5a9b932 100644 --- a/test/e2e/resources/multiple-control-plane-custom-ns-versions.yaml +++ b/test/e2e/resources/multiple-control-plane-custom-ns-versions.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/control-plane.yaml +# Source: cluster-api-operator-providers/templates/control-plane.yaml apiVersion: v1 kind: Namespace metadata: @@ -9,7 +9,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: kubeadm-control-plane-custom-ns --- -# Source: cluster-api-operator/templates/control-plane.yaml +# Source: cluster-api-operator-providers/templates/control-plane.yaml apiVersion: v1 kind: Namespace metadata: @@ -19,7 +19,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: rke2-control-plane-custom-ns --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -29,7 +29,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-system --- -# Source: cluster-api-operator/templates/control-plane.yaml +# Source: cluster-api-operator-providers/templates/control-plane.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: @@ -45,7 +45,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/control-plane.yaml +# Source: cluster-api-operator-providers/templates/control-plane.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: @@ -61,7 +61,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: @@ -74,4 +74,4 @@ metadata: spec: configSecret: name: test-secret-name - namespace: test-secret-namespace \ No newline at end of file + namespace: test-secret-namespace diff --git a/test/e2e/resources/multiple-infra-custom-ns-versions.yaml b/test/e2e/resources/multiple-infra-custom-ns-versions.yaml index 38c7656bc..25fbf6ae6 100644 --- a/test/e2e/resources/multiple-infra-custom-ns-versions.yaml +++ b/test/e2e/resources/multiple-infra-custom-ns-versions.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -9,7 +9,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-system --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -19,7 +19,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-kubeadm-bootstrap-system --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -29,7 +29,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-kubeadm-control-plane-system --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: v1 kind: Namespace metadata: @@ -39,7 +39,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capz-custom-ns --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: v1 kind: Namespace metadata: @@ -49,7 +49,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capd-custom-ns --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: @@ -64,7 +64,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: @@ -79,7 +79,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: @@ -94,7 +94,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: @@ -110,7 +110,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: @@ -124,4 +124,4 @@ spec: version: v1.7.7 configSecret: name: test-secret-name - namespace: test-secret-namespace \ No newline at end of file + namespace: test-secret-namespace diff --git a/test/e2e/resources/only-addon.yaml b/test/e2e/resources/only-addon.yaml index 3b5e62dea..6a0324545 100644 --- a/test/e2e/resources/only-addon.yaml +++ b/test/e2e/resources/only-addon.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: v1 kind: Namespace metadata: @@ -9,7 +9,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: helm-addon-system --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -19,7 +19,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-system --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: AddonProvider metadata: @@ -30,7 +30,7 @@ metadata: "helm.sh/hook-weight": "2" "argocd.argoproj.io/sync-wave": "2" --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: @@ -43,4 +43,4 @@ metadata: spec: configSecret: name: test-secret-name - namespace: test-secret-namespace \ No newline at end of file + namespace: test-secret-namespace diff --git a/test/e2e/resources/only-bootstrap.yaml b/test/e2e/resources/only-bootstrap.yaml index b7e062c71..b011ddb40 100644 --- a/test/e2e/resources/only-bootstrap.yaml +++ b/test/e2e/resources/only-bootstrap.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/bootstrap.yaml +# Source: cluster-api-operator-providers/templates/bootstrap.yaml apiVersion: v1 kind: Namespace metadata: @@ -9,7 +9,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: kubeadm-bootstrap-system --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -19,7 +19,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-system --- -# Source: cluster-api-operator/templates/bootstrap.yaml +# Source: cluster-api-operator-providers/templates/bootstrap.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: @@ -34,7 +34,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: @@ -47,4 +47,4 @@ metadata: spec: configSecret: name: test-secret-name - namespace: test-secret-namespace \ No newline at end of file + namespace: test-secret-namespace diff --git a/test/e2e/resources/only-control-plane.yaml b/test/e2e/resources/only-control-plane.yaml index 1e4b84e5b..27e9e2668 100644 --- a/test/e2e/resources/only-control-plane.yaml +++ b/test/e2e/resources/only-control-plane.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/control-plane.yaml +# Source: cluster-api-operator-providers/templates/control-plane.yaml apiVersion: v1 kind: Namespace metadata: @@ -9,7 +9,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: kubeadm-control-plane-system --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -19,7 +19,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-system --- -# Source: cluster-api-operator/templates/control-plane.yaml +# Source: cluster-api-operator-providers/templates/control-plane.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: @@ -34,7 +34,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: @@ -47,4 +47,4 @@ metadata: spec: configSecret: name: test-secret-name - namespace: test-secret-namespace \ No newline at end of file + namespace: test-secret-namespace diff --git a/test/e2e/resources/only-infra-and-addon.yaml b/test/e2e/resources/only-infra-and-addon.yaml index d505efa3f..8575993f3 100644 --- a/test/e2e/resources/only-infra-and-addon.yaml +++ b/test/e2e/resources/only-infra-and-addon.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: v1 kind: Namespace metadata: @@ -9,7 +9,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: helm-addon-system --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -19,7 +19,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-system --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -29,7 +29,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-kubeadm-bootstrap-system --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -39,7 +39,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-kubeadm-control-plane-system --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: v1 kind: Namespace metadata: @@ -49,7 +49,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: docker-infrastructure-system --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: AddonProvider metadata: @@ -60,7 +60,7 @@ metadata: "helm.sh/hook-weight": "2" "argocd.argoproj.io/sync-wave": "2" --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: @@ -75,7 +75,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: @@ -90,7 +90,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: @@ -105,7 +105,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: @@ -118,4 +118,4 @@ metadata: spec: configSecret: name: test-secret-name - namespace: test-secret-namespace \ No newline at end of file + namespace: test-secret-namespace diff --git a/test/e2e/resources/only-infra-and-ipam.yaml b/test/e2e/resources/only-infra-and-ipam.yaml index 2d0a92f03..127e4059d 100644 --- a/test/e2e/resources/only-infra-and-ipam.yaml +++ b/test/e2e/resources/only-infra-and-ipam.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -9,7 +9,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-system --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -19,7 +19,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-kubeadm-bootstrap-system --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -29,7 +29,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-kubeadm-control-plane-system --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: v1 kind: Namespace metadata: @@ -39,7 +39,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: docker-infrastructure-system --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: v1 kind: Namespace metadata: @@ -49,7 +49,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: in-cluster-ipam-system --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: @@ -64,7 +64,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: @@ -79,7 +79,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: @@ -94,7 +94,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: IPAMProvider metadata: @@ -109,7 +109,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: @@ -122,4 +122,4 @@ metadata: spec: configSecret: name: test-secret-name - namespace: test-secret-namespace \ No newline at end of file + namespace: test-secret-namespace diff --git a/test/e2e/resources/only-infra.yaml b/test/e2e/resources/only-infra.yaml index 001da084d..f53f6e8db 100644 --- a/test/e2e/resources/only-infra.yaml +++ b/test/e2e/resources/only-infra.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -9,7 +9,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-system --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -19,7 +19,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-kubeadm-bootstrap-system --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -29,7 +29,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-kubeadm-control-plane-system --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: v1 kind: Namespace metadata: @@ -39,7 +39,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: docker-infrastructure-system --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: @@ -54,7 +54,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/infra-conditions.yaml +# Source: cluster-api-operator-providers/templates/infra-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: @@ -69,7 +69,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: @@ -84,7 +84,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: @@ -97,4 +97,4 @@ metadata: spec: configSecret: name: test-secret-name - namespace: test-secret-namespace \ No newline at end of file + namespace: test-secret-namespace diff --git a/test/e2e/resources/only-ipam.yaml b/test/e2e/resources/only-ipam.yaml index 5f298c60e..a927578ca 100644 --- a/test/e2e/resources/only-ipam.yaml +++ b/test/e2e/resources/only-ipam.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: v1 kind: Namespace metadata: @@ -9,7 +9,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: capi-system --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: v1 kind: Namespace metadata: @@ -19,7 +19,7 @@ metadata: "argocd.argoproj.io/sync-wave": "1" name: in-cluster-ipam-system --- -# Source: cluster-api-operator/templates/core-conditions.yaml +# Source: cluster-api-operator-providers/templates/core-conditions.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: @@ -34,7 +34,7 @@ spec: name: test-secret-name namespace: test-secret-namespace --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: IPAMProvider metadata: @@ -47,4 +47,4 @@ metadata: spec: configSecret: name: test-secret-name - namespace: test-secret-namespace \ No newline at end of file + namespace: test-secret-namespace diff --git a/test/framework/all_type_helpers.go b/test/framework/all_type_helpers.go index f38304509..f87677485 100644 --- a/test/framework/all_type_helpers.go +++ b/test/framework/all_type_helpers.go @@ -252,6 +252,7 @@ func (h *HelmChart) Run(values map[string]string) (string, error) { res := outString[startIndex+len("MANIFEST:"):] res = strings.TrimPrefix(res, "\n") res = strings.TrimSuffix(res, "\n") + res = strings.TrimSpace(res) return res, nil } diff --git a/values.yaml b/values.yaml new file mode 100644 index 000000000..899913de6 --- /dev/null +++ b/values.yaml @@ -0,0 +1,35 @@ +core: + cluster-api: + enabled: true +bootstrap: + k0sproject-k0smotron: + enabled: true +controlPlane: + k0sproject-k0smotron: + enabled: true +infrastructure: + k0sproject-k0smotron: + enabled: true + kubevirt: + enabled: true + aws: + enabled: true + namespace: capa-system + createNamespace: false + configSecret: + name: aws-variables + namespace: capa-system +manager: + featureGates: + core: + ClusterTopology: true + MachinePool: true + RuntimeSDK: true + aws: + ClusterTopology: true + MachinePool: true + RuntimeSDK: true + kubevirt: + ClusterTopology: true + MachinePool: true + RuntimeSDK: true