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

Cherry pick for 1.0.2 #329

Closed
12 changes: 7 additions & 5 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ env:

on:
pull_request:
branches: [ "main" ]
branches:
- main
- "release-*"
paths-ignore:
- 'docs/**'
- '**.md'
- 'sec-scanners-config.yaml'
- "docs/**"
- "**.md"
- "sec-scanners-config.yaml"

jobs:
nats:
Expand Down Expand Up @@ -59,7 +61,7 @@ jobs:

- name: Setup and test the eventing-manager
run: |
make e2e-setup
make e2e-setup

- name: Setup eventing
run: |
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ name: golangci-lint

on:
pull_request:
branches: [ "main" ]
branches:
- main
- "release-*"
paths-ignore:
- 'docs/**'
- '**.md'
- 'sec-scanners-config.yaml'
- "docs/**"
- "**.md"
- "sec-scanners-config.yaml"

permissions:
contents: read
Expand All @@ -19,7 +21,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: "1.21"
cache: false
- uses: actions/checkout@v4
- name: golangci-lint
Expand Down
100 changes: 51 additions & 49 deletions .github/workflows/sink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ env:
on:
push:
branches:
- main
tags: [ '*.*.*' ]
- main
- "release-*"
tags: ["*.*.*"]
paths:
- 'hack/e2e/sink/**'
- '.github/workflows/sink.yml'
- "hack/e2e/sink/**"
- ".github/workflows/sink.yml"
pull_request:
branches:
- main
- main
- "release-*"
paths:
- 'hack/e2e/sink/**'
- '.github/workflows/sink.yml'
- "hack/e2e/sink/**"
- ".github/workflows/sink.yml"

jobs:
build:
Expand All @@ -32,51 +34,51 @@ jobs:
working-directory: ${{ env.E2E_SINK_DIR }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
cache: true
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
cache: true

- name: Build
run: go build -v ./...
- name: Build
run: go build -v ./...

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
# if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
# if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha
type=semver,pattern={{version}},event=tag
labels: |
org.opencontainers.image.title=E2E Tests Sink
org.opencontainers.image.description=A webserver imitating an eventing sink that receives events and stores in memory
org.opencontainers.image.url=https://github.com/kyma-project/eventing-manager/${{ env.E2E_SINK_DIR }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha
type=semver,pattern={{version}},event=tag
labels: |
org.opencontainers.image.title=E2E Tests Sink
org.opencontainers.image.description=A webserver imitating an eventing sink that receives events and stores in memory
org.opencontainers.image.url=https://github.com/kyma-project/eventing-manager/${{ env.E2E_SINK_DIR }}

- name: Build Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: ${{ env.E2E_SINK_DIR }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
load: ${{ github.event_name == 'pull_request' }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: ${{ env.E2E_SINK_DIR }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
load: ${{ github.event_name == 'pull_request' }}
cache-from: type=gha
cache-to: type=gha,mode=max
22 changes: 13 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@ env:

on:
push:
branches: [ "main" ]
branches:
- main
- "release-*"
paths-ignore:
- 'docs/**'
- '**.md'
- 'sec-scanners-config.yaml'
- "docs/**"
- "**.md"
- "sec-scanners-config.yaml"
pull_request:
branches: [ "main" ]
branches:
- main
- "release-*"
paths-ignore:
- 'docs/**'
- '**.md'
- 'sec-scanners-config.yaml'
- "docs/**"
- "**.md"
- "sec-scanners-config.yaml"

jobs:
unit:
Expand All @@ -26,7 +30,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: "1.21"
cache: false
- name: Sync GO dependencies
run: |
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ env:

on:
push:
branches: [ "main" ]
branches:
- main
- "release-*"
paths:
- 'api/**'
- 'config/crd/**'
- "api/**"
- "config/crd/**"
pull_request:
branches: [ "main" ]
branches:
- main
- "release-*"
paths:
- 'api/**'
- 'config/crd/**'
- "api/**"
- "config/crd/**"

jobs:
crd:
Expand Down
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# next version to be released
MODULE_VERSION=1.0.1
MODULE_VERSION=1.0.2
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ RUN go mod download
COPY cmd/main.go cmd/main.go
COPY api/ api/
COPY internal/controller/ internal/controller/
COPY internal/label/ internal/label/
COPY pkg/ pkg/
COPY testing/ testing/
COPY options/ options/
Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,9 @@ ifndef ignore-not-found
endif

.PHONY: install
install: download-external-crds manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build config/crd | kubectl apply -f -

.PHONY: download-external-crds
download-external-crds:
curl -s -L -o config/crd/external/subscriptions.eventing.kyma-project.io.crd.yaml https://raw.githubusercontent.com/kyma-project/kyma/main/installation/resources/crds/eventing/subscriptions.eventing.kyma-project.io.crd.yaml

.PHONY: uninstall
uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
$(KUSTOMIZE) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
Expand Down
28 changes: 27 additions & 1 deletion PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
domain: kyma-project.io
layout:
- go.kubebuilder.io/v4
multigroup: true
projectName: eventing-manager
repo: github.com/kyma-project/eventing-manager
resources:
Expand All @@ -15,6 +16,31 @@ resources:
domain: kyma-project.io
group: operator
kind: Eventing
path: github.com/kyma-project/eventing-manager/api/v1alpha1
path: github.com/kyma-project/eventing-manager/api/operator/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: kyma-project.io
group: eventing
kind: Subscription
path: github.com/kyma-project/eventing-manager/api/eventing/v1alpha1
version: v1alpha1
webhooks:
conversion: true
webhookVersion: v1
- api:
crdVersion: v1
namespaced: true
domain: kyma-project.io
group: eventing
kind: Subscription
path: github.com/kyma-project/eventing-manager/api/eventing/v1alpha2
version: v1alpha2
webhooks:
defaulting: true
validation: true
conversion: true
webhookVersion: v1
version: "3"
Loading
Loading