Skip to content

Commit aad485d

Browse files
committed
fixup! test(e2e): Specify default AWS env vars in e2e config
1 parent 365615f commit aad485d

File tree

9 files changed

+42
-33
lines changed

9 files changed

+42
-33
lines changed

.github/workflows/checks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ jobs:
9696
report_paths: 'junit-e2e.xml'
9797
check_name: 'e2e test report'
9898
detailed_summary: true
99+
require_passed_tests: true
99100

100101
lint-go:
101102
runs-on: ubuntu-22.04

examples/capi-quick-start/aws-cluster-calico-crs.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ spec:
3636
aws:
3737
ami:
3838
lookup:
39-
baseOS: centos-7
40-
format: capa-ami-{{.BaseOS}}-?{{.K8sVersion}}-*
41-
org: "258751437250"
39+
baseOS: ${AMI_LOOKUP_BASEOS}
40+
format: ${AMI_LOOKUP_FORMAT}
41+
org: "${AMI_LOOKUP_ORG}"
4242
- name: workerConfig
4343
value:
4444
aws:
4545
ami:
4646
lookup:
47-
baseOS: centos-7
48-
format: capa-ami-{{.BaseOS}}-?{{.K8sVersion}}-*
49-
org: "258751437250"
47+
baseOS: ${AMI_LOOKUP_BASEOS}
48+
format: ${AMI_LOOKUP_FORMAT}
49+
org: "${AMI_LOOKUP_ORG}"
5050
version: ${KUBERNETES_VERSION}
5151
workers:
5252
machineDeployments:

examples/capi-quick-start/aws-cluster-calico-helm-addon.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ spec:
3636
aws:
3737
ami:
3838
lookup:
39-
baseOS: centos-7
40-
format: capa-ami-{{.BaseOS}}-?{{.K8sVersion}}-*
41-
org: "258751437250"
39+
baseOS: ${AMI_LOOKUP_BASEOS}
40+
format: ${AMI_LOOKUP_FORMAT}
41+
org: "${AMI_LOOKUP_ORG}"
4242
- name: workerConfig
4343
value:
4444
aws:
4545
ami:
4646
lookup:
47-
baseOS: centos-7
48-
format: capa-ami-{{.BaseOS}}-?{{.K8sVersion}}-*
49-
org: "258751437250"
47+
baseOS: ${AMI_LOOKUP_BASEOS}
48+
format: ${AMI_LOOKUP_FORMAT}
49+
org: "${AMI_LOOKUP_ORG}"
5050
version: ${KUBERNETES_VERSION}
5151
workers:
5252
machineDeployments:

examples/capi-quick-start/aws-cluster-cilium-crs.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ spec:
3636
aws:
3737
ami:
3838
lookup:
39-
baseOS: centos-7
40-
format: capa-ami-{{.BaseOS}}-?{{.K8sVersion}}-*
41-
org: "258751437250"
39+
baseOS: ${AMI_LOOKUP_BASEOS}
40+
format: ${AMI_LOOKUP_FORMAT}
41+
org: "${AMI_LOOKUP_ORG}"
4242
- name: workerConfig
4343
value:
4444
aws:
4545
ami:
4646
lookup:
47-
baseOS: centos-7
48-
format: capa-ami-{{.BaseOS}}-?{{.K8sVersion}}-*
49-
org: "258751437250"
47+
baseOS: ${AMI_LOOKUP_BASEOS}
48+
format: ${AMI_LOOKUP_FORMAT}
49+
org: "${AMI_LOOKUP_ORG}"
5050
version: ${KUBERNETES_VERSION}
5151
workers:
5252
machineDeployments:

examples/capi-quick-start/aws-cluster-cilium-helm-addon.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ spec:
3636
aws:
3737
ami:
3838
lookup:
39-
baseOS: centos-7
40-
format: capa-ami-{{.BaseOS}}-?{{.K8sVersion}}-*
41-
org: "258751437250"
39+
baseOS: ${AMI_LOOKUP_BASEOS}
40+
format: ${AMI_LOOKUP_FORMAT}
41+
org: "${AMI_LOOKUP_ORG}"
4242
- name: workerConfig
4343
value:
4444
aws:
4545
ami:
4646
lookup:
47-
baseOS: centos-7
48-
format: capa-ami-{{.BaseOS}}-?{{.K8sVersion}}-*
49-
org: "258751437250"
47+
baseOS: ${AMI_LOOKUP_BASEOS}
48+
format: ${AMI_LOOKUP_FORMAT}
49+
org: "${AMI_LOOKUP_ORG}"
5050
version: ${KUBERNETES_VERSION}
5151
workers:
5252
machineDeployments:

