Skip to content

Commit

Permalink
fix: use inputs for composite action (#4753)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdeal authored Oct 5, 2023
1 parent d145290 commit d3f6326
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/actions/e2e/install-karpenter/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ inputs:
region:
description: "Region to access AWS"
required: true
ecr_account_id:
description: "Account ID for the ECR repo"
required: true
ecr_region:
description: "Region for the ECR repo"
required: true
cluster_name:
description: 'Name of the cluster to be launched by eksctl'
required: true
Expand Down Expand Up @@ -37,13 +43,13 @@ runs:
- name: login to ecr via docker
uses: docker/login-action@v3
with:
registry: ${{ vars.ECR_ACCOUNT_ID }}.dkr.ecr.${{ vars.ECR_REGION }}.amazonaws.com
registry: ${{ inputs.ecr_account_id }}.dkr.ecr.${{ inputs.ecr_region }}.amazonaws.com
logout: true
- name: install-karpenter
shell: bash
run: |
aws eks update-kubeconfig --name "${{ inputs.cluster_name }}"
helm upgrade --install karpenter oci://${{ vars.ECR_ACCOUNT_ID }}.dkr.ecr.${{ vars.ECR_REGION }}.amazonaws.com/karpenter/snapshot/karpenter \
helm upgrade --install karpenter oci://${{ inputs.ecr_account_id }}.dkr.ecr.${{ inputs.ecr_region }}.amazonaws.com/karpenter/snapshot/karpenter \
-n karpenter \
--version "v0-$(git rev-parse HEAD)" \
--set serviceAccount.annotations."eks\.amazonaws\.com/role-arn"="arn:aws:iam::${{ inputs.account_id }}:role/karpenter-irsa-${{ inputs.cluster_name }}" \
Expand All @@ -69,6 +75,6 @@ runs:
shell: bash
run: |
helm diff upgrade --namespace karpenter \
karpenter oci://${{ vars.ECR_ACCOUNT_ID }}.dkr.ecr.${{ vars.ECR_REGION }}.amazonaws.com/karpenter/snapshot/karpenter \
karpenter oci://${{ inputs.ecr_account_id }}.dkr.ecr.${{ inputs.ecr_region }}.amazonaws.com/karpenter/snapshot/karpenter \
--version v0-$(git rev-parse HEAD) \
--reuse-values --three-way-merge --detailed-exitcode
4 changes: 4 additions & 0 deletions .github/workflows/e2e-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ jobs:
account_id: ${{ vars.ACCOUNT_ID }}
role: ${{ vars.ROLE_NAME }}
region: ${{ inputs.region }}
ecr_account_id: ${{ vars.ECR_ACCOUNT_ID }}
ecr_region: ${{ vars.ECR_REGION }}
cluster_name: ${{ env.CLUSTER_NAME }}
git_ref: ${{ inputs.from_git_ref }}
- uses: actions/checkout@v4
Expand Down Expand Up @@ -143,6 +145,8 @@ jobs:
account_id: ${{ vars.ACCOUNT_ID }}
role: ${{ vars.ROLE_NAME }}
region: ${{ inputs.region }}
ecr_account_id: ${{ vars.ECR_ACCOUNT_ID }}
ecr_region: ${{ vars.ECR_REGION }}
cluster_name: ${{ env.CLUSTER_NAME }}
git_ref: ${{ inputs.to_git_ref }}
- name: run the Upgrade test suite
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ jobs:
account_id: ${{ vars.ACCOUNT_ID }}
role: ${{ vars.ROLE_NAME }}
region: ${{ inputs.region }}
ecr_account_id: ${{ vars.ECR_ACCOUNT_ID }}
ecr_region: ${{ vars.ECR_REGION }}
cluster_name: ${{ env.CLUSTER_NAME }}
git_ref: ${{ inputs.git_ref }}
- name: run the ${{ inputs.suite }} test suite
Expand Down

0 comments on commit d3f6326

Please sign in to comment.