Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backend switching job for EventMesh - Test PR #392

Closed
wants to merge 70 commits into from
Closed
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
dce72aa
Add backend switching job for EventMesh - Test PR
mfaizanse Jan 12, 2024
3ea7f09
updated
mfaizanse Jan 12, 2024
bfaf6ed
updated
mfaizanse Jan 12, 2024
693edfb
updated
mfaizanse Jan 12, 2024
0587c8e
updated
mfaizanse Jan 12, 2024
edecffd
updated
mfaizanse Jan 12, 2024
782bf54
updated
mfaizanse Jan 12, 2024
f07c01f
updated
mfaizanse Jan 12, 2024
15eee78
updated
mfaizanse Jan 12, 2024
f3526a5
updated
mfaizanse Jan 12, 2024
4d37c8f
updated
mfaizanse Jan 12, 2024
11e6d3a
updated
mfaizanse Jan 12, 2024
bcd37ce
updated
mfaizanse Jan 12, 2024
cecec82
updated
mfaizanse Jan 12, 2024
f18c0d3
updated
mfaizanse Jan 12, 2024
f03a48b
updated
mfaizanse Jan 12, 2024
171ab3e
updated
mfaizanse Jan 12, 2024
04f6a11
updated
mfaizanse Jan 12, 2024
babeede
updated
mfaizanse Jan 12, 2024
f429b79
updated
mfaizanse Jan 15, 2024
0e5c4a2
updated
mfaizanse Jan 15, 2024
7f3934b
updated
mfaizanse Jan 15, 2024
308c5d1
updated
mfaizanse Jan 15, 2024
93c9934
updated
mfaizanse Jan 15, 2024
9c88fc9
updated
mfaizanse Jan 15, 2024
57d98b1
updated
mfaizanse Jan 15, 2024
72a2e0f
updated
mfaizanse Jan 15, 2024
364350c
updated
mfaizanse Jan 15, 2024
d2cb9bf
updated
mfaizanse Jan 15, 2024
c4e5e78
first good run
mfaizanse Jan 15, 2024
4a3fd1c
first reuseable
mfaizanse Jan 15, 2024
c09ede3
updated
mfaizanse Jan 15, 2024
5181b3d
updated
mfaizanse Jan 15, 2024
2775e1d
updated
mfaizanse Jan 15, 2024
4631fc2
updated
mfaizanse Jan 15, 2024
7a55753
updated
mfaizanse Jan 15, 2024
0cb6777
updated
mfaizanse Jan 15, 2024
c408581
updated
mfaizanse Jan 15, 2024
3e8fc35
updated
mfaizanse Jan 16, 2024
b64526d
updated
mfaizanse Jan 16, 2024
efed942
updated
mfaizanse Jan 16, 2024
e8a3cf9
updated
mfaizanse Jan 16, 2024
ef39b82
updated
mfaizanse Jan 16, 2024
1ac1f36
updated
mfaizanse Jan 16, 2024
1ec0d60
updated
mfaizanse Jan 16, 2024
a599e28
updated
mfaizanse Jan 16, 2024
e3e129e
updated
mfaizanse Jan 16, 2024
4beb627
updated
mfaizanse Jan 16, 2024
113a296
updated
mfaizanse Jan 16, 2024
8b99e97
updated
mfaizanse Jan 16, 2024
c2623e2
updated
mfaizanse Jan 16, 2024
e99ae02
updated
mfaizanse Jan 16, 2024
121cc80
updated
mfaizanse Jan 16, 2024
e36ef37
updated
mfaizanse Jan 16, 2024
c646f95
resolved merge conflicts
mfaizanse Jan 16, 2024
fc012d9
updated
mfaizanse Jan 16, 2024
1404c68
updated
mfaizanse Jan 17, 2024
9405e10
updated
mfaizanse Jan 17, 2024
19f762a
Merge branch 'main' into fzn-add-action
mfaizanse Jan 17, 2024
c5eac99
updated
mfaizanse Jan 17, 2024
efb0c3d
updated
mfaizanse Jan 17, 2024
57e63e3
updated
mfaizanse Jan 17, 2024
a0d4dc6
updated
mfaizanse Jan 17, 2024
b7f57fe
resolved merge conflicts
mfaizanse Jan 18, 2024
82ba719
updated
mfaizanse Jan 18, 2024
3cf33c0
updated
mfaizanse Jan 18, 2024
7bbf087
updated
mfaizanse Jan 18, 2024
b2649e4
updated
mfaizanse Jan 18, 2024
01151f3
updated
mfaizanse Jan 18, 2024
78deb19
updated
mfaizanse Jan 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/e2e-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ on:
jobs:
backend-switching:
runs-on: ubuntu-latest
needs: wait-until-build-succeeds

