diff --git a/.github/workflows/smoke-test.yaml b/.github/workflows/smoke-test.yaml new file mode 100644 index 000000000..816c6314c --- /dev/null +++ b/.github/workflows/smoke-test.yaml @@ -0,0 +1,262 @@ +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 + +jobs: + smoke-test: + name: Smoke Test (${{ matrix.install-method }}) + runs-on: ubuntu-latest + strategy: + matrix: + install-method: [legacy, recommended] + 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/amd64/kubectl" + chmod +x kubectl && sudo mv kubectl /usr/local/bin/ + + # yq + wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -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 + curl -L https://github.com/kubernetes-sigs/cluster-api/releases/latest/download/clusterctl-linux-amd64 -o clusterctl + chmod +x clusterctl && sudo mv clusterctl /usr/local/bin/ + + - name: Build Docker image + run: | + make docker-build + docker tag ${CONTROLLER_IMG}-amd64:${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 (Recommended) + if: matrix.install-method == 'recommended' + 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: Prepare providers values + 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 + + # Add cluster-api-operator configuration for legacy installation + if [ "${{ matrix.install-method }}" = "legacy" ]; then + cat <> /tmp/providers-values.yaml + cluster-api-operator: + install: true + image: + manager: + repository: ${CONTROLLER_IMG} + tag: ${TAG} + pullPolicy: IfNotPresent + EOF + fi + + - name: Deploy providers (Recommended) + if: matrix.install-method == 'recommended' + run: | + 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: Deploy providers (Legacy) + if: matrix.install-method == 'legacy' + run: | + PROVIDERS_CHART_PACKAGE="out/package/cluster-api-operator-providers-${HELM_CHART_TAG}.tgz" + helm install capi-providers "$PROVIDERS_CHART_PACKAGE" \ + --create-namespace \ + -n capi-operator-system \ + -f /tmp/providers-values.yaml \ + --wait \ + --timeout 300s + + - 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 "=== Installation Method: ${{ matrix.install-method }} ===" + 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..135f36681 100644 --- a/Makefile +++ b/Makefile @@ -149,7 +149,7 @@ PROD_REGISTRY ?= registry.k8s.io/capi-operator # Image name IMAGE_NAME ?= cluster-api-operator -PACKAGE_NAME = cluster-api-operator +PACKAGE_NAME = cluster-api-operator-providers CONTROLLER_IMG ?= $(REGISTRY)/$(IMAGE_NAME) CONTROLLER_IMG_TAG ?= $(CONTROLLER_IMG)-$(ARCH):$(TAG) @@ -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,17 @@ 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) dependency update $(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 @@ -561,7 +571,7 @@ test-e2e-run: $(GINKGO) $(ENVSUBST) $(HELM) ## Run e2e tests -e2e.artifacts-folder="$(ARTIFACTS)" \ -e2e.config="$(E2E_CONF_FILE_ENVSUBST)" -e2e.components=$(RELEASE_DIR)/operator-components.yaml \ -e2e.skip-resource-cleanup=$(SKIP_CLEANUP) -e2e.use-existing-cluster=$(SKIP_CREATE_MGMT_CLUSTER) \ - -e2e.helm-binary-path=$(HELM) -e2e.chart-path=$(CHART_PACKAGE_DIR)/cluster-api-operator-$(HELM_CHART_TAG).tgz $(E2E_ARGS) + -e2e.helm-binary-path=$(HELM) -e2e.chart-path=$(CHART_PACKAGE_DIR)/cluster-api-operator-providers-$(HELM_CHART_TAG).tgz $(E2E_ARGS) go-version: ## Print the go version we use to compile our binaries and images @echo $(GO_VERSION) 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..1f56f95a5 --- /dev/null +++ b/hack/charts/cluster-api-operator-providers/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: cluster-api-operator-providers +description: Cluster API Provider Custom Resources +type: application +version: 0.0.0 +appVersion: "0.0.0" +dependencies: + - name: cluster-api-operator + repository: file://../cluster-api-operator + version: 0.0.0 + condition: cluster-api-operator.install 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 100% rename from hack/charts/cluster-api-operator/templates/addon.yaml rename to hack/charts/cluster-api-operator-providers/templates/addon.yaml diff --git a/hack/charts/cluster-api-operator/templates/bootstrap.yaml b/hack/charts/cluster-api-operator-providers/templates/bootstrap.yaml similarity index 86% rename from hack/charts/cluster-api-operator/templates/bootstrap.yaml rename to hack/charts/cluster-api-operator-providers/templates/bootstrap.yaml index 65378bedc..1fc8832eb 100644 --- a/hack/charts/cluster-api-operator/templates/bootstrap.yaml +++ b/hack/charts/cluster-api-operator-providers/templates/bootstrap.yaml @@ -28,17 +28,18 @@ 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 }} 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 87% 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..05e7243a6 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,11 +47,12 @@ 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 }} 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 86% rename from hack/charts/cluster-api-operator/templates/core.yaml rename to hack/charts/cluster-api-operator-providers/templates/core.yaml index 57629497d..66d87bc4a 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,11 +43,12 @@ 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 }} 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 88% rename from hack/charts/cluster-api-operator/templates/infra.yaml rename to hack/charts/cluster-api-operator-providers/templates/infra.yaml index 8e68b3bf8..04f7a5f5d 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 }} diff --git a/hack/charts/cluster-api-operator/templates/ipam.yaml b/hack/charts/cluster-api-operator-providers/templates/ipam.yaml similarity index 88% rename from hack/charts/cluster-api-operator/templates/ipam.yaml rename to hack/charts/cluster-api-operator-providers/templates/ipam.yaml index 314306ffc..7b9c23f29 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,11 +57,12 @@ 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 }} 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..757955212 --- /dev/null +++ b/hack/charts/cluster-api-operator-providers/values.schema.json @@ -0,0 +1,74 @@ +{ + "$schema": "http://json-schema.org/draft-07/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..b39e7d9dd 100644 --- a/hack/charts/cluster-api-operator/values.schema.json +++ b/hack/charts/cluster-api-operator/values.schema.json @@ -2,46 +2,150 @@ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { - "core": { - "oneOf": [ - { "type": "object" }, - { "type": "null" } - ] + "logLevel": { + "type": "integer", + "default": 2 }, - "bootstrap": { + "replicaCount": { + "type": "integer", + "default": 1 + }, + "leaderElection": { "type": "object", - "oneOf": [ - { "type": "object" }, - { "type": "null" } - ] + "properties": { + "enabled": { + "type": "boolean", + "default": true + }, + "leaseDuration": { + "type": "string" + }, + "renewDeadline": { + "type": "string" + }, + "retryPeriod": { + "type": "string" + } + } }, - "controlPlane": { + "image": { "type": "object", - "oneOf": [ - { "type": "object" }, - { "type": "null" } - ] + "properties": { + "manager": { + "type": "object", + "properties": { + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "pullPolicy": { + "type": "string", + "enum": ["Always", "IfNotPresent", "Never"] + }, + "registry": { + "type": "string" + }, + "digest": { + "type": "string" + } + } + } + } }, - "infrastructure": { + "env": { "type": "object", - "oneOf": [ - { "type": "object" }, - { "type": "null" } - ] + "properties": { + "manager": { + "type": "array" + } + } + }, + "diagnosticsAddress": { + "type": "string", + "default": ":8443" + }, + "healthAddr": { + "type": "string", + "default": ":9440" + }, + "profilerAddress": { + "type": "string", + "default": ":6060" + }, + "contentionProfiling": { + "type": "boolean", + "default": false + }, + "insecureDiagnostics": { + "type": "boolean", + "default": false }, - "addon": { + "watchConfigSecret": { + "type": "boolean", + "default": false + }, + "imagePullSecrets": { + "type": "object" + }, + "resources": { "type": "object", - "oneOf": [ - { "type": "object" }, - { "type": "null" } - ] + "properties": { + "manager": { + "type": "object" + } + } + }, + "containerSecurityContext": { + "type": "object" + }, + "affinity": { + "type": "object" + }, + "tolerations": { + "type": "array" }, - "ipam": { + "volumes": { + "type": "array" + }, + "volumeMounts": { "type": "object", - "oneOf": [ - { "type": "object" }, - { "type": "null" } - ] + "properties": { + "manager": { + "type": "array" + } + } + }, + "deploymentLabels": { + "type": "object" + }, + "deploymentAnnotations": { + "type": "object" + }, + "podLabels": { + "type": "object" + }, + "podAnnotations": { + "type": "object" + }, + "securityContext": { + "type": "object" + }, + "strategy": { + "type": "object" + }, + "nodeSelector": { + "type": "object" + }, + "topologySpreadConstraints": { + "type": "array" + }, + "podDnsPolicy": { + "type": "string" + }, + "podDnsConfig": { + "type": "object" } } } diff --git a/hack/charts/cluster-api-operator/values.yaml b/hack/charts/cluster-api-operator/values.yaml index bfe570d5c..60e825411 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 @@ -104,4 +57,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 c7dacc3d2..c30070ab2 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" @@ -37,7 +38,7 @@ import ( ) var _ = Describe("Create a proper set of manifests when using helm charts", func() { - 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{ @@ -138,7 +139,7 @@ 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))) + Expect(manifests).To(Equal(strings.TrimSpace(string(fullChartInstall)))) }) It("should not deploy providers when none specified", func() { @@ -168,7 +169,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func 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))) + Expect(manifests).To(Equal(strings.TrimSpace(string(expectedManifests)))) }) It("should deploy all providers with custom versions", func() { @@ -186,7 +187,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func 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))) + Expect(manifests).To(Equal(strings.TrimSpace(string(expectedManifests)))) }) It("should deploy all providers with latest version", func() { @@ -204,7 +205,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func 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))) + Expect(manifests).To(Equal(strings.TrimSpace(string(expectedManifests)))) }) It("should deploy core, bootstrap, control plane when only infra is specified", func() { @@ -217,7 +218,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func Expect(manifests).ToNot(BeEmpty()) expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "only-infra.yaml")) Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) + Expect(manifests).To(Equal(strings.TrimSpace(string(expectedManifests)))) }) It("should deploy core when only bootstrap is specified", func() { @@ -230,7 +231,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func Expect(manifests).ToNot(BeEmpty()) expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "only-bootstrap.yaml")) Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) + Expect(manifests).To(Equal(strings.TrimSpace(string(expectedManifests)))) }) It("should deploy core when only control plane is specified", func() { @@ -243,7 +244,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func 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))) + Expect(manifests).To(Equal(strings.TrimSpace(string(expectedManifests)))) }) It("should deploy core when only ipam is specified", func() { @@ -256,7 +257,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func Expect(manifests).ToNot(BeEmpty()) expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "only-ipam.yaml")) Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) + Expect(manifests).To(Equal(strings.TrimSpace(string(expectedManifests)))) }) It("should deploy core, bootstrap, control plane when only infra and ipam is specified", func() { @@ -270,7 +271,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func 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))) + Expect(manifests).To(Equal(strings.TrimSpace(string(expectedManifests)))) }) It("should deploy multiple infra providers with custom namespace and versions", func() { @@ -286,7 +287,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func 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))) + Expect(manifests).To(Equal(strings.TrimSpace(string(expectedManifests)))) }) It("should deploy multiple control plane providers with custom namespace and versions", func() { @@ -302,7 +303,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func 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))) + Expect(manifests).To(Equal(strings.TrimSpace(string(expectedManifests)))) }) It("should deploy multiple bootstrap providers with custom namespace and versions", func() { @@ -318,7 +319,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func 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))) + Expect(manifests).To(Equal(strings.TrimSpace(string(expectedManifests)))) }) It("should deploy core when only addon is specified", func() { @@ -331,7 +332,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func Expect(manifests).ToNot(BeEmpty()) expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "only-addon.yaml")) Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) + Expect(manifests).To(Equal(strings.TrimSpace(string(expectedManifests)))) }) It("should deploy core, bootstrap, control plane when only infra and addon is specified", func() { @@ -345,7 +346,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func 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))) + Expect(manifests).To(Equal(strings.TrimSpace(string(expectedManifests)))) }) It("should deploy core and infra with feature gates enabled", func() { manifests, err := helmChart.Run(map[string]string{ @@ -367,7 +368,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func Expect(manifests).ToNot(BeEmpty()) expectedManifests, err := os.ReadFile(filepath.Join(customManifestsFolder, "feature-gates.yaml")) Expect(err).ToNot(HaveOccurred()) - Expect(manifests).To(Equal(string(expectedManifests))) + Expect(manifests).To(Equal(strings.TrimSpace(string(expectedManifests)))) }) It("should deploy all providers with manager defined but no feature gates enabled", func() { manifests, err := helmChart.Run(map[string]string{ @@ -382,7 +383,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func 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))) + Expect(manifests).To(Equal(strings.TrimSpace(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{ @@ -399,7 +400,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func 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))) + Expect(manifests).To(Equal(strings.TrimSpace(string(expectedManifests)))) }) It("should deploy kubeadm control plane with manager specified", func() { manifests, err := helmChart.Run(map[string]string{ @@ -416,6 +417,6 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func 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(expectedManifests)))) }) }) diff --git a/test/e2e/helm_test.go.bak b/test/e2e/helm_test.go.bak new file mode 100644 index 000000000..5a8224a56 --- /dev/null +++ b/test/e2e/helm_test.go.bak @@ -0,0 +1,422 @@ +//go:build e2e + +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package e2e + +import ( + "os" + "path/filepath" + "strings" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + appsv1 "k8s.io/api/apps/v1" + 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" + 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() { + It("should deploy a quick-start cluster-api-operator-providers chart", func() { + clusterProxy := helmClusterProxy.GetClient() + + fullHelmChart := &HelmChart{ + BinaryPath: helmBinaryPath, + Path: chartPath, + Name: capiOperatorRelease, + Kubeconfig: helmClusterProxy.GetKubeconfigPath(), + Wait: true, + Output: Full, + AdditionalFlags: Flags("--create-namespace", "--namespace", operatorNamespace), + } + + defer func() { + fullHelmChart.Commands = Commands(Uninstall) + fullHelmChart.AdditionalFlags = Flags("--namespace", operatorNamespace) + _, err := fullHelmChart.Run(nil) + Expect(err).ToNot(HaveOccurred()) + + err = clusterProxy.DeleteAllOf(ctx, &apiextensionsv1.CustomResourceDefinition{}, client.MatchingLabels{ + clusterctlv1.ClusterctlCoreLabel: capiOperatorRelease, + }) + Expect(err).ToNot(HaveOccurred()) + }() + + _, err := fullHelmChart.Run(nil) + Expect(err).ToNot(HaveOccurred()) + + coreProvider := &operatorv1.CoreProvider{ + ObjectMeta: metav1.ObjectMeta{ + Name: coreProviderName, + Namespace: operatorNamespace, + }, + } + Expect(clusterProxy.Create(ctx, coreProvider)).To(Succeed()) + + By("Waiting for the core provider deployment to be ready") + framework.WaitForDeploymentsAvailable(ctx, framework.WaitForDeploymentsAvailableInput{ + Getter: clusterProxy, + Deployment: &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{Name: coreProviderDeploymentName, Namespace: operatorNamespace}}, + }, e2eConfig.GetIntervals(helmClusterProxy.GetName(), "wait-controllers")...) + + By("Waiting for core provider to be ready") + WaitFor(ctx, For(coreProvider).In(clusterProxy).ToSatisfy( + HaveStatusConditionsTrue(coreProvider, operatorv1.ProviderInstalledCondition), + ), e2eConfig.GetIntervals(helmClusterProxy.GetName(), "wait-controllers")...) + + By("Waiting for status.InstalledVersion to be set") + WaitFor(ctx, For(coreProvider).In(clusterProxy).ToSatisfy(func() bool { + return ptr.Equal(coreProvider.Status.InstalledVersion, ptr.To(coreProvider.Spec.Version)) + }), e2eConfig.GetIntervals(helmClusterProxy.GetName(), "wait-controllers")...) + + bootstrapProvider := &operatorv1.BootstrapProvider{ObjectMeta: metav1.ObjectMeta{ + Name: bootstrapProviderName, + Namespace: operatorNamespace, + }} + deployment := &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{ + Name: bootstrapProviderDeploymentName, + Namespace: operatorNamespace, + }} + + Expect(clusterProxy.Create(ctx, bootstrapProvider)).To(Succeed()) + + By("Waiting for the bootstrap provider deployment to be ready") + framework.WaitForDeploymentsAvailable(ctx, framework.WaitForDeploymentsAvailableInput{ + Getter: clusterProxy, + Deployment: deployment, + }, e2eConfig.GetIntervals(helmClusterProxy.GetName(), "wait-controllers")...) + + By("Waiting for bootstrap provider to be ready") + WaitFor(ctx, For(bootstrapProvider).In(clusterProxy).ToSatisfy( + HaveStatusConditionsTrue(bootstrapProvider, operatorv1.ProviderInstalledCondition)), + e2eConfig.GetIntervals(helmClusterProxy.GetName(), "wait-controllers")...) + + By("Waiting for status.InstalledVersion to be set") + WaitFor(ctx, For(bootstrapProvider).In(clusterProxy).ToSatisfy(func() bool { + return ptr.Equal(bootstrapProvider.Status.InstalledVersion, &bootstrapProvider.Spec.Version) + }), e2eConfig.GetIntervals(helmClusterProxy.GetName(), "wait-controllers")...) + Expect(clusterProxy.Delete(ctx, bootstrapProvider)).To(Succeed()) + + By("Waiting for the bootstrap provider deployment to be deleted") + WaitForDelete(ctx, For(deployment).In(clusterProxy), + e2eConfig.GetIntervals(helmClusterProxy.GetName(), "wait-controllers")...) + + Expect(clusterProxy.Delete(ctx, coreProvider)).To(Succeed()) + }) + + It("should deploy default manifest set for quick-start process", func() { + fullRun := &HelmChart{ + BinaryPath: helmChart.BinaryPath, + Path: helmChart.Path, + Name: helmChart.Name, + Kubeconfig: helmChart.Kubeconfig, + DryRun: helmChart.DryRun, + Output: Manifests, + } + fullRun.Output = Manifests + manifests, err := fullRun.Run(nil) + Expect(err).ToNot(HaveOccurred()) + fullChartInstall, err := os.ReadFile(filepath.Join(customManifestsFolder, "full-chart-install.yaml")) + Expect(err).ToNot(HaveOccurred()) + Expect(manifests).To(Equal(strings.TrimSpace(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(strings.TrimSpace(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(strings.TrimSpace(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))) + }) +}) 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 9e60afc64..5e2d90f20 100644 --- a/test/e2e/resources/full-chart-install.yaml +++ b/test/e2e/resources/full-chart-install.yaml @@ -1,5 +1,5 @@ --- -# Source: cluster-api-operator/templates/operator-components.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/operator-components.yaml apiVersion: v1 kind: ServiceAccount metadata: @@ -8,7 +8,7 @@ metadata: name: capi-operator-manager namespace: 'default' --- -# Source: cluster-api-operator/templates/operator-components.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/operator-components.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -3138,7 +3138,7 @@ spec: subresources: status: {} --- -# Source: cluster-api-operator/templates/operator-components.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/operator-components.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -6268,7 +6268,7 @@ spec: subresources: status: {} --- -# Source: cluster-api-operator/templates/operator-components.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/operator-components.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -9400,7 +9400,7 @@ spec: subresources: status: {} --- -# Source: cluster-api-operator/templates/operator-components.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/operator-components.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -12530,7 +12530,7 @@ spec: subresources: status: {} --- -# Source: cluster-api-operator/templates/operator-components.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/operator-components.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -15662,7 +15662,7 @@ spec: subresources: status: {} --- -# Source: cluster-api-operator/templates/operator-components.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/operator-components.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -18792,7 +18792,7 @@ spec: subresources: status: {} --- -# Source: cluster-api-operator/templates/operator-components.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/operator-components.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -21925,7 +21925,7 @@ spec: subresources: status: {} --- -# Source: cluster-api-operator/templates/operator-components.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/operator-components.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -21940,7 +21940,7 @@ rules: verbs: - '*' --- -# Source: cluster-api-operator/templates/operator-components.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/operator-components.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -21956,7 +21956,7 @@ subjects: name: capi-operator-manager namespace: 'default' --- -# Source: cluster-api-operator/templates/operator-components.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/operator-components.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -22004,7 +22004,7 @@ rules: - patch - delete --- -# Source: cluster-api-operator/templates/operator-components.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/operator-components.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: @@ -22021,7 +22021,7 @@ subjects: name: capi-operator-manager namespace: 'default' --- -# Source: cluster-api-operator/templates/operator-components.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/operator-components.yaml apiVersion: v1 kind: Service metadata: @@ -22037,7 +22037,7 @@ spec: clusterctl.cluster.x-k8s.io/core: capi-operator control-plane: controller-manager --- -# Source: cluster-api-operator/templates/deployment.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: @@ -22152,25 +22152,25 @@ spec: - effect: NoSchedule key: node-role.kubernetes.io/control-plane --- -# Source: cluster-api-operator/templates/addon.yaml +# Source: cluster-api-operator-providers/templates/addon.yaml # Addon provider --- -# Source: cluster-api-operator/templates/bootstrap.yaml +# Source: cluster-api-operator-providers/templates/bootstrap.yaml # Bootstrap provider --- -# Source: cluster-api-operator/templates/control-plane.yaml +# Source: cluster-api-operator-providers/templates/control-plane.yaml # Control plane provider --- -# Source: cluster-api-operator/templates/core.yaml +# Source: cluster-api-operator-providers/templates/core.yaml # Core provider --- -# Source: cluster-api-operator/templates/infra.yaml +# Source: cluster-api-operator-providers/templates/infra.yaml # Infrastructure providers --- -# Source: cluster-api-operator/templates/ipam.yaml +# Source: cluster-api-operator-providers/templates/ipam.yaml # IPAM providers --- -# Source: cluster-api-operator/templates/operator-components.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/operator-components.yaml apiVersion: cert-manager.io/v1 kind: Certificate metadata: @@ -22187,7 +22187,7 @@ spec: name: capi-operator-selfsigned-issuer secretName: capi-operator-webhook-service-cert --- -# Source: cluster-api-operator/templates/operator-components.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/operator-components.yaml apiVersion: cert-manager.io/v1 kind: Issuer metadata: @@ -22198,7 +22198,7 @@ metadata: spec: selfSigned: {} --- -# Source: cluster-api-operator/templates/operator-components.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/operator-components.yaml apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration metadata: @@ -22363,7 +22363,7 @@ webhooks: - runtimeextensionproviders sideEffects: None --- -# Source: cluster-api-operator/templates/operator-components.yaml +# Source: cluster-api-operator-providers/charts/cluster-api-operator/templates/operator-components.yaml apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration metadata: 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