Skip to content

Commit

Permalink
feat!: swap all kubectl refrences with uds zarf tools kubectl (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
JaseKoonce authored Sep 27, 2024
1 parent ea91338 commit c6bb2b0
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ This repository is used to create zarf packages of multiple add-ons for EKS.

The main intention is to be used with our terraform module [terraform-aws-eks](https://github.com/defenseunicorns/terraform-aws-eks). These Zarf packages will consume resources staged in AWS automatically or with Zarf you can override the values using a values.yaml file, providing your own values with a VALUES_OVERRIDES Zarf variable for each package.

# Utility Dependencies

- [Zarf](https://github.com/zarf-dev/zarf)
- [UDS-cli](https://github.com/defenseunicorns/uds-cli)
- [jq](https://stedolan.github.io/jq/)
- [aws-cli](https://aws.amazon.com/cli/)

# Example of how to use the Zarf package with arbitrary overrides using zarf dev

The example below will template the output with arbitrary overrides akin to a `helm template` command.
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-load-balancer-controller/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ components:
darwin: bash
before:
# get the cluster name
- cmd: kubectl config current-context | awk -F'[:/]' '{print $NF}'
- cmd: uds zarf tools kubectl config current-context | awk -F'[:/]' '{print $NF}'
setVariables:
- name: CLUSTER_NAME
- cmd: aws eks describe-cluster --name ${ZARF_VAR_CLUSTER_NAME} --query 'cluster.endpoint' --output text | cut -d . -f3
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-node-termination-handler/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ components:
darwin: bash
before:
# get the cluster name
- cmd: kubectl config current-context | awk -F'[:/]' '{print $NF}'
- cmd: uds zarf tools kubectl config current-context | awk -F'[:/]' '{print $NF}'
setVariables:
- name: CLUSTER_NAME
- cmd: aws eks describe-cluster --name ${ZARF_VAR_CLUSTER_NAME} --query 'cluster.endpoint' --output text | cut -d . -f3
Expand Down
2 changes: 1 addition & 1 deletion packages/cluster-autoscaler/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ components:
darwin: bash
before:
# get the cluster name
- cmd: kubectl config current-context | awk -F'[:/]' '{print $NF}'
- cmd: uds zarf tools kubectl config current-context | awk -F'[:/]' '{print $NF}'
setVariables:
- name: CLUSTER_NAME
- cmd: aws eks describe-cluster --name ${ZARF_VAR_CLUSTER_NAME} --query 'cluster.endpoint' --output text | cut -d . -f3
Expand Down
2 changes: 1 addition & 1 deletion packages/external-secrets/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ components:
darwin: bash
before:
# get the cluster name
- cmd: kubectl config current-context | awk -F'[:/]' '{print $NF}'
- cmd: uds zarf tools kubectl config current-context | awk -F'[:/]' '{print $NF}'
setVariables:
- name: CLUSTER_NAME
- cmd: |
Expand Down
2 changes: 1 addition & 1 deletion packages/storageclass/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ components:
darwin: bash
before:
# get the cluster name
- cmd: kubectl config current-context | awk -F'[:/]' '{print $NF}'
- cmd: uds zarf tools kubectl config current-context | awk -F'[:/]' '{print $NF}'
setVariables:
- name: CLUSTER_NAME
- cmd: |
Expand Down

0 comments on commit c6bb2b0

Please sign in to comment.