steps:
- uses: actions/checkout@v4
Expand Down
159 changes: 159 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:

jobs:
wait-until-build-succeeds:
if: false
runs-on: ubuntu-latest
steps:
- name: Wait for the 'pull-eventing-manager-build' job to succeed
Expand All @@ -34,6 +35,7 @@ jobs:

nats:
runs-on: ubuntu-latest
if: false
needs: wait-until-build-succeeds

steps:
Expand Down Expand Up @@ -99,6 +101,7 @@ jobs:

PeerAuthentication:
runs-on: ubuntu-latest
if: false
needs: wait-until-build-succeeds

steps:
Expand Down Expand Up @@ -136,3 +139,159 @@ jobs:
if: failure()
run: |
kubectl get peerauthentications.security.istio.io -A -o yaml

backend-switching:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Cache Binaries
id: cache-binaries
uses: actions/cache@v3
with:
path: bin
key: ${{ runner.os }}-bin

- name: Install Kyma CLI
run: |
make kyma

- name: Provision Gardener cluster
env:
GARDENER_CLUSTER_VERSION: "1.26.9"
CLUSTER_PREFIX: "ghem-"
GARDENER_REGION: "eu-west-1"
GARDENER_ZONES: "eu-west-1a"
GARDENER_PROJECT_NAME: "kymatunas"
GARDENER_PROVIDER_SECRET_NAME: "tunas-aws"
MACHINE_TYPE: "c4.xlarge"
SCALER_MIN: "1"
SCALER_MAX: "2"
RETRY_ATTEMPTS: "1"
GARDENER_KYMATUNAS: ${{ secrets.GARDENER_KYMATUNAS }}
run: |
: # setup Gardener kubeconfig.
mkdir -p "${HOME}/.gardener"
export GARDENER_KUBECONFIG="${HOME}/.gardener/kubeconfig"
echo ${GARDENER_KYMATUNAS} | base64 --decode > ${GARDENER_KUBECONFIG}
: # generate cluster name and export it to Github env for cleanup step to access it.
export CLUSTER_NAME="${CLUSTER_PREFIX}$(openssl rand -hex 2)"
echo "CLUSTER_NAME=${CLUSTER_NAME}" >> $GITHUB_ENV
: # provision gardener cluster.
make -C hack/ci/ provision-gardener-cluster
kubectl version
kubectl cluster-info
kubectl get nodes
kubectl get ns

- name: Create kyma-system namespace
run: |
kubectl create ns kyma-system || true

- name: Create EventMesh secret
env:
EVENTMESH_K8S_SECRET: ${{ secrets.EVENTMESH_K8S_SECRET }}
run: |
echo ${EVENTMESH_K8S_SECRET} | base64 --decode > kubectl apply -n kyma-system -f -

- name: Create IAS application for EventMesh
env:
TEST_EVENTING_AUTH_IAS_URL: ${{ vars.EVENTING_AUTH_IAS_URL }}
TEST_EVENTING_AUTH_IAS_USER: ${{ vars.EVENTING_AUTH_IAS_USER }}
TEST_EVENTING_AUTH_IAS_PASSWORD: ${{ secrets.EVENTING_AUTH_IAS_PASSWORD }}
run: |
export DISPLAY_NAME=${CLUSTER_NAME}
make -C hack/ci/ create-ias-app

