Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat-3182-dedicated-h…
Browse files Browse the repository at this point in the history
…osts-selectors
  • Loading branch information
preflightsiren committed Oct 26, 2023
2 parents 03ba9be + 652b394 commit 57c79ee
Show file tree
Hide file tree
Showing 173 changed files with 6,625 additions and 732 deletions.
4 changes: 2 additions & 2 deletions .github/actions/e2e/install-karpenter/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ runs:
-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 }}" \
--set settings.aws.clusterName="${{ inputs.cluster_name }}" \
--set settings.clusterName="${{ inputs.cluster_name }}" \
--set settings.aws.defaultInstanceProfile="KarpenterNodeInstanceProfile-${{ inputs.cluster_name }}" \
--set settings.aws.interruptionQueueName="${{ inputs.cluster_name }}" \
--set settings.interruptionQueue="${{ inputs.cluster_name }}" \
--set controller.resources.requests.cpu=3 \
--set controller.resources.requests.memory=3Gi \
--set controller.resources.limits.cpu=3 \
Expand Down
9 changes: 5 additions & 4 deletions .github/actions/e2e/slack/notify/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ runs:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.git_ref }}
- shell: bash
- id: get-run-name
shell: bash
run: |
if [[ ${{ github.event_name }} == "schedule" ]]; then
RUN_NAME="${{ inputs.suite }}-periodic"
Expand All @@ -26,14 +27,14 @@ runs:
fi
# Convert the RUN_NAME to all lowercase
echo RUN_NAME=${RUN_NAME,,} >> $GITHUB_ENV
echo RUN_NAME=${RUN_NAME,,} >> $GITHUB_OUTPUT
- uses: ./.github/actions/e2e/slack/send-message
if: ${{ job.status == 'success' }}
with:
url: ${{ inputs.url }}
message: ":white_check_mark: ${{ env.RUN_NAME }} (https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})"
message: ":white_check_mark: ${{ steps.get-run-name.outputs.RUN_NAME }} (https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})"
- uses: ./.github/actions/e2e/slack/send-message
if: ${{ job.status == 'failure' }}
with:
url: ${{ inputs.url }}
message: ":x: ${{ env.RUN_NAME }} (https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})"
message: ":x: ${{ steps.get-run-name.outputs.RUN_NAME }} (https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})"
9 changes: 0 additions & 9 deletions .github/actions/upload-artifact/action.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/pull-request-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ docs: <-- Documentation changes that do not impact code
test: <-- Test changes that do not impact behavior
ci: <-- Changes that affect test or rollout automation
!${type}: <-- Include ! if your change includes a backwards incompatible change.
Please review the Karpenter contribution docs at https://karpenter.sh/docs/contributing/ before submitting your pull request.
-->

Fixes #N/A <!-- issue number -->
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/approval-comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
jobs:
approval-comment:
if: startsWith(github.event.review.body, '/karpenter snapshot') || startsWith(github.event.review.body, '/karpenter scale') || startsWith(github.event.review.body, '/karpenter conformance')
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -21,4 +20,7 @@ jobs:
echo ${{ github.event.pull_request.number }} >> /tmp/artifacts/metadata.txt
echo ${{ github.event.review.commit_id }} >> /tmp/artifacts/metadata.txt
cat /tmp/artifacts/metadata.txt
- uses: ./.github/actions/upload-artifact
- uses: actions/upload-artifact@v3
with:
name: artifacts
path: /tmp/artifacts
11 changes: 6 additions & 5 deletions .github/workflows/codegen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
- cron: '0 13 * * MON'

permissions:
id-token: write
pull-requests: write
contents: write
id-token: write # aws-actions/[email protected]
pull-requests: write # name: Create Pull Request
contents: write # name: Create Pull Request

jobs:
codegen:
Expand All @@ -29,9 +29,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ENABLE_GIT_PUSH: true
- run: export APICodeGenUpdate=$((cat /tmp/codegen-updates && echo "APICodeGenUpdate=true" >> $GITHUB_ENV) || echo "false")
- id: detect-changes
run: cat /tmp/codegen-updates && echo APICodeGenUpdate=true >> $GITHUB_OUTPUT
- name: Create Pull Request
if: env.APICodeGenUpdate == 'true'
if: steps.detect-changes.outputs.APICodeGenUpdate == 'true'
uses: actions/github-script@v6
with:
script: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/codeql-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ jobs:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
actions: read # github/codeql-action/init@v2
security-events: write # github/codeql-action/init@v2

strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docgen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [main]

permissions:
id-token: write
id-token: write # aws-actions/[email protected]

jobs:
docgen-ci:
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/e2e-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,23 @@ jobs:
strategy:
fail-fast: false
matrix:
suite: [Integration, Machine, Consolidation, Utilization, Interruption, Drift, Expiration, Chaos, IPv6]
suite:
- Beta/Integration
- Beta/NodeClaim
- Beta/Consolidation
- Beta/Interruption
- Beta/Drift
- Beta/Expiration
- Beta/Chaos
- Beta/IPv6
- Alpha/Integration
- Alpha/Machine
- Alpha/Consolidation
- Alpha/Interruption
- Alpha/Drift
- Alpha/Expiration
- Alpha/Chaos
- Alpha/IPv6
uses: ./.github/workflows/e2e.yaml
with:
suite: ${{ matrix.suite }}
Expand All @@ -71,5 +87,6 @@ jobs:
region: ${{ inputs.region }}
k8s_version: ${{ inputs.k8s_version }}
eksctl_version: ${{ inputs.eksctl_version }}
workflow_trigger: ${{ inputs.workflow_trigger }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
41 changes: 21 additions & 20 deletions .github/workflows/e2e-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ on:
eksctl_version:
type: string
default: v0.160.0-rc.0
workflow_trigger:
type: string
secrets:
SLACK_WEBHOOK_URL:
required: true
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
statuses: write
id-token: write # aws-actions/[email protected]
statuses: write # ./.github/actions/commit-status/start
jobs:
run-suite:
name: suite-upgrade
Expand All @@ -73,18 +74,18 @@ jobs:
role-to-assume: arn:aws:iam::${{ vars.ACCOUNT_ID }}:role/${{ vars.ROLE_NAME }}
aws-region: ${{ inputs.region }}
role-duration-seconds: 21600
- name: generate cluster name
- id: generate-cluster-name
run: |
CLUSTER_NAME="upgrade-$RANDOM$RANDOM"
echo "Using cluster name \"$CLUSTER_NAME\""
echo CLUSTER_NAME=$CLUSTER_NAME >> $GITHUB_ENV
- name: create eks cluster '${{ env.CLUSTER_NAME }}'
echo CLUSTER_NAME=$CLUSTER_NAME >> $GITHUB_OUTPUT
- name: create eks cluster '${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }}'
uses: ./.github/actions/e2e/create-cluster
with:
account_id: ${{ vars.ACCOUNT_ID }}
role: ${{ vars.ROLE_NAME }}
region: ${{ inputs.region }}
cluster_name: ${{ env.CLUSTER_NAME }}
cluster_name: ${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }}
k8s_version: ${{ inputs.k8s_version }}
eksctl_version: ${{ inputs.eksctl_version }}
ip_family: IPv4 # Set the value to IPv6 if IPv6 suite, else IPv4
Expand All @@ -95,7 +96,7 @@ jobs:
account_id: ${{ vars.ACCOUNT_ID }}
role: ${{ vars.ROLE_NAME }}
region: ${{ vars.PROMETHEUS_REGION }}
cluster_name: ${{ env.CLUSTER_NAME }}
cluster_name: ${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }}
workspace_id: ${{ vars.WORKSPACE_ID }}
git_ref: ${{ inputs.from_git_ref }}
- name: install karpenter
Expand All @@ -106,18 +107,18 @@ jobs:
region: ${{ inputs.region }}
ecr_account_id: ${{ vars.ECR_ACCOUNT_ID }}
ecr_region: ${{ vars.ECR_REGION }}
cluster_name: ${{ env.CLUSTER_NAME }}
cluster_name: ${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }}
git_ref: ${{ inputs.from_git_ref }}
- uses: actions/checkout@v4
with:
ref: ${{ inputs.to_git_ref }}
- name: upgrade eks cluster '${{ env.CLUSTER_NAME }}'
- name: upgrade eks cluster '${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }}'
uses: ./.github/actions/e2e/create-cluster
with:
account_id: ${{ vars.ACCOUNT_ID }}
role: ${{ vars.ROLE_NAME }}
region: ${{ inputs.region }}
cluster_name: ${{ env.CLUSTER_NAME }}
cluster_name: ${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }}
k8s_version: ${{ inputs.k8s_version }}
eksctl_version: ${{ inputs.eksctl_version }}
ip_family: IPv4 # Set the value to IPv6 if IPv6 suite, else IPv4
Expand All @@ -128,7 +129,7 @@ jobs:
account_id: ${{ vars.ACCOUNT_ID }}
role: ${{ vars.ROLE_NAME }}
region: ${{ vars.PROMETHEUS_REGION }}
cluster_name: ${{ env.CLUSTER_NAME }}
cluster_name: ${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }}
workspace_id: ${{ vars.WORKSPACE_ID }}
git_ref: ${{ inputs.to_git_ref }}
- name: upgrade crds
Expand All @@ -137,7 +138,7 @@ jobs:
account_id: ${{ vars.ACCOUNT_ID }}
role: ${{ vars.ROLE_NAME }}
region: ${{ inputs.region }}
cluster_name: ${{ env.CLUSTER_NAME }}
cluster_name: ${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }}
git_ref: ${{ inputs.to_git_ref }}
- name: upgrade karpenter
uses: ./.github/actions/e2e/install-karpenter
Expand All @@ -147,15 +148,15 @@ jobs:
region: ${{ inputs.region }}
ecr_account_id: ${{ vars.ECR_ACCOUNT_ID }}
ecr_region: ${{ vars.ECR_REGION }}
cluster_name: ${{ env.CLUSTER_NAME }}
cluster_name: ${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }}
git_ref: ${{ inputs.to_git_ref }}
- name: run the Upgrade test suite
run: |
aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }}
CLUSTER_NAME=${{ env.CLUSTER_NAME }} INTERRUPTION_QUEUE=${{ env.CLUSTER_NAME }} CLUSTER_ENDPOINT="$(aws eks describe-cluster --name ${{ env.CLUSTER_NAME }} --query "cluster.endpoint" --output text)" TEST_SUITE="Integration" make e2etests
aws eks update-kubeconfig --name ${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }}
CLUSTER_NAME=${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }} INTERRUPTION_QUEUE=${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }} CLUSTER_ENDPOINT="$(aws eks describe-cluster --name ${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }} --query "cluster.endpoint" --output text)" TEST_SUITE="Beta/Integration" make e2etests
- name: notify slack of success or failure
uses: ./.github/actions/e2e/slack/notify
if: (success() || failure()) && github.event_name != 'workflow_run' && github.event_name != 'conformance'
if: (success() || failure()) && github.event_name != 'workflow_run' && inputs.workflow_trigger != 'conformance'
with:
url: ${{ secrets.SLACK_WEBHOOK_URL }}
suite: Upgrade
Expand All @@ -168,15 +169,15 @@ jobs:
account_id: ${{ vars.ACCOUNT_ID }}
role: ${{ vars.ROLE_NAME }}
region: ${{ inputs.region }}
cluster_name: ${{ env.CLUSTER_NAME }}
- name: cleanup karpenter and cluster '${{ env.CLUSTER_NAME }}' resources
cluster_name: ${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }}
- name: cleanup karpenter and cluster '${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }}' resources
uses: ./.github/actions/e2e/cleanup
if: always()
with:
account_id: ${{ vars.ACCOUNT_ID }}
role: ${{ vars.ROLE_NAME }}
region: ${{ inputs.region }}
cluster_name: ${{ env.CLUSTER_NAME }}
cluster_name: ${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }}
git_ref: ${{ inputs.to_git_ref }}
eksctl_version: ${{ inputs.eksctl_version }}
- if: always() && github.event_name == 'workflow_run'
Expand Down
Loading

0 comments on commit 57c79ee

Please sign in to comment.