Skip to content

Commit 2c12efd

Browse files
committed
Add openshift specific files.
1 parent 55c5b1f commit 2c12efd

File tree

82 files changed

+13803
-48
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+13803
-48
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
name: Dependabot
3+
4+
on:
5+
pull_request:
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
update-deps:
12+
name: Update deps
13+
runs-on: ubuntu-latest
14+
if: ${{ github.actor == 'dependabot[bot]' }}
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.head_ref }}
20+
path: ./src/github.com/${{ github.repository }}
21+
fetch-depth: 0
22+
23+
- name: Setup Golang
24+
uses: openshift-knative/hack/actions/setup-go@main
25+
26+
- name: Install yq
27+
run: |
28+
go install github.com/mikefarah/yq/v3@latest
29+
30+
- name: Generate files
31+
working-directory: ./src/github.com/${{ github.repository }}
32+
run: make generate-release
33+
34+
- name: git push
35+
working-directory: ./src/github.com/${{ github.repository }}
36+
run: |
37+
if ! git diff --exit-code --quiet
38+
then
39+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
40+
git config --local user.name "github-actions[bot]"
41+
git add .
42+
git commit -m "Run make generate-release"
43+
git push
44+
fi

.ko.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Use :nonroot base image for all containers
2-
defaultBaseImage: gcr.io/distroless/static:nonroot
2+
defaultBaseImage: registry.access.redhat.com/ubi8/ubi-minimal:latest

Makefile

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# This file is needed by kubebuilder but all functionality should exist inside
2+
# the hack/ files.
3+
4+
CGO_ENABLED=0
5+
GOOS=linux
6+
# Ignore errors if there are no images.
7+
CONTROL_PLANE_IMAGES=./control-plane/cmd/kafka-controller ./control-plane/cmd/webhook-kafka ./control-plane/cmd/post-install
8+
TEST_IMAGES=$(shell find ./test/cmd ./test/test_images ./vendor/knative.dev/reconciler-test/cmd ./vendor/knative.dev/eventing/test/test_images -mindepth 1 -maxdepth 1 -type d 2> /dev/null)
9+
BRANCH=
10+
TEST=
11+
IMAGE=
12+
TEST_IMAGE_TAG ?= latest
13+
14+
# Guess location of openshift/release repo. NOTE: override this if it is not correct.
15+
OPENSHIFT=${CURDIR}/../../github.com/openshift/release
16+
17+
# Build and install commands.
18+
install:
19+
for img in $(CONTROL_PLANE_IMAGES); do \
20+
go install $$img ; \
21+
done
22+
.PHONY: install
23+
24+
test-install:
25+
for img in $(TEST_IMAGES); do \
26+
go install $$img ; \
27+
done
28+
.PHONY: test-install
29+
30+
test-e2e:
31+
openshift/e2e-tests.sh
32+
.PHONY: test-e2e
33+
34+
test-reconciler:
35+
openshift/e2e-rekt-tests.sh
36+
.PHONY: test-reconciler
37+
38+
test-reconciler-keda:
39+
INSTALL_KEDA="true" openshift/e2e-rekt-tests.sh
40+
.PHONY: test-reconciler-keda
41+
42+
test-reconciler-encryption-auth:
43+
openshift/e2e-rekt-encryption-auth-tests.sh
44+
.PHONY: test-reconciler
45+
46+
# Requires ko 0.2.0 or newer.
47+
# Target used by github actions.
48+
test-images:
49+
for img in $(TEST_IMAGES); do \
50+
KO_DOCKER_REPO=$(DOCKER_REPO_OVERRIDE) ko build --tags=$(TEST_IMAGE_TAG) $(KO_FLAGS) -B $$img || \
51+
KO_DOCKER_REPO=$(DOCKER_REPO_OVERRIDE) ko resolve --tags=$(TEST_IMAGE_TAG) $(KO_FLAGS) -RBf $$img || exit $?; \
52+
done
53+
.PHONY: test-images
54+
55+
test-image-single:
56+
KO_DOCKER_REPO=$(DOCKER_REPO_OVERRIDE) ko build --tags=$(TEST_IMAGE_TAG) $(KO_FLAGS) -B test/test_images/$(IMAGE) || \
57+
KO_DOCKER_REPO=$(DOCKER_REPO_OVERRIDE) ko resolve --tags=$(TEST_IMAGE_TAG) $(KO_FLAGS) -RBf test/test_images/$(IMAGE)
58+
.PHONY: test-image-single
59+
60+
# Run make DOCKER_REPO_OVERRIDE=<your_repo> test-e2e-local if test images are available
61+
# in the given repository. Make sure you first build and push them there by running `make test-images`.
62+
# Run make BRANCH=<ci_promotion_name> test-e2e-local if test images from the latest CI
63+
# build for this branch should be used. Example: `make BRANCH=knative-v0.14.2 test-e2e-local`.
64+
# If neither DOCKER_REPO_OVERRIDE nor BRANCH are defined the tests will use test images
65+
# from the last nightly build.
66+
# If TEST is defined then only the single test will be run.
67+
test-e2e-local:
68+
./openshift/e2e-tests-local.sh $(TEST)
69+
.PHONY: test-e2e-local
70+
71+
# Generate an aggregated knative release yaml file, as well as a CI file with replaced image references
72+
generate-release:
73+
./openshift/release/generate-release.sh $(RELEASE)
74+
.PHONY: generate-release

