Skip to content

Commit ba26737

Browse files
author
Richard Kovacs
committed
Use official release of CAPL
1 parent 529caf5 commit ba26737

File tree

10 files changed

+14
-2199
lines changed

10 files changed

+14
-2199
lines changed

devbox.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
"init_hook": [
1212
"export GOROOT=$(go env GOROOT)",
1313
"export KUBECONFIG=${PWD}/e2e/test/kind-management.conf",
14-
"export K8S_VERSION=v1.28.7",
15-
"export REGION=eu-sea"
14+
"export K8S_VERSION=v1.28.7"
1615
],
1716
"scripts": {}
1817
}

e2e/Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ endif
1212

1313
.PHONY: test reuse-and-test clean
1414

15-
test-cluster: ctlptl kind clean-cluster
15+
test-cluster: kind ctlptl kind clean-cluster
1616
./test/scripts/create_management_cluster.sh $(K8S_VERSION)
1717

1818
clean-cluster: ctlptl
19-
ctlptl delete cluster kind-management --ignore-not-found
19+
$(CTLPTL) delete cluster kind-management --ignore-not-found
2020
rm -rf $(MANAGEMENT_KUBECONFIG)
2121

2222
reuse-and-test: SUITE_ARGS='--reuse'
2323

2424
test reuse-and-test: clusterctl ginkgo check-token test-cluster
2525
go list -m; \
26-
MANAGEMENT_KUBECONFIG=$(ROOT_DIR)/e2e/$(MANAGEMENT_KUBECONFIG) ginkgo -r --vv --trace $(TEST_ARGS) -- --image=${IMG} --k8s_version=${K8S_VERSION} $(SUITE_ARGS)
26+
MANAGEMENT_KUBECONFIG=$(ROOT_DIR)/e2e/$(MANAGEMENT_KUBECONFIG) $(GINKGO) -r --vv --trace $(TEST_ARGS) -- --image=${IMG} --k8s_version=${K8S_VERSION} $(SUITE_ARGS)
2727

2828
$(MAKE) clean-cluster
2929

@@ -73,6 +73,8 @@ ifdef DEVBOX_PACKAGES_DIR
7373
endif
7474

7575
export PATH := $(CACHE_BIN):$(PATH)
76+
$(CACHE_BIN):
77+
mkdir -p $(CACHE_BIN)
7678
$(LOCALBIN):
7779
mkdir -p $(LOCALBIN)
7880

e2e/test/ccm_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var (
2222
useExisting = false
2323
reuse = false
2424
clusterName string
25-
region = "us-sea"
25+
region = "us-east"
2626
k8s_version string
2727
linodeURL = "https://api.linode.com"
2828
)

e2e/test/scripts/clusterctl.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CLUSTER_TOPOLOGY: "true"
22
EXP_CLUSTER_RESOURCE_SET: "true"
33
providers:
4-
- name: linode
5-
url: ${PWD}/infrastructure-linode/${CAPL_VERSION}/infrastructure-components.yaml
4+
- name: akamai-linode
5+
url: https://github.com/linode/cluster-api-provider-linode/releases/latest/infrastructure-components.yaml
66
type: InfrastructureProvider

e2e/test/scripts/create_cluster.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,11 @@ export ROOT_DIR="$(git rev-parse --show-toplevel)"
1818

1919
if [[ -z "$5" ]]
2020
then
21-
export LINODE_REGION="us-sea"
21+
export LINODE_REGION="eu-west"
2222
else
2323
export LINODE_REGION="$5"
2424
fi
2525

26-
METADATA_REGIONS="nl-ams in-maa us-ord id-cgk us-lax es-mad us-mia it-mil jp-osa fr-par br-gru us-sea se-sto us-iad"
27-
[[ "$METADATA_REGIONS" =~ .*"${LINODE_REGION}".* ]] || (echo "Given region doesn't support Metadata service" ; exit 1)
28-
2926
(cd ${ROOT_DIR}/deploy ; set +x ; ./generate-manifest.sh ${LINODE_TOKEN} ${LINODE_REGION})
3027

3128
kubectl create ns ${CLUSTER_NAME}

e2e/test/scripts/create_management_cluster.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ set -o nounset
66
set -x
77

88
export KUBERNETES_VERSION="$1"
9+
export GOPROXY=off # clusterctl workaround to fetch addons
910
export CAPI_VERSION="v1.6.3"
10-
export HELM_VERSION="v0.1.1-alpha.1"
11-
export CAPL_VERSION="0.1.0"
11+
export HELM_VERSION="v0.2.1"
1212
export KUBECONFIG="$(realpath "$(dirname "$0")/../kind-management.conf")"
1313

1414
ctlptl create cluster kind \
@@ -21,7 +21,7 @@ prepare_images() {
2121
echo "${images//[\'\"]}" | xargs -I {} sh -c 'docker pull '{}' ; kind -n management load docker-image '{}
2222
}
2323

24-
(set +x ; prepare_images "$(cat $(realpath "$(dirname "$0")/infrastructure-linode/${CAPL_VERSION}/infrastructure-components.yaml"))")
24+
(set +x; prepare_images "$(curl -sfL $(cat $(realpath "$(dirname "$0")/clusterctl.yaml") | grep cluster-api-provider-linode | awk '{print $2}'))")
2525
(set +x ; prepare_images "$(clusterctl init list-images \
2626
--core cluster-api:${CAPI_VERSION} \
2727
--addon helm:${HELM_VERSION} \
@@ -31,5 +31,5 @@ prepare_images() {
3131
--wait-providers \
3232
--core cluster-api:${CAPI_VERSION} \
3333
--addon helm:${HELM_VERSION} \
34-
--infrastructure linode:${CAPL_VERSION} \
34+
--infrastructure akamai-linode \
3535
--config clusterctl.yaml)

e2e/test/scripts/infrastructure-linode/0.1.0/cluster-template-clusterclass-kubeadm.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)