Skip to content

Commit

Permalink
Update EKS version to support Argo CD in nightly tests (#1978)
Browse files Browse the repository at this point in the history
## Description

This upgrades the EKS cluster version to support Argo CD during nightly
testing

## Related Issue

Fixes #N/A

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [X] Other (security config, docs update, etc)

## Checklist before merging

- [X] Test, docs, adr added or updated as needed
- [X] [Contributor Guide
Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow)
followed
  • Loading branch information
Racer159 authored Aug 21, 2023
1 parent 8a3e677 commit a8d4317
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nightly-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: ./build/zarf package create packages/distros/eks -o build --confirm

- name: Deploy the eks package
run: ./build/zarf package deploy build/zarf-package-distro-eks-multi-0.0.2.tar.zst --components=deploy-eks-cluster --set=CLUSTER_NAME=${{ inputs.cluster_name || 'zarf-nightly-eks-e2e-test' }},INSTANCE_TYPE=${{ inputs.instance_type || 't3.medium' }} --confirm
run: ./build/zarf package deploy build/zarf-package-distro-eks-multi-0.0.2.tar.zst --components=deploy-eks-cluster --set=EKS_CLUSTER_NAME=${{ inputs.cluster_name || 'zarf-nightly-eks-e2e-test' }},EKS_INSTANCE_TYPE=${{ inputs.instance_type || 't3.medium' }} --confirm

# NOTE: We are copying the secret because part of the e2e process destroys the `zarf` namespace. We still want to test the remove-ability of the eks cluster via the package.
- name: Copy the eks secret into a local file
Expand Down
12 changes: 6 additions & 6 deletions packages/distros/eks/eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: ###ZARF_VAR_CLUSTER_NAME###
region: ###ZARF_VAR_CLUSTER_REGION###
version: "###ZARF_VAR_CLUSTER_VERSION###"
name: ###ZARF_VAR_EKS_CLUSTER_NAME###
region: ###ZARF_VAR_EKS_CLUSTER_REGION###
version: "###ZARF_VAR_EKS_CLUSTER_VERSION###"

iam:
withOIDC: true

addons:
- name: aws-ebs-csi-driver
version: v1.5.2-eksbuild.1
version: "###ZARF_VAR_EBS_DRIVER_VERSION###"
attachPolicyARNs:
- arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy


managedNodeGroups:
- instanceType: ###ZARF_VAR_INSTANCE_TYPE###
name: ###ZARF_VAR_CLUSTER_NAME###-ng
- instanceType: ###ZARF_VAR_EKS_INSTANCE_TYPE###
name: ###ZARF_VAR_EKS_CLUSTER_NAME###-ng
minSize: 3
maxSize: 6
spot: true
21 changes: 14 additions & 7 deletions packages/distros/eks/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,25 @@ metadata:
version: 0.0.2

variables:
- name: CLUSTER_NAME
- name: EKS_CLUSTER_NAME
description: The name for the EKS cluster
prompt: true

- name: INSTANCE_TYPE
description: The instance type for the worker nodes
- name: EKS_INSTANCE_TYPE
description: The EC2 instance type for the worker nodes
default: t3.small

- name: CLUSTER_REGION
- name: EKS_CLUSTER_REGION
description: The AWS region to setup the cluster and associated networking
default: us-east-1

- name: CLUSTER_VERSION
default: "1.23"
- name: EKS_CLUSTER_VERSION
description: The Kubernetes version to use for the cluster
default: "1.27"

- name: EBS_DRIVER_VERSION
description: The AEBS driver version to use for the cluster (must be available on the K8s version)
default: "v1.21.0-eksbuild.1"

components:
- name: load-eksctl
Expand Down Expand Up @@ -52,7 +59,7 @@ components:
- cmd: ./eksctl create cluster --dry-run -f eks.yaml
- cmd: sleep 15
- cmd: ./eksctl create cluster -f eks.yaml
- cmd: ./eksctl utils write-kubeconfig -c ${ZARF_VAR_CLUSTER_NAME}
- cmd: ./eksctl utils write-kubeconfig -c ${ZARF_VAR_EKS_CLUSTER_NAME}
- cmd: ./zarf tools kubectl create namespace zarf
- cmd: ./zarf tools kubectl create secret generic zarf-eks-yaml -n zarf --from-file=eks.yaml

Expand Down

0 comments on commit a8d4317

Please sign in to comment.