OWNERS

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
# Sponsored by the Event Delivery WG
2-
# At least one WG lead from https://github.com/knative/community/blob/master/working-groups/WORKING-GROUPS.md#event-delivery
3-
# must be in the "approvers" list.
1+
# The OWNERS file is used by prow to automatically merge approved PRs.
2+
3+
# DO NOT EDIT! File generated via https://github.com/openshift-knative/hack/tree/main/config.
4+
45
approvers:
5-
- technical-oversight-committee
6-
- knative-release-leads
7-
- eventing-writers
8-
- eventing-kafka-broker-approvers
6+
- aliok
7+
- Cali0707
8+
- creydr
9+
- lberk
10+
- matzew
11+
- rudyredhat1
912

1013
reviewers:
11-
- eventing-writers
12-
- eventing-kafka-broker-approvers
13-
- eventing-kafka-broker-reviewers
14+
- aliok
15+
- Cali0707
16+
- creydr
17+
- lberk
18+
- matzew

control-plane/config/eventing-kafka-broker/200-controller/500-controller.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,4 @@ spec:
204204
capabilities:
205205
drop:
206206
- ALL
207-
seccompProfile:
208-
type: RuntimeDefault
209207
restartPolicy: Always

control-plane/config/eventing-kafka-broker/200-webhook/500-webhook.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ spec:
8989
capabilities:
9090
drop:
9191
- ALL
92-
seccompProfile:
93-
type: RuntimeDefault
9492

9593
ports:
9694
- name: https-webhook

control-plane/config/eventing-kafka-source/200-controller/500-controller.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,4 @@ spec:
112112
capabilities:
113113
drop:
114114
- ALL
115-
seccompProfile:
116-
type: RuntimeDefault
117115
restartPolicy: Always

control-plane/config/post-install/500-post-install-job.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,3 @@ spec:
5151
capabilities:
5252
drop:
5353
- ALL
54-
seccompProfile:
55-
type: RuntimeDefault

control-plane/config/post-install/500-storage-version-migrator.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,3 @@ spec:
5151
capabilities:
5252
drop:
5353
- ALL
54-
seccompProfile:
55-
type: RuntimeDefault

control-plane/pkg/reconciler/broker/namespaced_broker.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ func (r *NamespacedReconciler) configMapsFromSystemNamespace(broker *eventing.Br
412412
"config-tracing",
413413
"config-features",
414414
"kafka-config-logging",
415+
"config-openshift-trusted-cabundle",
415416
}
416417
resources := make([]unstructured.Unstructured, 0, len(configMaps))
417418
for _, name := range configMaps {

0 commit comments

Comments
 (0)