diff --git a/hack/examples/bases/docker/cluster/kustomization.yaml.tmpl b/hack/examples/bases/docker/cluster/kustomization.yaml.tmpl index 34bea6a80..31e38ab76 100644 --- a/hack/examples/bases/docker/cluster/kustomization.yaml.tmpl +++ b/hack/examples/bases/docker/cluster/kustomization.yaml.tmpl @@ -5,7 +5,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- https://github.com/kubernetes-sigs/cluster-api/releases/download/${CLUSTERCTL_VERSION}/cluster-template-development.yaml +- https://github.com/kubernetes-sigs/cluster-api/releases/download/${CAPI_VERSION}/cluster-template-development.yaml sortOptions: order: fifo diff --git a/hack/examples/bases/docker/clusterclass/kustomization.yaml.tmpl b/hack/examples/bases/docker/clusterclass/kustomization.yaml.tmpl index bfbef5ac5..56ca10a60 100644 --- a/hack/examples/bases/docker/clusterclass/kustomization.yaml.tmpl +++ b/hack/examples/bases/docker/clusterclass/kustomization.yaml.tmpl @@ -5,7 +5,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- https://github.com/kubernetes-sigs/cluster-api/releases/download/${CLUSTERCTL_VERSION}/clusterclass-quick-start.yaml +- https://github.com/kubernetes-sigs/cluster-api/releases/download/${CAPI_VERSION}/clusterclass-quick-start.yaml configurations: - kustomizeconfig.yaml diff --git a/make/clusterctl.mk b/make/clusterctl.mk index 0409eaa0e..a556f719e 100644 --- a/make/clusterctl.mk +++ b/make/clusterctl.mk @@ -1,8 +1,11 @@ # Copyright 2023 D2iQ, Inc. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +export CAPI_VERSION := $(shell go list -m -f '{{ .Version }}' sigs.k8s.io/cluster-api) +export CAPD_VERSION := $(shell go list -m -f '{{ .Version }}' sigs.k8s.io/cluster-api/test) export CAPA_VERSION := $(shell cd hack/third-party/capa && go list -m -f '{{ .Version }}' sigs.k8s.io/cluster-api-provider-aws/v2) export CAPX_VERSION := $(shell cd hack/third-party/capx && go list -m -f '{{ .Version }}' github.com/nutanix-cloud-native/cluster-api-provider-nutanix) +export CAAPH_VERSION := $(shell cd hack/third-party/caaph && go list -m -f '{{ .Version }}' sigs.k8s.io/cluster-api-addon-provider-helm) # Leave Nutanix credentials empty here and set it when creating the clusters .PHONY: clusterctl.init @@ -15,8 +18,11 @@ clusterctl.init: NUTANIX_ENDPOINT="" NUTANIX_PASSWORD="" NUTANIX_USER="" \ clusterctl init \ --kubeconfig=$(KIND_KUBECONFIG) \ - --infrastructure docker,aws:${CAPA_VERSION},nutanix:${CAPX_VERSION} \ - --addon helm \ + --core cluster-api:$(CAPI_VERSION) \ + --bootstrap kubeadm:$(CAPI_VERSION) \ + --control-plane kubeadm:$(CAPI_VERSION) \ + --infrastructure docker:$(CAPD_VERSION),aws:$(CAPA_VERSION),nutanix:$(CAPX_VERSION) \ + --addon helm:$(CAAPH_VERSION) \ --wait-providers .PHONY: clusterctl.delete diff --git a/make/examples.mk b/make/examples.mk index 3b7b9310a..b45306ece 100644 --- a/make/examples.mk +++ b/make/examples.mk @@ -3,10 +3,6 @@ export KUBERNETES_VERSION := v1.27.5 -export CLUSTERCTL_VERSION := $(shell clusterctl version -o short 2>/dev/null) -export CAPA_VERSION := $(shell cd hack/third-party/capa && go list -m -f '{{ .Version }}' sigs.k8s.io/cluster-api-provider-aws/v2) -export CAPX_VERSION := $(shell cd hack/third-party/capx && go list -m -f '{{ .Version }}' github.com/nutanix-cloud-native/cluster-api-provider-nutanix) - .PHONY: examples.sync examples.sync: ## Syncs the examples by fetching upstream examples and applying kustomize patches hack/examples/sync.sh