mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-25 07:29:38 -05:00
AB#2266: Test all supported version with e2e-tests
* e2e-test workflows execute two hours earlier. * Run quick-mode e2e tests for the two older versions we support. This triggers every night, together with the existing e2e tests. Idea here is that we know that a cluster can be setup and initialized. * Run full e2e tests for the two older versions each sunday. * Do not abort manual e2e runs. This allows for parallel runs. * Run unprivileged container
This commit is contained in:
parent
c52bfc79d3
commit
1b9600c307
128
.github/actions/constellation_create/action.yml
vendored
128
.github/actions/constellation_create/action.yml
vendored
@ -17,69 +17,77 @@ inputs:
|
|||||||
machineType:
|
machineType:
|
||||||
description: "Machine type of VM to spawn."
|
description: "Machine type of VM to spawn."
|
||||||
required: true
|
required: true
|
||||||
|
kubernetesVersion:
|
||||||
|
description: "Kubernetes version to create the cluster from."
|
||||||
|
required: false
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Install kubectl
|
- name: Install kubectl
|
||||||
run: |
|
run: |
|
||||||
curl -LO https://dl.k8s.io/release/v1.23.0/bin/linux/amd64/kubectl
|
curl -LO https://dl.k8s.io/release/v1.23.0/bin/linux/amd64/kubectl
|
||||||
install kubectl /usr/local/bin
|
install kubectl /usr/local/bin
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Install yq jq
|
- name: Install yq jq
|
||||||
run: |
|
run: |
|
||||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CC86BB64
|
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CC86BB64
|
||||||
sudo add-apt-repository ppa:rmescandon/yq
|
sudo add-apt-repository ppa:rmescandon/yq
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install yq jq -y
|
sudo apt install yq jq -y
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Constellation config generate
|
- name: Constellation config generate
|
||||||
run: |
|
run: |
|
||||||
constellation config generate ${{ inputs.cloudProvider }}
|
constellation config generate ${{ inputs.cloudProvider }}
|
||||||
yq eval -i \
|
|
||||||
"(.provider | select(. | has(\"azure\")).azure.subscription) = \"0d202bbb-4fa7-4af8-8125-58c269a05435\" |
|
|
||||||
(.provider | select(. | has(\"azure\")).azure.tenant) = \"adb650a8-5da3-4b15-b4b0-3daf65ff7626\" |
|
|
||||||
(.provider | select(. | has(\"azure\")).azure.location) = \"North Europe\" |
|
|
||||||
(.provider | select(. | has(\"azure\")).azure.userAssignedIdentity) = \"/subscriptions/0d202bbb-4fa7-4af8-8125-58c269a05435/resourceGroups/constellation-images/providers/Microsoft.ManagedIdentity/userAssignedIdentities/constellation-dev-identity\"" \
|
|
||||||
constellation-conf.yaml
|
|
||||||
yq eval -i \
|
|
||||||
"(.provider | select(. | has(\"gcp\")).gcp.project) = \"constellation-331613\" |
|
|
||||||
(.provider | select(. | has(\"gcp\")).gcp.region) = \"europe-west3\" |
|
|
||||||
(.provider | select(. | has(\"gcp\")).gcp.zone) = \"europe-west3-b\"" \
|
|
||||||
constellation-conf.yaml
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Set latest image
|
yq eval -i \
|
||||||
run: |
|
"(.provider | select(. | has(\"azure\")).azure.subscription) = \"0d202bbb-4fa7-4af8-8125-58c269a05435\" |
|
||||||
case $CSP in
|
(.provider | select(. | has(\"azure\")).azure.tenant) = \"adb650a8-5da3-4b15-b4b0-3daf65ff7626\" |
|
||||||
azure)
|
(.provider | select(. | has(\"azure\")).azure.location) = \"North Europe\" |
|
||||||
LATEST_AZURE_IMAGE=$(az sig image-version list --resource-group constellation-images --gallery-name Constellation --gallery-image-definition constellation-coreos --query "sort_by([], &publishingProfile.publishedDate)[].id" -o table | tail -n 1)
|
(.provider | select(. | has(\"azure\")).azure.userAssignedIdentity) = \"/subscriptions/0d202bbb-4fa7-4af8-8125-58c269a05435/resourceGroups/constellation-images/providers/Microsoft.ManagedIdentity/userAssignedIdentities/constellation-dev-identity\"" \
|
||||||
yq eval -i "(.provider.azure.image) = \"${LATEST_AZURE_IMAGE}\"" constellation-conf.yaml
|
constellation-conf.yaml
|
||||||
;;
|
yq eval -i \
|
||||||
gcp)
|
"(.provider | select(. | has(\"gcp\")).gcp.project) = \"constellation-331613\" |
|
||||||
LATEST_GCP_IMAGE_TIMESTAMP=$(gcloud compute images list --filter="name~'constellation-coreos-\d{10}'" --sort-by=creationTimestamp --project constellation-images --format="table(name)" | tail -n 1 | cut -d '-' -f3)
|
(.provider | select(. | has(\"gcp\")).gcp.region) = \"europe-west3\" |
|
||||||
yq eval -i "(.provider.gcp.image) = \"projects/constellation-images/global/images/constellation-coreos-${LATEST_GCP_IMAGE_TIMESTAMP}\"" constellation-conf.yaml
|
(.provider | select(. | has(\"gcp\")).gcp.zone) = \"europe-west3-b\"" \
|
||||||
;;
|
constellation-conf.yaml
|
||||||
esac
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
CSP: ${{ inputs.cloudProvider }}
|
|
||||||
|
|
||||||
- name: Constellation create
|
if [ ${{ inputs.kubernetesVersion != '' }} = true ]; then
|
||||||
run: |
|
yq eval -i "(.kubernetesVersion) = ${{ inputs.kubernetesVersion }}" constellation-conf.yaml
|
||||||
echo "Creating cluster using config:"
|
fi
|
||||||
cat constellation-conf.yaml
|
shell: bash
|
||||||
constellation create ${{ inputs.cloudProvider }} -c ${{ inputs.controlNodesCount }} -w ${{ inputs.workerNodesCount }} -t ${{ inputs.machineType }} --name e2e-test -y
|
|
||||||
shell: bash
|
|
||||||
- name: Upload constellation-state.json
|
|
||||||
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8
|
|
||||||
with:
|
|
||||||
name: constellation-state.json
|
|
||||||
path: constellation-state.json
|
|
||||||
if: ${{ always() && !env.ACT }}
|
|
||||||
|
|
||||||
- name: Constellation init
|
- name: Set latest image
|
||||||
run: |
|
run: |
|
||||||
if [ ${{ inputs.autoscale }} = true ]; then autoscale=--autoscale; fi
|
case $CSP in
|
||||||
constellation init ${autoscale}
|
azure)
|
||||||
shell: bash
|
LATEST_AZURE_IMAGE=$(az sig image-version list --resource-group constellation-images --gallery-name Constellation --gallery-image-definition constellation-coreos --query "sort_by([], &publishingProfile.publishedDate)[].id" -o table | tail -n 1)
|
||||||
|
yq eval -i "(.provider.azure.image) = \"${LATEST_AZURE_IMAGE}\"" constellation-conf.yaml
|
||||||
|
;;
|
||||||
|
gcp)
|
||||||
|
LATEST_GCP_IMAGE_TIMESTAMP=$(gcloud compute images list --filter="name~'constellation-coreos-\d{10}'" --sort-by=creationTimestamp --project constellation-images --format="table(name)" | tail -n 1 | cut -d '-' -f3)
|
||||||
|
yq eval -i "(.provider.gcp.image) = \"projects/constellation-images/global/images/constellation-coreos-${LATEST_GCP_IMAGE_TIMESTAMP}\"" constellation-conf.yaml
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
CSP: ${{ inputs.cloudProvider }}
|
||||||
|
|
||||||
|
- name: Constellation create
|
||||||
|
run: |
|
||||||
|
echo "Creating cluster using config:"
|
||||||
|
cat constellation-conf.yaml
|
||||||
|
constellation create ${{ inputs.cloudProvider }} -c ${{ inputs.controlNodesCount }} -w ${{ inputs.workerNodesCount }} -t ${{ inputs.machineType }} --name e2e-test -y
|
||||||
|
shell: bash
|
||||||
|
- name: Upload constellation-state.json
|
||||||
|
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8
|
||||||
|
with:
|
||||||
|
name: constellation-state.json
|
||||||
|
path: constellation-state.json
|
||||||
|
if: ${{ always() && !env.ACT }}
|
||||||
|
|
||||||
|
- name: Constellation init
|
||||||
|
run: |
|
||||||
|
if [ ${{ inputs.autoscale }} = true ]; then autoscale=--autoscale; fi
|
||||||
|
constellation init ${autoscale}
|
||||||
|
shell: bash
|
||||||
|
140
.github/actions/e2e_test/action.yml
vendored
140
.github/actions/e2e_test/action.yml
vendored
@ -2,108 +2,112 @@ name: E2E test
|
|||||||
description: "Run Constellation e2e test."
|
description: "Run Constellation e2e test."
|
||||||
inputs:
|
inputs:
|
||||||
workerNodesCount:
|
workerNodesCount:
|
||||||
description: 'Number of worker nodes to spawn.'
|
description: "Number of worker nodes to spawn."
|
||||||
required: true
|
required: true
|
||||||
controlNodesCount:
|
controlNodesCount:
|
||||||
description: 'Number of control-plane nodes to spawn.'
|
description: "Number of control-plane nodes to spawn."
|
||||||
required: true
|
required: true
|
||||||
autoscale:
|
autoscale:
|
||||||
description: 'Autoscale?'
|
description: "Autoscale?"
|
||||||
required: true
|
required: true
|
||||||
cloudProvider:
|
cloudProvider:
|
||||||
description: 'Which cloud provider to use.'
|
description: "Which cloud provider to use."
|
||||||
required: true
|
required: true
|
||||||
machineType:
|
machineType:
|
||||||
description: 'VM machine type. Make sure it matches selected cloud provider!'
|
description: "VM machine type. Make sure it matches selected cloud provider!"
|
||||||
required: true
|
required: true
|
||||||
gcp_service_account_json:
|
gcp_service_account_json:
|
||||||
description: 'Service account with permissions to create Constellation on GCP.'
|
description: "Service account with permissions to create Constellation on GCP."
|
||||||
required: false
|
required: false
|
||||||
azure_credentials:
|
azure_credentials:
|
||||||
description: 'Credentials authorized to create Constellation on Azure.'
|
description: "Credentials authorized to create Constellation on Azure."
|
||||||
required: false
|
required: false
|
||||||
sonobuoyTestSuiteCmd:
|
sonobuoyTestSuiteCmd:
|
||||||
description: 'Which tests should be run? Check README for guidance!'
|
description: "Which tests should be run? Check README for guidance!"
|
||||||
required: true
|
required: true
|
||||||
|
kubernetesVersion:
|
||||||
|
description: "Kubernetes version to create the cluster from."
|
||||||
|
required: false
|
||||||
msTeamsWebhook:
|
msTeamsWebhook:
|
||||||
description: 'WebHook used to notify of failure.'
|
description: "WebHook used to notify of failure."
|
||||||
required: true
|
required: true
|
||||||
cosignPublicKey:
|
cosignPublicKey:
|
||||||
description: 'Cosign public key to sign measurements.'
|
description: "Cosign public key to sign measurements."
|
||||||
required: false
|
required: false
|
||||||
cosignPrivateKey:
|
cosignPrivateKey:
|
||||||
description: 'Cosign private key to sign measurements.'
|
description: "Cosign private key to sign measurements."
|
||||||
required: false
|
required: false
|
||||||
cosignPassword:
|
cosignPassword:
|
||||||
description: 'Cosign password for private key.'
|
description: "Cosign password for private key."
|
||||||
required: false
|
required: false
|
||||||
awsAccessKeyID:
|
awsAccessKeyID:
|
||||||
description: 'AWS access key ID to upload measurements.'
|
description: "AWS access key ID to upload measurements."
|
||||||
required: false
|
required: false
|
||||||
awsSecretAccessKey:
|
awsSecretAccessKey:
|
||||||
description: 'AWS secrets access key to upload measurements.'
|
description: "AWS secrets access key to upload measurements."
|
||||||
required: false
|
required: false
|
||||||
awsDefaultRegion:
|
awsDefaultRegion:
|
||||||
description: 'AWS region of S3 bucket. to upload measurements.'
|
description: "AWS region of S3 bucket. to upload measurements."
|
||||||
required: false
|
required: false
|
||||||
awsBucketName:
|
awsBucketName:
|
||||||
description: 'AWS S3 bucket name to upload measurements.'
|
description: "AWS S3 bucket name to upload measurements."
|
||||||
required: false
|
required: false
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Build CLI
|
- name: Build CLI
|
||||||
uses: ./.github/actions/build_cli
|
uses: ./.github/actions/build_cli
|
||||||
|
|
||||||
- name: Login to GCP
|
- name: Login to GCP
|
||||||
uses: ./.github/actions/gcp_login
|
uses: ./.github/actions/gcp_login
|
||||||
with:
|
with:
|
||||||
gcp_service_account_json: ${{ inputs.gcp_service_account_json }}
|
gcp_service_account_json: ${{ inputs.gcp_service_account_json }}
|
||||||
if: ${{ inputs.cloudProvider == 'gcp' }}
|
if: ${{ inputs.cloudProvider == 'gcp' }}
|
||||||
- name: Login to Azure
|
- name: Login to Azure
|
||||||
uses: ./.github/actions/azure_login
|
uses: ./.github/actions/azure_login
|
||||||
with:
|
with:
|
||||||
azure_credentials: ${{ inputs.azure_credentials }}
|
azure_credentials: ${{ inputs.azure_credentials }}
|
||||||
if: ${{ inputs.cloudProvider == 'azure' }}
|
if: ${{ inputs.cloudProvider == 'azure' }}
|
||||||
|
|
||||||
- name: Create cluster
|
- name: Create cluster
|
||||||
uses: ./.github/actions/constellation_create
|
uses: ./.github/actions/constellation_create
|
||||||
with:
|
with:
|
||||||
cloudProvider: ${{ inputs.cloudProvider }}
|
cloudProvider: ${{ inputs.cloudProvider }}
|
||||||
autoscale: ${{ inputs.autoscale }}
|
autoscale: ${{ inputs.autoscale }}
|
||||||
workerNodesCount: ${{ inputs.workerNodesCount }}
|
workerNodesCount: ${{ inputs.workerNodesCount }}
|
||||||
controlNodesCount: ${{ inputs.controlNodesCount }}
|
controlNodesCount: ${{ inputs.controlNodesCount }}
|
||||||
machineType: ${{ inputs.machineType }}
|
machineType: ${{ inputs.machineType }}
|
||||||
- name: Measure cluster
|
kubernetesVersion: ${{ inputs.kubernetesVersion }}
|
||||||
uses: ./.github/actions/constellation_measure
|
- name: Measure cluster
|
||||||
with:
|
uses: ./.github/actions/constellation_measure
|
||||||
cloudProvider: ${{ inputs.cloudProvider }}
|
with:
|
||||||
cosignPublicKey: ${{ inputs.cosignPublicKey }}
|
cloudProvider: ${{ inputs.cloudProvider }}
|
||||||
cosignPrivateKey: ${{ inputs.cosignPrivateKey }}
|
cosignPublicKey: ${{ inputs.cosignPublicKey }}
|
||||||
cosignPassword: ${{ inputs.cosignPassword }}
|
cosignPrivateKey: ${{ inputs.cosignPrivateKey }}
|
||||||
awsAccessKeyID: ${{ inputs.awsAccessKeyID }}
|
cosignPassword: ${{ inputs.cosignPassword }}
|
||||||
awsSecretAccessKey: ${{ inputs.awsSecretAccessKey }}
|
awsAccessKeyID: ${{ inputs.awsAccessKeyID }}
|
||||||
awsDefaultRegion: ${{ inputs.awsDefaultRegion }}
|
awsSecretAccessKey: ${{ inputs.awsSecretAccessKey }}
|
||||||
awsBucketName: ${{ inputs.awsBucketName }}
|
awsDefaultRegion: ${{ inputs.awsDefaultRegion }}
|
||||||
- name: Run e2e tests
|
awsBucketName: ${{ inputs.awsBucketName }}
|
||||||
uses: ./.github/actions/sonobuoy
|
- name: Run e2e tests
|
||||||
with:
|
uses: ./.github/actions/sonobuoy
|
||||||
sonobuoyTestSuiteCmd: ${{ inputs.sonobuoyTestSuiteCmd }}
|
with:
|
||||||
|
sonobuoyTestSuiteCmd: ${{ inputs.sonobuoyTestSuiteCmd }}
|
||||||
|
|
||||||
- name: Notify teams channel
|
- name: Notify teams channel
|
||||||
if: ${{ failure() && github.ref == 'refs/heads/main' }}
|
if: ${{ failure() && github.ref == 'refs/heads/main' }}
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install gettext-base -y
|
sudo apt-get install gettext-base -y
|
||||||
export TEAMS_JOB_NAME=${{ inputs.cloudProvider }}
|
export TEAMS_JOB_NAME=${{ inputs.cloudProvider }}
|
||||||
export TEAMS_RUN_ID=${{ github.run_id }}
|
export TEAMS_RUN_ID=${{ github.run_id }}
|
||||||
envsubst < teams-payload.json > to-be-send.json
|
envsubst < teams-payload.json > to-be-send.json
|
||||||
curl \
|
curl \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d @to-be-send.json \
|
-d @to-be-send.json \
|
||||||
"${{ inputs.msTeamsWebhook }}"
|
"${{ inputs.msTeamsWebhook }}"
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: .github/actions/e2e_test
|
working-directory: .github/actions/e2e_test
|
||||||
|
|
||||||
- name: Always terminate cluster
|
- name: Always terminate cluster
|
||||||
if: always()
|
if: always()
|
||||||
uses: ./.github/actions/constellation_destroy
|
uses: ./.github/actions/constellation_destroy
|
||||||
|
33
.github/workflows/e2e-test-azure-weekly.yml
vendored
Normal file
33
.github/workflows/e2e-test-azure-weekly.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: e2e Test Azure Weekly
|
||||||
|
# This workflow only runs once per week. It executes the full e2e tests on the latest-1 and latest-2 versions. Currently 1.23 and 1.22.
|
||||||
|
# It is executed every sunday at 19:00.
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 19 * * 0"
|
||||||
|
jobs:
|
||||||
|
test-older-versions:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
version: ["1.22", "1.23"]
|
||||||
|
runs-on: [self-hosted, edgserver]
|
||||||
|
container:
|
||||||
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Run Azure E2E test
|
||||||
|
uses: ./.github/actions/e2e_test
|
||||||
|
with:
|
||||||
|
workerNodesCount: "2"
|
||||||
|
controlNodesCount: "1"
|
||||||
|
autoscale: "false"
|
||||||
|
cloudProvider: "azure"
|
||||||
|
machineType: "Standard_D4a_v4"
|
||||||
|
azure_credentials: ${{ secrets.AZURE_E2E_CREDENTIALS }}
|
||||||
|
sonobuoyTestSuiteCmd: '--plugin e2e --plugin-env e2e.E2E_FOCUS="\[Conformance\]" --plugin-env e2e.E2E_SKIP="for service with type clusterIP|HostPort validates that there is no conflict between pods with same hostPort but different hostIP and protocol" --plugin https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-plugin.yaml --plugin https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-master-plugin.yaml'
|
||||||
|
kubernetesVersion: ${{ matrix.version }}
|
||||||
|
msTeamsWebhook: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
|
76
.github/workflows/e2e-test-azure.yml
vendored
76
.github/workflows/e2e-test-azure.yml
vendored
@ -3,34 +3,58 @@ name: e2e Test Azure
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 2 * * 2-6'
|
- cron: "0 0 * * 2-6"
|
||||||
jobs:
|
jobs:
|
||||||
e2e-test-azure:
|
test-latest:
|
||||||
runs-on: [self-hosted, edgserver]
|
runs-on: [self-hosted, edgserver]
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/catthehacker/ubuntu:act-latest
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
options: --privileged
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Run Azure E2E test
|
- name: Run Azure E2E test
|
||||||
uses: ./.github/actions/e2e_test
|
uses: ./.github/actions/e2e_test
|
||||||
with:
|
with:
|
||||||
workerNodesCount: '2'
|
workerNodesCount: "2"
|
||||||
controlNodesCount: '1'
|
controlNodesCount: "1"
|
||||||
autoscale: 'false'
|
autoscale: "false"
|
||||||
cloudProvider: 'azure'
|
cloudProvider: "azure"
|
||||||
machineType: 'Standard_D4a_v4'
|
machineType: "Standard_D4a_v4"
|
||||||
azure_credentials: ${{ secrets.AZURE_E2E_CREDENTIALS }}
|
azure_credentials: ${{ secrets.AZURE_E2E_CREDENTIALS }}
|
||||||
# TODO: Remove E2E_SKIP once AB#2174 is resolved
|
# TODO: Remove E2E_SKIP once AB#2174 is resolved
|
||||||
sonobuoyTestSuiteCmd: '--plugin e2e --plugin-env e2e.E2E_FOCUS="\[Conformance\]" --plugin-env e2e.E2E_SKIP="for service with type clusterIP|HostPort validates that there is no conflict between pods with same hostPort but different hostIP and protocol" --plugin https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-plugin.yaml --plugin https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-master-plugin.yaml'
|
sonobuoyTestSuiteCmd: '--plugin e2e --plugin-env e2e.E2E_FOCUS="\[Conformance\]" --plugin-env e2e.E2E_SKIP="for service with type clusterIP|HostPort validates that there is no conflict between pods with same hostPort but different hostIP and protocol" --plugin https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-plugin.yaml --plugin https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-master-plugin.yaml'
|
||||||
msTeamsWebhook: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
|
msTeamsWebhook: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
|
||||||
cosignPublicKey: ${{ secrets.COSIGN_PUBLIC_KEY }}
|
cosignPublicKey: ${{ secrets.COSIGN_PUBLIC_KEY }}
|
||||||
cosignPrivateKey: ${{ secrets.COSIGN_PRIVATE_KEY }}
|
cosignPrivateKey: ${{ secrets.COSIGN_PRIVATE_KEY }}
|
||||||
cosignPassword: ${{ secrets.COSIGN_PASSWORD }}
|
cosignPassword: ${{ secrets.COSIGN_PASSWORD }}
|
||||||
awsAccessKeyID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
awsAccessKeyID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
awsSecretAccessKey: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
awsSecretAccessKey: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
awsDefaultRegion: ${{ secrets.AWS_DEFAULT_REGION }}
|
awsDefaultRegion: ${{ secrets.AWS_DEFAULT_REGION }}
|
||||||
awsBucketName: ${{ secrets.PUBLIC_BUCKET_NAME }}
|
awsBucketName: ${{ secrets.PUBLIC_BUCKET_NAME }}
|
||||||
|
|
||||||
|
test-older-versions:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
version: ["1.22", "1.23"]
|
||||||
|
runs-on: [self-hosted, edgserver]
|
||||||
|
container:
|
||||||
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Run Azure E2E test
|
||||||
|
uses: ./.github/actions/e2e_test
|
||||||
|
with:
|
||||||
|
workerNodesCount: "2"
|
||||||
|
controlNodesCount: "1"
|
||||||
|
autoscale: "false"
|
||||||
|
cloudProvider: "azure"
|
||||||
|
machineType: "Standard_D4a_v4"
|
||||||
|
azure_credentials: ${{ secrets.AZURE_E2E_CREDENTIALS }}
|
||||||
|
sonobuoyTestSuiteCmd: "--mode quick"
|
||||||
|
kubernetesVersion: ${{ matrix.version }}
|
||||||
|
msTeamsWebhook: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
|
||||||
|
33
.github/workflows/e2e-test-gcp-weekly.yml
vendored
Normal file
33
.github/workflows/e2e-test-gcp-weekly.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: e2e Test GCP Weekly
|
||||||
|
# This workflow only runs once per week. It executes the full e2e tests on the latest-1 and latest-2 versions. Currently 1.23 and 1.22.
|
||||||
|
# It is executed every sunday at 00:00.
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * 0"
|
||||||
|
jobs:
|
||||||
|
test-older-versions:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
version: ["1.22", "1.23"]
|
||||||
|
runs-on: [self-hosted, edgserver]
|
||||||
|
container:
|
||||||
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Run GCP E2E test
|
||||||
|
uses: ./.github/actions/e2e_test
|
||||||
|
with:
|
||||||
|
workerNodesCount: "2"
|
||||||
|
controlNodesCount: "1"
|
||||||
|
autoscale: "false"
|
||||||
|
cloudProvider: "gcp"
|
||||||
|
machineType: "n2d-standard-2"
|
||||||
|
gcp_service_account_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
|
||||||
|
sonobuoyTestSuiteCmd: '--plugin e2e --plugin-env e2e.E2E_FOCUS="\[Conformance\]" --plugin-env e2e.E2E_SKIP="for service with type clusterIP|HostPort validates that there is no conflict between pods with same hostPort but different hostIP and protocol" --plugin https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-plugin.yaml --plugin https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-master-plugin.yaml'
|
||||||
|
kubernetesVersion: ${{ matrix.version }}
|
||||||
|
msTeamsWebhook: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
|
76
.github/workflows/e2e-test-gcp.yml
vendored
76
.github/workflows/e2e-test-gcp.yml
vendored
@ -3,34 +3,58 @@ name: e2e Test GCP
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 4 * * 2-6'
|
- cron: "0 2 * * 2-6"
|
||||||
jobs:
|
jobs:
|
||||||
e2e-test-gcp:
|
test-latest:
|
||||||
runs-on: [self-hosted, edgserver]
|
runs-on: [self-hosted, edgserver]
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/catthehacker/ubuntu:act-latest
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
options: --privileged
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Run GCP E2E test
|
- name: Run GCP E2E test
|
||||||
uses: ./.github/actions/e2e_test
|
uses: ./.github/actions/e2e_test
|
||||||
with:
|
with:
|
||||||
workerNodesCount: '2'
|
workerNodesCount: "2"
|
||||||
controlNodesCount: '1'
|
controlNodesCount: "1"
|
||||||
autoscale: 'false'
|
autoscale: "false"
|
||||||
cloudProvider: 'gcp'
|
cloudProvider: "gcp"
|
||||||
machineType: 'n2d-standard-2'
|
machineType: "n2d-standard-2"
|
||||||
gcp_service_account_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
|
gcp_service_account_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
|
||||||
# TODO: Remove E2E_SKIP once AB#2174 is resolved
|
# TODO: Remove E2E_SKIP once AB#2174 is resolved
|
||||||
sonobuoyTestSuiteCmd: '--plugin e2e --plugin-env e2e.E2E_FOCUS="\[Conformance\]" --plugin-env e2e.E2E_SKIP="for service with type clusterIP|HostPort validates that there is no conflict between pods with same hostPort but different hostIP and protocol" --plugin https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-plugin.yaml --plugin https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-master-plugin.yaml'
|
sonobuoyTestSuiteCmd: '--plugin e2e --plugin-env e2e.E2E_FOCUS="\[Conformance\]" --plugin-env e2e.E2E_SKIP="for service with type clusterIP|HostPort validates that there is no conflict between pods with same hostPort but different hostIP and protocol" --plugin https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-plugin.yaml --plugin https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-master-plugin.yaml'
|
||||||
msTeamsWebhook: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
|
msTeamsWebhook: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
|
||||||
cosignPublicKey: ${{ secrets.COSIGN_PUBLIC_KEY }}
|
cosignPublicKey: ${{ secrets.COSIGN_PUBLIC_KEY }}
|
||||||
cosignPrivateKey: ${{ secrets.COSIGN_PRIVATE_KEY }}
|
cosignPrivateKey: ${{ secrets.COSIGN_PRIVATE_KEY }}
|
||||||
cosignPassword: ${{ secrets.COSIGN_PASSWORD }}
|
cosignPassword: ${{ secrets.COSIGN_PASSWORD }}
|
||||||
awsAccessKeyID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
awsAccessKeyID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
awsSecretAccessKey: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
awsSecretAccessKey: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
awsDefaultRegion: ${{ secrets.AWS_DEFAULT_REGION }}
|
awsDefaultRegion: ${{ secrets.AWS_DEFAULT_REGION }}
|
||||||
awsBucketName: ${{ secrets.PUBLIC_BUCKET_NAME }}
|
awsBucketName: ${{ secrets.PUBLIC_BUCKET_NAME }}
|
||||||
|
|
||||||
|
test-older-versions:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
version: ["1.22", "1.23"]
|
||||||
|
runs-on: [self-hosted, edgserver]
|
||||||
|
container:
|
||||||
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Run GCP E2E test
|
||||||
|
uses: ./.github/actions/e2e_test
|
||||||
|
with:
|
||||||
|
workerNodesCount: "2"
|
||||||
|
controlNodesCount: "1"
|
||||||
|
autoscale: "false"
|
||||||
|
cloudProvider: "gcp"
|
||||||
|
machineType: "n2d-standard-2"
|
||||||
|
gcp_service_account_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
|
||||||
|
sonobuoyTestSuiteCmd: "--mode quick"
|
||||||
|
kubernetesVersion: ${{ matrix.version }}
|
||||||
|
msTeamsWebhook: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
|
||||||
|
10
.github/workflows/e2e-test-manual.yml
vendored
10
.github/workflows/e2e-test-manual.yml
vendored
@ -36,11 +36,10 @@ on:
|
|||||||
description: "Which tests should be run? Check README for guidance!"
|
description: "Which tests should be run? Check README for guidance!"
|
||||||
default: "--mode quick"
|
default: "--mode quick"
|
||||||
required: true
|
required: true
|
||||||
|
kubernetesVersion:
|
||||||
# Abort runs of *this* workflow, if a new commit with the same ref is pushed.
|
description: "Kubernetes version to create the cluster from."
|
||||||
concurrency:
|
default: "1.24"
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
required: true
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
e2e-test-manual:
|
e2e-test-manual:
|
||||||
@ -59,4 +58,5 @@ jobs:
|
|||||||
gcp_service_account_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
|
gcp_service_account_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
|
||||||
azure_credentials: ${{ secrets.AZURE_E2E_CREDENTIALS }}
|
azure_credentials: ${{ secrets.AZURE_E2E_CREDENTIALS }}
|
||||||
sonobuoyTestSuiteCmd: ${{ github.event.inputs.sonobuoyTestSuiteCmd }}
|
sonobuoyTestSuiteCmd: ${{ github.event.inputs.sonobuoyTestSuiteCmd }}
|
||||||
|
kubernetesVersion: ${{ github.event.inputs.kubernetesVersion }}
|
||||||
msTeamsWebhook: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
|
msTeamsWebhook: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
|
||||||
|
@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Security
|
### Security
|
||||||
<!-- In case of vulnerabilities. -->
|
<!-- In case of vulnerabilities. -->
|
||||||
### Internal
|
### Internal
|
||||||
|
- Run e2e tests on all supported versions.
|
||||||
|
|
||||||
## [1.4.0] - 2022-08-02
|
## [1.4.0] - 2022-08-02
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user