Skip to content

Commit

Permalink
test: update aws templates
Browse files Browse the repository at this point in the history
This PR moves to using our new cluster-api-templates for AWS.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
  • Loading branch information
rsmitty committed Feb 17, 2021
1 parent cc83b83 commit 6207fa5
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 140 deletions.
135 changes: 0 additions & 135 deletions hack/test/capi/cluster-aws.yaml

This file was deleted.

32 changes: 28 additions & 4 deletions hack/test/e2e-aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,34 @@ function setup {
--ena-support \
--name talos-e2e-${TAG} | jq -r '.ImageId')

# Setup the cluster YAML.
sed -e "s#{{REGION}}#${REGION}#g" \
-e "s/{{TAG}}/${SHA}/" \
-e "s#{{AMI}}#${ami}#g" ${PWD}/hack/test/capi/cluster-aws.yaml > ${TMP}/cluster.yaml
## Cluster-wide vars
export CLUSTER_NAME=${NAME_PREFIX}
export REGION=us-east-1
export SSH_KEY=talos-e2e
export VPC_ID=vpc-ff5c5687
export SUBNET=subnet-c4e9b3a0

## Control plane vars
export CP_COUNT=3
export CP_INSTANCE_TYPE=t3.large
export CP_VOL_SIZE=50
export CP_AMI_ID=${ami}
export CP_ADDL_SEC_GROUPS='[{id: sg-ebe8e59f}]'
export CP_IAM_PROFILE=CAPI_AWS_ControlPlane

## Worker vars
export WORKER_COUNT=3
export WORKER_INSTANCE_TYPE=t3.large
export WORKER_VOL_SIZE=50
export WORKER_AMI_ID=${ami}
export WORKER_ADDL_SEC_GROUPS='[{id: sg-ebe8e59f}]'
export WORKER_IAM_PROFILE=CAPI_AWS_Worker

## TODO: update to talos-systems once merged
${CLUSTERCTL} config cluster ${NAME_PREFIX} \
--kubeconfig /tmp/e2e/docker/kubeconfig \
--from https://github.com/talos-systems/cluster-api-templates/blob/main/aws/standard/standard.yaml > ${TMP}/cluster.yaml

}

setup
Expand Down
4 changes: 4 additions & 0 deletions hack/test/e2e-capi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ ${CLUSTERCTL} init \
--infrastructure "aws:v${CAPA_VERSION},gcp:v${CAPG_VERSION}" \
--bootstrap "talos:v${CABPT_VERSION}"

# Temporarily override CAPA image so secrets backend can be turned off
${KUBECTL} patch deploy -n capa-system capa-controller-manager --type='json' \
-p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value": "docker.io/rsmitty/cluster-api-aws-controller-amd64:dev"}]'

# Wait for the talosconfig
timeout=$(($(date +%s) + ${TIMEOUT}))
until ${KUBECTL} wait --timeout=1s --for=condition=Ready -n ${CABPT_NS} pods --all; do
Expand Down
2 changes: 1 addition & 1 deletion hack/test/e2e-gcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function setup {
export WORKER_IMAGE_ID=projects/${PROJECT}/global/images/talos-e2e-${SHA}

## TODO: update to talos-systems once merged
${CLUSTERCTL} config cluster talos-e2e-${SHA}-gcp \
${CLUSTERCTL} config cluster ${NAME_PREFIX} \
--kubeconfig /tmp/e2e/docker/kubeconfig \
--from https://github.com/rsmitty/cluster-api-templates/blob/main/gcp/standard/standard.yaml > ${TMP}/cluster.yaml

Expand Down
1 change: 1 addition & 0 deletions hack/test/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ mkdir -p "${TMP}"
# Talos

export TALOSCONFIG="${TMP}/talosconfig"
export TALOS_VERSION=v0.9

# Kubernetes

Expand Down

0 comments on commit 6207fa5

Please sign in to comment.