Skip to content

Commit

Permalink
Bump k0s version to v1.30.4+k0s.0, set CCM nodeSelector to null for a…
Browse files Browse the repository at this point in the history
…ws-hosted

* Try to modify the test workflow to run cleanup even during concurrency
  cancellations.

Signed-off-by: Kyle Squizzato <ksquizzato@mirantis.com>
  • Loading branch information
squizzi committed Sep 14, 2024
1 parent 62b82d5 commit e8d70dc
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 44 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
name: E2E Tests

concurrency:
group: test-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
pull_request:
branches:
Expand All @@ -20,8 +16,14 @@ env:

jobs:
e2etest:
concurrency:
group: test-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: E2E Tests
runs-on: ubuntu-latest
outputs:
clustername: ${{ steps.vars.outputs.clustername }}
version: ${{ steps.vars.outputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -66,19 +68,24 @@ jobs:
env:
REGISTRY_REPO: 'oci://ghcr.io/mirantis/hmc/charts-ci'
IMG: 'ghcr.io/mirantis/hmc/controller-ci:${{ steps.vars.outputs.version }}'
MANAGED_CLUSTER_NAME: '${{ steps.vars.outputs.clustername }}'
run: |
make test-e2e
- name: Archive test results
if: failure()
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: test-logs
path: |
test/e2e/*.log
- name: Cleanup test resources
if: always()
cleanup:
name: Cleanup
needs: e2etest
runs-on: ubuntu-latest
if: ${{ always() }}
timeout-minutes: 15
steps:
- name: AWS Test Resources
env:
CLUSTER_NAME: '${{ steps.vars.outputs.clustername }}'
MANAGED_CLUSTER_NAME: '${{ needs.e2etest.outputs.clustername }}'
run: |
make dev-aws-nuke
2 changes: 1 addition & 1 deletion scripts/aws-nuke-ccm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if [ "$1" == "ebs" ]; then
DESCRIBE_VOLUMES=$($AWSCLI ec2 describe-volumes \
--volume-id $VOLUME \
--output yaml | $YQ '.Volumes | to_entries[] | .value.Tags[] | select(.Key == "kubernetes.io/created-for/pvc/name")' | grep $CLUSTER_NAME)
if [ ! -z "${DESCRIBE_TAGS}" ]; then
if [ ! -z "${DESCRIBE_VOLUMES}" ]; then
echo "Deleting EBS Volume: $VOLUME"
$AWSCLI ec2 delete-volume --volume-id $VOLUME
fi
Expand Down
2 changes: 1 addition & 1 deletion templates/cluster/aws-hosted-cp/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ version: 0.1.3
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: '1.30.2+k0s.0'
appVersion: '1.30.4+k0s.0'
annotations:
hmc.mirantis.com/infrastructure-providers: aws
hmc.mirantis.com/controlplane-providers: k0smotron
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ spec:
- --cluster-name={{ include "cluster.name" . }}
# Removing the default `node-role.kubernetes.io/control-plane` node selector
# TODO: it does not work
# nodeSelector: ""
nodeSelector:
node-role.kubernetes.io/control-plane: null
- name: aws-ebs-csi-driver
namespace: kube-system
chartname: aws-ebs-csi-driver/aws-ebs-csi-driver
Expand Down
28 changes: 14 additions & 14 deletions templates/cluster/aws-hosted-cp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@ workersNumber: 2
clusterNetwork:
pods:
cidrBlocks:
- "10.244.0.0/16"
- '10.244.0.0/16'
services:
cidrBlocks:
- "10.96.0.0/12"
- '10.96.0.0/12'

# AWS cluster parameters
vpcID: ""
region: ""
sshKeyName: ""
vpcID: ''
region: ''
sshKeyName: ''
publicIP: false
subnets:
- id: ""
availabilityZone: ""
- id: ''
availabilityZone: ''
bastion:
enabled: false
disableIngressRules: false
allowedCIDRBlocks: []
instanceType: t2.micro
ami: ""
ami: ''
# AWS machines parameters
amiID: ""
amiID: ''
imageLookup:
format: "amzn2-ami-hvm*-gp2"
org: "137112412989"
baseOS: ""
format: 'amzn2-ami-hvm*-gp2'
org: '137112412989'
baseOS: ''
iamInstanceProfile: control-plane.cluster-api-provider-aws.sigs.k8s.io
instanceType: ""
instanceType: ''
securityGroupIDs: []
rootVolumeSize: 8

Expand All @@ -43,4 +43,4 @@ k0smotron:

# K0s parameters
k0s:
version: v1.30.2+k0s.0
version: v1.30.4+k0s.0
2 changes: 1 addition & 1 deletion templates/cluster/aws-standalone-cp/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version: 0.1.3
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: '1.30.2+k0s.0'
appVersion: '1.30.4+k0s.0'
annotations:
hmc.mirantis.com/infrastructure-providers: aws
hmc.mirantis.com/controlplane-providers: k0s
Expand Down
34 changes: 17 additions & 17 deletions templates/cluster/aws-standalone-cp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,46 @@ workersNumber: 2
clusterNetwork:
pods:
cidrBlocks:
- "10.244.0.0/16"
- '10.244.0.0/16'
services:
cidrBlocks:
- "10.96.0.0/12"
- '10.96.0.0/12'

# AWS cluster parameters
region: ""
sshKeyName: ""
region: ''
sshKeyName: ''
publicIP: false
bastion:
enabled: false
disableIngressRules: false
allowedCIDRBlocks: []
instanceType: t2.micro
ami: ""
ami: ''
# AWS machines parameters
controlPlane:
amiID: ""
amiID: ''
iamInstanceProfile: control-plane.cluster-api-provider-aws.sigs.k8s.io
instanceType: ""
instanceType: ''
rootVolumeSize: 8
imageLookup:
format: "amzn2-ami-hvm*-gp2"
org: "137112412989"
baseOS: ""
format: 'amzn2-ami-hvm*-gp2'
org: '137112412989'
baseOS: ''

worker:
amiID: ""
amiID: ''
iamInstanceProfile: control-plane.cluster-api-provider-aws.sigs.k8s.io
instanceType: ""
instanceType: ''
rootVolumeSize: 8
imageLookup:
format: "amzn2-ami-hvm*-gp2"
org: "137112412989"
baseOS: ""
format: 'amzn2-ami-hvm*-gp2'
org: '137112412989'
baseOS: ''

# K0s parameters
k0s:
version: v1.30.2+k0s.0
version: v1.30.4+k0s.0

# Optionally install applications defined under
# Optionally install applications defined under
# templates/beachheadservices into target cluster
installBeachHeadServices: false

0 comments on commit e8d70dc

Please sign in to comment.