hack/examples/bases/aws/kustomization.yaml.tmpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ patches:
3838
aws:
3939
ami:
4040
lookup:
41-
format: "capa-ami-{{.BaseOS}}-?{{.K8sVersion}}-*"
42-
org: "258751437250"
43-
baseOS: centos-7
41+
format: "$${AMI_LOOKUP_FORMAT}"
42+
org: "$${AMI_LOOKUP_ORG}"
43+
baseOS: "$${AMI_LOOKUP_BASEOS}"
4444
- op: "add"
4545
path: "/spec/topology/variables/-"
4646
value:
@@ -49,9 +49,9 @@ patches:
4949
aws:
5050
ami:
5151
lookup:
52-
format: "capa-ami-{{.BaseOS}}-?{{.K8sVersion}}-*"
53-
org: "258751437250"
54-
baseOS: centos-7
52+
format: "$${AMI_LOOKUP_FORMAT}"
53+
org: "$${AMI_LOOKUP_ORG}"
54+
baseOS: "$${AMI_LOOKUP_BASEOS}"
5555
- op: "add"
5656
path: "/spec/topology/variables/0/value/addons/cpi"
5757
value: {}

hack/examples/sync.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,12 @@ kustomize build ./hack/examples |
102102
) \
103103
>/dev/null
104104

105-
sed -i'' "s/^ name: .\+$/ name: \${CLUSTER_NAME}/" "${EXAMPLE_CLUSTERS_DIR}"/*.yaml
105+
#shellcheck disable=SC2016
106+
sed -i'' 's/^ name: .\+$/ name: ${CLUSTER_NAME}/' "${EXAMPLE_CLUSTERS_DIR}"/*.yaml
107+
108+
# TODO Remove once kustomize supports retaining quotes in what will be numeric values.
109+
#shellcheck disable=SC2016
110+
sed -i'' 's/${AMI_LOOKUP_ORG}/"${AMI_LOOKUP_ORG}"/' "${EXAMPLE_CLUSTERS_DIR}"/*.yaml
106111

107112
# TODO Remove once CAPA templates default to using external cloud provider.
108113
sed -i'' 's/cloud-provider:\ aws/cloud-provider:\ external/g' "${EXAMPLE_CLUSTERCLASSES_DIR}/aws-cluster-class.yaml"

test/e2e/config/cre.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ variables:
140140
# The following Kubernetes versions should be the latest versions with already published kindest/node images.
141141
# This avoids building node images in the default case which improves the test duration significantly.
142142
KUBERNETES_VERSION_MANAGEMENT: "v1.29.2"
143-
KUBERNETES_VERSION: "v1.28.3"
143+
KUBERNETES_VERSION: "v1.28.7"
144144
SERVICE_CIDR: "10.128.0.0/12"
145145
POD_CIDR: "192.168.0.0/16"
146146
NODE_DRAIN_TIMEOUT: "60s"
@@ -153,6 +153,9 @@ variables:
153153
EXP_MACHINE_SET_PREFLIGHT_CHECKS: "true"
154154
CAPI_DIAGNOSTICS_ADDRESS: ":8080"
155155
CAPI_INSECURE_DIAGNOSTICS: "true"
156+
AMI_LOOKUP_FORMAT: "konvoy-ami-{{.BaseOS}}-release-?{{.K8sVersion}}-*"
157+
AMI_LOOKUP_BASEOS: "rocky-9.1"
158+
AMI_LOOKUP_ORG: "999867407951"
156159

157160
intervals:
158161
default/wait-controllers: ["3m", "10s"]

test/e2e/quick_start_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var _ = Describe("Quick start", Serial, func() {
4949
func() {
5050
e2e.QuickStartSpec(ctx, func() e2e.QuickStartSpecInput {
5151
prov := strings.ToLower(provider)
52-
if slices.Contains(e2eConfig.InfrastructureProviders(), prov) {
52+
if !slices.Contains(e2eConfig.InfrastructureProviders(), prov) {
5353
Skip(fmt.Sprintf("provider %s is not enabled", prov))
5454
}
5555

0 commit comments

Comments
 (0)