Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
a-thaler committed Feb 2, 2024
1 parent f161a23 commit 1f924a3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/branch-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:

jobs:
gardener-integration-test:
strategy:
max-parallel: 1 # avoid 2 clusters at the same time using same name
matrix:
k8s_version: [1.27, 1.28]
runs-on: ubuntu-latest
steps:
- name: Checkout repo
Expand All @@ -33,6 +37,7 @@ jobs:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_OWNER: "${{ github.repository_owner }}"
GITHUB_REPO: "telemetry-manager"
GARDENER_K8S_VERSION: ${{ matrix.k8s_version }}

# save gardener kubeconfig to a temp file in order to pass it to the command
- name: Save serviceaccount to file
Expand Down
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Image URL to use all building/pushing image targets
IMG ?= europe-docker.pkg.dev/kyma-project/prod/telemetry-manager:main
# ENVTEST_K8S_VERSION refers to the version of Kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.28.0
GARDENER_K8S_VERSION = 1.28.4

ENVTEST_K8S_VERSION = 1.27.1
GARDENER_K8S_VERSION ?= 1.27
ISTIO_VERSION ?= 1.3.0

# Operating system architecture
Expand Down Expand Up @@ -372,6 +373,10 @@ GIT_COMMIT_SHA=$(shell git rev-parse --short=8 HEAD)
GIT_COMMIT_DATE=$(shell git show -s --format=%cd --date=format:'v%Y%m%d' ${GIT_COMMIT_SHA})
HIBERNATION_HOUR=$(shell echo $$(( ( $(shell date +%H | sed s/^0//g) + 5 ) % 24 )))

ifneq (,$(GARDENER_SA_PATH))
GARDENER_K8S_VERSION_FULL?=$(shell kubectl --kubeconfig=${GARDENER_SA_PATH} get cloudprofiles.core.gardener.cloud gcp -o go-template='{{range .spec.kubernetes.versions}}{{if and (eq .classification "supported") (lt .version "${GARDENER_K8S_VERSION}.a") (gt .version "${GARDENER_K8S_VERSION}")}}{{.version}}{{end}}{{end}}')
endif

# log tests are excluded for now as they are too flaky
.PHONY: run-tests-with-git-image
run-tests-with-git-image: ## Run e2e tests on existing cluster using image related to git commit sha
Expand All @@ -388,7 +393,7 @@ gardener-integration-test: ## Provision gardener cluster and run integration tes

.PHONY: provision-gardener
provision-gardener: kyma ## Provision gardener cluster with latest k8s version
${KYMA} provision gardener gcp -c ${GARDENER_SA_PATH} -n test-${GIT_COMMIT_SHA} -p ${GARDENER_PROJECT} -s ${GARDENER_SECRET_NAME} -k ${GARDENER_K8S_VERSION}\
${KYMA} provision gardener gcp -c ${GARDENER_SA_PATH} -n test-${GIT_COMMIT_SHA} -p ${GARDENER_PROJECT} -s ${GARDENER_SECRET_NAME} -k ${GARDENER_K8S_VERSION_FULL}\
--hibernation-start="00 ${HIBERNATION_HOUR} * * ?"

.PHONY: deprovision-gardener
Expand Down

0 comments on commit 1f924a3

Please sign in to comment.