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

chore: cherry pick for 1.2.2 #482

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
20aff87
Unify NATS CR description in Kyma dashboard (#378)
mmitoraj May 21, 2024
0176b6c
chore: add information about high availability of NATS servers (#365)
mfaizanse Jun 3, 2024
0062b33
deps(dependabot): bump google.golang.org/protobuf from 1.31.0 to 1.33…
dependabot[bot] Jul 5, 2024
55f83cc
deps(dependabot): bump golangci/golangci-lint-action from 4.0.0 to 6.…
dependabot[bot] Jul 5, 2024
ae8b3cc
deps(dependabot): bump github.com/docker/docker from 24.0.7+incompati…
dependabot[bot] Jul 5, 2024
c858421
deps(dependabot): bump amannn/action-semantic-pull-request from 5.4.0…
dependabot[bot] Jul 5, 2024
9afc7ac
chore: update go version to 1.22.5 (#390)
grischperl Jul 9, 2024
e2e8a84
deps(dependabot): bump github.com/nats-io/nats-server/v2 from 2.10.11…
dependabot[bot] Jul 9, 2024
5201cd2
chore: bump dependencies (#396)
mfaizanse Jul 16, 2024
8ebfaaa
deps(dependabot): upgrade modules fix multiple dependabot prs (#403)
muralov Jul 23, 2024
6d28969
deps(dependabot): bump github.com/onsi/gomega from 1.33.1 to 1.34.0 (…
dependabot[bot] Jul 29, 2024
a580f79
deps(dependabot): bump github.com/docker/docker from 25.0.5+incompati…
dependabot[bot] Jul 31, 2024
626db80
deps(dependabot): bump github.com/onsi/gomega from 1.34.0 to 1.34.1 (…
dependabot[bot] Aug 5, 2024
229c634
deps(dependabot): bump github.com/vektra/mockery/v2 from 2.43.2 to 2.…
dependabot[bot] Aug 5, 2024
73263e4
deps(dependabot): bump golangci/golangci-lint-action from 6.0.1 to 6.…
dependabot[bot] Aug 5, 2024
25d4da5
chore: bump dependencies (#415)
mfaizanse Aug 19, 2024
449f5c7
chore: bump dependencies (#417)
friedrichwilken Aug 22, 2024
e2c43e4
deps(dependabot): bump github.com/docker/docker from 26.1.4+incompati…
dependabot[bot] Aug 22, 2024
c741ce7
deps(dependabot): bump github.com/vektra/mockery/v2 from 2.44.2 to 2.…
dependabot[bot] Aug 26, 2024
a6e27c6
deps(dependabot): bump github.com/prometheus/client_golang from 1.20.…
dependabot[bot] Aug 26, 2024
d9a372b
chore: upgrade golangci-lint version to v1.60.3 (#422)
the1bit Sep 2, 2024
a10c7c2
deps(dependabot): bump github.com/nats-io/nats-server/v2 from 2.10.18…
dependabot[bot] Sep 3, 2024
eaef64c
deps(dependabot): bump github.com/onsi/gomega from 1.34.1 to 1.34.2 (…
dependabot[bot] Sep 3, 2024
b3d9d42
docs: update the contributing file (#423)
mmitoraj Sep 3, 2024
4d13ec5
deps(dependabot): bump github.com/prometheus/client_golang from 1.20.…
dependabot[bot] Sep 10, 2024
fd2c0b6
chore: added github action based build jobs (#431)
mfaizanse Sep 16, 2024
66b7f0e
chore: replace prow build job waiting with github action (#433)
mfaizanse Sep 18, 2024
bd4e6d4
chore: image bump (#432)
grischperl Sep 18, 2024
1e6249b
chore: bump golang version to 1.23.1 (#434)
grischperl Sep 18, 2024
3dce357
fix: remove prow reference (#436)
mfaizanse Sep 19, 2024
ad2b2d7
deps(dependabot): bump github.com/vektra/mockery/v2 from 2.46.0 to 2.…
dependabot[bot] Sep 30, 2024
e63598b
deps(dependabot): bump github.com/nats-io/nats-server/v2 from 2.10.20…
dependabot[bot] Oct 2, 2024
bdd6997
deps(dependabot): bump golangci/golangci-lint-action from 6.1.0 to 6.…
dependabot[bot] Oct 8, 2024
7935fe3
deps(dependabot): bump github.com/vektra/mockery/v2 from 2.46.1 to 2.…
dependabot[bot] Oct 8, 2024
1a1c784
deps(dependabot): bump github.com/vektra/mockery/v2 from 2.46.2 to 2.…
dependabot[bot] Oct 17, 2024
7dc36a6
deps(dependabot): bump helm.sh/helm/v3 from 3.16.1 to 3.16.2 (#444)
dependabot[bot] Oct 17, 2024
94d1690
deps(dependabot): bump github.com/prometheus/client_golang from 1.20.…
dependabot[bot] Oct 21, 2024
0ed37eb
deps(dependabot): bump github.com/nats-io/nats-server/v2 from 2.10.21…
dependabot[bot] Oct 23, 2024
93c8750
deps(dependabot): bump sigs.k8s.io/controller-runtime from 0.19.0 to …
dependabot[bot] Oct 28, 2024
8635dda
deps(dependabot): bump k8s.io/apiextensions-apiserver from 0.31.1 to …
dependabot[bot] Oct 28, 2024
50580f2
deps(dependabot): bump kyma-project/prod/external/library/golang from…
dependabot[bot] Oct 28, 2024
2c7d703
docs: remove a broken link (#447)
nataliasitko Oct 28, 2024
05a3637
deps(dependabot): bump k8s.io/cli-runtime from 0.31.1 to 0.31.2 (#454)
dependabot[bot] Nov 5, 2024
b1e0e90
deps(dependabot): bump github.com/onsi/gomega from 1.34.2 to 1.35.1 (…
dependabot[bot] Nov 11, 2024
29c73bb
deps(dependabot): bump github.com/vektra/mockery/v2 from 2.46.3 to 2.…
dependabot[bot] Nov 18, 2024
05971a0
deps(dependabot): bump helm.sh/helm/v3 from 3.16.2 to 3.16.3 (#456)
dependabot[bot] Nov 19, 2024
b318f1f
docs: replace Remedy with Solution (#458)
NHingerl Nov 21, 2024
8d48a02
deps(dependabot): bump kyma-project/prod/external/library/golang from…
dependabot[bot] Nov 25, 2024
4902069
chore: upgrade depenedencies (#465)
muralov Dec 2, 2024
f1ea94e
deps(dependabot): bump kyma-project/prod/external/library/golang from…
dependabot[bot] Dec 10, 2024
acc12b6
deps(dependabot): bump sigs.k8s.io/controller-runtime from 0.19.2 to …
dependabot[bot] Dec 10, 2024
4185e27
deps(dependabot): bump github.com/vektra/mockery/v2 from 2.49.1 to 2.…
dependabot[bot] Dec 10, 2024
c94ba94
chore: bump dependencies (#470)
friedrichwilken Dec 11, 2024
846369b
fix: retry functions (#478)
friedrichwilken Dec 16, 2024
9c2e6b8
chore: bump dependencies and tooling (#481)
friedrichwilken Dec 17, 2024
11905a0
update sec-scenners-config
friedrichwilken Dec 17, 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
6 changes: 4 additions & 2 deletions .github/workflows/codequality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
go-version-file: go.mod

- name: golangci-lint
uses: golangci/[email protected]
env:
GOGC: "90" # Garbage collection limit to avoid OOM errors
uses: golangci/[email protected]
with:
version: v1.57
version: v1.62
46 changes: 41 additions & 5 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GIT_BOT_TOKEN }} # creating git tag using bot token because GITHUB_TOKEN would not trigger build workflow (https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow).

- name: Create changelog
env:
Expand All @@ -54,14 +55,13 @@ jobs:
RELEASE_ID=$(./.github/scripts/create_draft_release.sh ${{ github.event.inputs.version }}) # this will use the CHANGELOG.md from the step 'Create changelog'
echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT

- name: Trigger 'release-nats-manager-build' prow job
- name: Add lightweight tag to trigger release build job
env:
GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }} # creating git tag using bot token because GITHUB_TOKEN would not trigger build workflow (https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow).
run: |
git tag ${{ github.event.inputs.version }}
git push origin ${{ github.event.inputs.version }}

- name: Wait for 'release-nats-manager-build'
run: ./.github/scripts/check-prow-build-job.sh ${{ github.ref_name }} 600 10 30

- name: Create and upload nats-manager.yaml and nats-default-cr.yaml
env:
KUSTOMIZE_VERSION: "v4.5.6"
Expand All @@ -71,9 +71,45 @@ jobs:
outputs:
release_id: ${{ steps.create-draft.outputs.release_id }}

wait-for-build-job:
name: Wait for build job
needs: [ create-draft ]
runs-on: ubuntu-latest

steps:
- name: Checkout eventing-tools
uses: actions/checkout@v4
with:
repository: 'kyma-project/eventing-tools'
path: 'kyma-project/eventing-tools'
ref: main
sparse-checkout: 'scripts/wait-for-commit-check'

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'

- name: Install requirements
run: |
pip install -r $GITHUB_WORKSPACE/kyma-project/eventing-tools/scripts/wait-for-commit-check/requirements.txt

- name: wait for build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY_FULL_NAME: ${{ github.repository_owner }}/nats-manager
GIT_REF: ${{ github.event.inputs.version }}
# The re-usable image-builder workflow from neighbors appends the "Build image" suffix to the check run name.
GIT_CHECK_RUN_NAME: "build-${{ github.event.inputs.version }} / Build image"
INTERVAL: 60
TIMEOUT: 900
run: |
python $GITHUB_WORKSPACE/kyma-project/eventing-tools/scripts/wait-for-commit-check/run.py

publish-release:
name: Publish release
needs: [verify-release-status, create-draft]
needs: [verify-release-status, create-draft, wait-for-build-job]
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-conventional-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: Check Title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/pull-build-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Pull Build Image

on:
pull_request_target:
types: [opened, edited, synchronize, reopened, ready_for_review]

permissions:
id-token: write # This is required for requesting the JWT token
contents: read # This is required for actions/checkout

jobs:
build:
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: nats-manager
dockerfile: Dockerfile
context: .
export-tags: true
112 changes: 97 additions & 15 deletions .github/workflows/pull-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,44 @@ on:
- "sec-scanners-config.yaml"

jobs:
wait-for-build-job:
name: Wait for build job
runs-on: ubuntu-latest

steps:
- name: Checkout eventing-tools
uses: actions/checkout@v4
with:
repository: 'kyma-project/eventing-tools'
path: 'kyma-project/eventing-tools'
ref: main
sparse-checkout: 'scripts/wait-for-commit-check'

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'

- name: Install requirements
run: |
pip install -r $GITHUB_WORKSPACE/kyma-project/eventing-tools/scripts/wait-for-commit-check/requirements.txt

- name: Wait for build job
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY_FULL_NAME: ${{ github.repository_owner }}/nats-manager
GIT_REF: "${{ github.event.pull_request.head.sha }}" # Note: 'github.event.pull_request.head.sha' is not same as 'github.sha' on pull requests.
# The re-usable image-builder workflow from neighbors appends the "Build image" suffix to the check run name.
GIT_CHECK_RUN_NAME: "build / Build image"
INTERVAL: 60
TIMEOUT: 900
run: |
python $GITHUB_WORKSPACE/kyma-project/eventing-tools/scripts/wait-for-commit-check/run.py

e2e:
name: e2e
needs: [ wait-for-build-job ]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -45,19 +82,6 @@ jobs:
run: |
make install IMG=$DOCKER_IMAGE

- name: Wait for the 'pull-nats-manager-build' job to succeed
uses: kyma-project/wait-for-commit-status-action@2b3ffe09af8b6f40e1213d5fb7f91a7bd41ffb20
with:
context: "pull-nats-manager-build"
commit_ref: "${{ github.event.pull_request.head.sha }}" # Note: 'github.event.pull_request.head.sha' is not same as 'github.sha' on pull requests.
timeout: 600000 # 10 minutes in milliseconds
# The check interval is kept long otherwise it will exhaust the GitHub rate limit (More info: https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limiting)
check_interval: 60000 # 1 minute in milliseconds
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_OWNER: "${{ github.repository_owner }}"
GITHUB_REPO: "nats-manager"

- name: Create kyma-system namespace
run: |
kubectl create namespace kyma-system
Expand Down Expand Up @@ -116,5 +140,63 @@ jobs:
run: |
kubectl get nats --all-namespaces

# references:
# wait for other gh checks to finish: https://github.com/marketplace/actions/wait-for-check
e2e-upgrade: # This job tests the upgrade of NATS module from latest image of the main branch to the current commit.
name: e2e-upgrade
needs: [ wait-for-build-job ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cache Go dependencies
uses: actions/setup-go@v5
with:
go-version-file: "./go.mod"
check-latest: true
cache-dependency-path: "./go.sum"

- run: go version

- name: Install k3d tools
run: |
make -C hack/ci/ install-k3d-tools

- name: Install Kyma CLI & setup k3d cluster using kyma CLI
run: |
make kyma
make -C hack/ci/ create-k3d
kubectl version
kubectl cluster-info

- name: Install latest NATS manager from main branch
run: |
make -C hack/ci/ create-kyma-system-ns
make deploy IMG=europe-docker.pkg.dev/kyma-project/prod/nats-manager:main

- name: Setup & test NATS CR
run: |
make e2e-setup

- name: Install the new NATS manager from current commit
run: |
make deploy IMG=${DOCKER_IMAGE}

- name: Wait for new changes to be reflected
# Waits for NATS-manager image to be updated and NATS CR readiness.
run: |
export MANAGER_IMAGE=${DOCKER_IMAGE}
make e2e-setup

- name: Run NATS bench
run: |
go install github.com/nats-io/natscli/nats@latest
export PATH=$HOME/go/bin:$PATH
make e2e-bench

- name: Test NATS-server
run: |
make e2e-nats-server

- name: Cleanup NATS CR
run: |
make e2e-cleanup
88 changes: 0 additions & 88 deletions .github/workflows/pull-e2e-upgrade-test.yaml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/push-build-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Push Build Image

on:
push:
branches:
- "main"
- "release-*"
paths-ignore:
- "docs/**"

permissions:
id-token: write # This is required for requesting the JWT token
contents: read # This is required for actions/checkout

jobs:
compute-tags:
runs-on: ubuntu-latest
outputs:
tags: ${{ steps.get_tag.outputs.TAGS }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get the latest tag
id: get_tag
run: |
{
echo 'TAGS<<EOF'
echo "${{ github.sha }}"
echo "${{ github.ref_name}}"
echo EOF
} >> "$GITHUB_OUTPUT"
build:
needs: compute-tags
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: nats-manager
dockerfile: Dockerfile
context: .
tags: ${{ needs.compute-tags.outputs.tags }}
Loading
Loading