Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
mfaizanse committed Jan 17, 2024
1 parent efb0c3d commit 57e63e3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e-backend-switching-reuseable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
type: string
kube-version:
description: Kubernetes version for the Gardener cluster.
required: true
required: false
type: string
cluster-name-prefix:
description: Prefix to use as prefix for name of Gardener cluster.
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/e2e-k8s.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
name: e2e-on-k8s

env:
KYMA_STABILITY: "unstable"
KYMA: "./hack/kyma"
MANAGER_IMAGE: europe-docker.pkg.dev/kyma-project/dev/eventing-manager:PR-${{ github.event.number }}
K8S_VERSION: "1.26.9"

on:
pull_request:
branches:
Expand All @@ -19,12 +13,9 @@ on:
jobs:
wait-until-build-succeeds:
runs-on: ubuntu-latest
outputs:
image-name: ${{ steps.extract-image.outputs.image_name }}
steps:
- name: Wait for the 'pull-eventing-manager-build' job to succeed
id: pull-wait-build
if: github.event_name == 'pull_request'
uses: kyma-project/wait-for-commit-status-action@2b3ffe09af8b6f40e1213d5fb7f91a7bd41ffb20
with:
context: "pull-eventing-manager-build"
Expand All @@ -41,7 +32,6 @@ jobs:
needs: wait-until-build-succeeds
uses: "./.github/workflows/e2e-backend-switching-reuseable.yml"
with:
eventing-manager-image: ${{ env.KYMA_STABILITY }}
kube-version: ${{ env.K8S_VERSION }}
eventing-manager-image: europe-docker.pkg.dev/kyma-project/dev/eventing-manager:PR-${{ github.event.number }}
cluster-name-prefix: "ghem-"
secrets: inherit
2 changes: 0 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: e2e-without-lifecycle-manager
env:
KYMA_STABILITY: "unstable"
KYMA: "./hack/kyma"
K8S_VERSION: "1.26.9"

on:
push:
Expand Down Expand Up @@ -187,6 +186,5 @@ jobs:
uses: "./.github/workflows/e2e-backend-switching-reuseable.yml"
with:
eventing-manager-image: ${{ needs.wait-until-build-succeeds.outputs.image-name }}
kube-version: ${{ env.K8S_VERSION }}
cluster-name-prefix: "ghem-"
secrets: inherit
9 changes: 7 additions & 2 deletions scripts/gardener/aws/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
# GARDENER_ZONES
# GARDENER_PROJECT_NAME
# GARDENER_PROVIDER_SECRET_NAME
# GARDENER_CLUSTER_VERSION
# GARDENER_KUBECONFIG - Path to kubeconfig for Gardener.
# MACHINE_TYPE - default: "m5.xlarge"
# SCALER_MIN - default: 1
# SCALER_MAX - default: 2
# RETRY_ATTEMPTS - default: 1
# GARDENER_CLUSTER_VERSION - default as defined in kyma CLI.

# Permissions: In order to run this script you need to use a service account with permissions equivalent to the following GCP roles:
# - Compute Admin
Expand All @@ -31,7 +31,6 @@ gardener::validate_and_default() {
GARDENER_KUBECONFIG
GARDENER_PROJECT_NAME
GARDENER_PROVIDER_SECRET_NAME
GARDENER_CLUSTER_VERSION
)
utils::check_required_vars "${requiredVars[@]}"

Expand All @@ -57,6 +56,12 @@ gardener::validate_and_default() {
if [ -z "$RETRY_ATTEMPTS" ]; then
export RETRY_ATTEMPTS="1"
fi

if [ -z "$GARDENER_CLUSTER_VERSION" ]; then
# grep the default kube-version defined in kyma CLI.
export GARDENER_CLUSTER_VERSION="$(${KYMA_CLI} provision gardener aws --help | grep "kube-version string" | awk -F "\"" '{print $2}')"
log::info "Using GARDENER_CLUSTER_VERSION=${GARDENER_CLUSTER_VERSION}"
fi
}

gardener::provision_cluster() {
Expand Down

0 comments on commit 57e63e3

Please sign in to comment.