- name: Install latest released Istio Module
run: |
make -C hack/ci/ install-istio-module

- name: Install latest released API Gateway Manager
run: |
make -C hack/ci/ install-api-gateway-module

- name: Install latest released NATS Manager
run: |
make -C hack/ci/ install-nats-module

- name: Deploy eventing-manager
run: |
make install
make deploy IMG=$MANAGER_IMAGE
kubectl apply -f config/samples/default.yaml

- name: Wait for Installed modules to be ready
run: |
make -C hack/ci/ wait-istio-cr-ready
make -C hack/ci/ wait-api-gateway-cr-ready
make -C hack/ci/ wait-nats-cr-ready
make -C hack/ci/ wait-eventing-cr-ready-with-backend ACTIVE_BACKEND=NATS

- name: Setup eventing tests
run: |
make e2e-eventing-setup

- name: Test eventing with NATS
run: |
make e2e-eventing

- name: Switch to EventMesh backend
run: |
kubectl apply -f config/samples/default_eventmesh.yaml
make -C hack/ci/ wait-eventing-cr-ready-with-backend ACTIVE_BACKEND=EventMesh

- name: Test eventing with EventMesh
env:
BACKEND_TYPE: "EventMesh"
run: |
: # wait for subscriptions to be ready.
make e2e-eventing-setup
: # run tests.
make e2e-eventing

- name: Switch back to NATS backend
run: |
kubectl apply -f config/samples/default.yaml
make -C hack/ci/ wait-eventing-cr-ready-with-backend ACTIVE_BACKEND=NATS

# Run make e2e-eventing again with NATS backend
- name: Test eventing again with NATS
run: |
: # wait for subscriptions to be ready.
make e2e-eventing-setup
: # run tests.
make e2e-eventing

- name: Test eventing cleanup
run: |
make e2e-cleanup

- name: On error, fetch module CRs
if: failure()
run: |
kubectl get nats.operator.kyma-project.io -n kyma-system -o yaml
kubectl get eventing.operator.kyma-project.io -n kyma-system -o yaml
kubectl get istios.operator.kyma-project.io -n kyma-system -o yaml
kubectl get apigateways.operator.kyma-project.io -n kyma-system -o yaml

- name: Delete IAS application
if: ${{ always() }}
env:
TEST_EVENTING_AUTH_IAS_URL: ${{ vars.EVENTING_AUTH_IAS_URL }}
TEST_EVENTING_AUTH_IAS_USER: ${{ vars.EVENTING_AUTH_IAS_USER }}
TEST_EVENTING_AUTH_IAS_PASSWORD: ${{ secrets.EVENTING_AUTH_IAS_PASSWORD }}
run: |
export IAS_APPLICATION_LOCATION=$(cat ~/.ias_location)
make -C hack/ci/ delete-ias-app

- name: Delete Gardener cluster
if: ${{ always() }}
env:
GARDENER_PROVIDER_SECRET_NAME: "tunas-aws"
GARDENER_PROJECT_NAME: "kymatunas"
WAIT_FOR_DELETE_COMPLETION: "false"
run: |
export GARDENER_KUBECONFIG="${HOME}/.gardener/kubeconfig"
# make -C hack/ci/ deprovision-gardener-cluster
1 change: 1 addition & 0 deletions .github/workflows/lint-markdown-links-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: [ pull_request ]
jobs:
markdown-link-check:
runs-on: ubuntu-latest
if: false
steps:
- uses: actions/checkout@v4

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ permissions:
jobs:
golangci:
name: lint
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
if: false
permissions: write-all

defaults:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ on:
jobs:
unit:
runs-on: ubuntu-latest
if: false
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:
jobs:
crd:
runs-on: ubuntu-latest
if: false
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ kind: Kustomization
images:
- name: controller
newName: europe-docker.pkg.dev/kyma-project/prod/eventing-manager
newTag: v20231102-88a52f17
newTag: v20240112-0df1b52e
Loading
Loading