1616 KUBERNETES_VERSION : v1.33.0
1717 CONTROLLER_IMG : cluster-api-operator
1818 TAG : smoke-test
19+ ARCH : amd64
1920
2021jobs :
2122 smoke-test :
22- name : Smoke Test (${{ matrix.install-method }})
2323 runs-on : ubuntu-latest
24- strategy :
25- matrix :
26- install-method : [legacy, recommended]
2724 steps :
2825 - name : Checkout code
2926 uses : actions/checkout@v4
@@ -38,24 +35,26 @@ jobs:
3835 - name : Install tools
3936 run : |
4037 # kubectl
41- curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64 /kubectl"
38+ curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${ARCH} /kubectl"
4239 chmod +x kubectl && sudo mv kubectl /usr/local/bin/
4340
4441 # yq
45- wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O yq
42+ wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_${ARCH} -O yq
4643 chmod +x yq && sudo mv yq /usr/local/bin/
4744
4845 # helm
4946 curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
5047
5148 # clusterctl
52- curl -L https://github.com/kubernetes-sigs/cluster-api/releases/latest/download/clusterctl-linux-amd64 -o clusterctl
53- chmod +x clusterctl && sudo mv clusterctl /usr/local/bin/
49+ VERSION=v1.10.5
50+ curl -L "https://github.com/kubernetes-sigs/cluster-api/releases/download/${VERSION}/clusterctl-linux-${ARCH}" -o clusterctl
51+ sudo install -o root -g root -m 0755 clusterctl /usr/local/bin/clusterctl
52+ clusterctl version
5453
5554 - name : Build Docker image
5655 run : |
5756 make docker-build
58- docker tag ${CONTROLLER_IMG}-amd64 :${TAG} ${CONTROLLER_IMG}:${TAG}
57+ docker tag ${CONTROLLER_IMG}-${ARCH} :${TAG} ${CONTROLLER_IMG}:${TAG}
5958
6059 - name : Build charts
6160 run : |
9796 --wait \
9897 --timeout 5m
9998
100- - name : Install Cluster API Operator (Recommended)
101- if : matrix.install-method == 'recommended'
99+ - name : Install Cluster API Operator
102100 run : |
103101 CHART_PACKAGE="out/package/cluster-api-operator-${HELM_CHART_TAG}.tgz"
104102 helm install capi-operator "$CHART_PACKAGE" \
@@ -110,7 +108,7 @@ jobs:
110108 --wait \
111109 --timeout 90s
112110
113- - name : Prepare providers values
111+ - name : Deploy providers
114112 run : |
115113 cat <<EOF > /tmp/providers-values.yaml
116114 core:
@@ -138,40 +136,13 @@ jobs:
138136 ClusterTopology: true
139137 EOF
140138
141- # Add cluster-api-operator configuration for legacy installation
142- if [ "${{ matrix.install-method }}" = "legacy" ]; then
143- cat <<EOF >> /tmp/providers-values.yaml
144- cluster-api-operator:
145- install: true
146- image:
147- manager:
148- repository: ${CONTROLLER_IMG}
149- tag: ${TAG}
150- pullPolicy: IfNotPresent
151- EOF
152- fi
153-
154- - name : Deploy providers (Recommended)
155- if : matrix.install-method == 'recommended'
156- run : |
157139 PROVIDERS_CHART_PACKAGE="out/package/cluster-api-operator-providers-${HELM_CHART_TAG}.tgz"
158140 helm install capi-providers "$PROVIDERS_CHART_PACKAGE" \
159141 -f /tmp/providers-values.yaml \
160142 --set cluster-api-operator.install=false \
161143 --set enableHelmHook=false \
162144 --wait
163145
164- - name : Deploy providers (Legacy)
165- if : matrix.install-method == 'legacy'
166- run : |
167- PROVIDERS_CHART_PACKAGE="out/package/cluster-api-operator-providers-${HELM_CHART_TAG}.tgz"
168- helm install capi-providers "$PROVIDERS_CHART_PACKAGE" \
169- --create-namespace \
170- -n capi-operator-system \
171- -f /tmp/providers-values.yaml \
172- --wait \
173- --timeout 300s
174-
175146 - name : Wait for providers
176147 run : |
177148 kubectl wait --for=condition=Ready --timeout=300s -n capi-system coreprovider/cluster-api
@@ -233,7 +204,6 @@ jobs:
233204 - name : Collect logs on failure
234205 if : failure()
235206 run : |
236- echo "=== Installation Method: ${{ matrix.install-method }} ==="
237207 echo "=== Recent Events ==="
238208 kubectl get events -A --sort-by='.lastTimestamp' | tail -50
239209
0 commit comments