Skip to content

Commit

Permalink
Add openshift specific files.
Browse files Browse the repository at this point in the history
  • Loading branch information
serverless-qe committed Apr 26, 2023
1 parent d2efe75 commit c6dfe08
Show file tree
Hide file tree
Showing 66 changed files with 10,959 additions and 165 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/multiarch-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Multiarch builds

on:
push:
branches: [ 'release-v*' ]

jobs:
multiarch-build:
uses: openshift-knative/hack/.github/workflows/multiarch-build.yaml@main
secrets: inherit
75 changes: 75 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#This makefile is used by ci-operator

CGO_ENABLED=0
GOOS=linux
CORE_IMAGES=$(shell find ./cmd -name main.go ! -path "./cmd/broker/*" ! -path "./cmd/mtbroker/*" | sed 's|/main.go||') ./vendor/knative.dev/pkg/apiextensions/storageversion/cmd/migrate ./vendor/knative.dev/pkg/leaderelection/chaosduck
TEST_IMAGES=$(shell find ./test/test_images -mindepth 1 -maxdepth 1 -type d) ./vendor/knative.dev/reconciler-test/cmd/eventshub
BRANCH=
TEST=
IMAGE=
TEST_IMAGE_TAG ?= latest

# Guess location of openshift/release repo. NOTE: override this if it is not correct.
OPENSHIFT=${CURDIR}/../../github.com/openshift/release

install:
for img in $(CORE_IMAGES); do \
go install $$img ; \
done
go build -o $(GOPATH)/bin/mtbroker_ingress ./cmd/broker/ingress/
go build -o $(GOPATH)/bin/mtbroker_filter ./cmd/broker/filter/
go build -o $(GOPATH)/bin/storage_version_migration ./vendor/knative.dev/pkg/apiextensions/storageversion/cmd/migrate
.PHONY: install

test-install:
for img in $(TEST_IMAGES); do \
go install $$img ; \
done
.PHONY: test-install

test-e2e:
sh openshift/e2e-tests.sh
.PHONY: test-e2e

test-conformance:
sh openshift/e2e-conformance-tests.sh
.PHONY: test-conformance

test-reconciler:
sh openshift/e2e-rekt-tests.sh
.PHONY: test-reconciler

# Target used by github actions.
test-images:
for img in $(TEST_IMAGES); do \
KO_DOCKER_REPO=$(DOCKER_REPO_OVERRIDE) ko build --tags=$(TEST_IMAGE_TAG) $(KO_FLAGS) -B $$img || \
KO_DOCKER_REPO=$(DOCKER_REPO_OVERRIDE) ko resolve --tags=$(TEST_IMAGE_TAG) $(KO_FLAGS) -RBf $$img || exit $?; \
done
.PHONY: test-images

test-image-single:
KO_DOCKER_REPO=$(DOCKER_REPO_OVERRIDE) ko build --tags=$(TEST_IMAGE_TAG) $(KO_FLAGS) -B test/test_images/$(IMAGE) || \
KO_DOCKER_REPO=$(DOCKER_REPO_OVERRIDE) ko resolve --tags=$(TEST_IMAGE_TAG) $(KO_FLAGS) -RBf test/test_images/$(IMAGE)
.PHONY: test-image-single

# Run make DOCKER_REPO_OVERRIDE=<your_repo> test-e2e-local if test images are available
# in the given repository. Make sure you first build and push them there by running `make test-images`.
# Run make BRANCH=<ci_promotion_name> test-e2e-local if test images from the latest CI
# build for this branch should be used. Example: `make BRANCH=knative-v0.14.2 test-e2e-local`.
# If neither DOCKER_REPO_OVERRIDE nor BRANCH are defined the tests will use test images
# from the last nightly build.
# If TEST is defined then only the single test will be run.
test-e2e-local:
./openshift/e2e-tests-local.sh $(TEST)
.PHONY: test-e2e-local

# Generate an aggregated knative release yaml file, as well as a CI file with replaced image references
generate-release:
./openshift/release/generate-release.sh
.PHONY: generate-release

# Update CI configuration in the $(OPENSHIFT) directory.
# NOTE: Makes changes outside this repository.
update-ci:
sh ./openshift/ci-operator/update-ci.sh $(OPENSHIFT) $(CORE_IMAGES)
.PHONY: update-ci
13 changes: 4 additions & 9 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
# Approvers in this repo should also be added to the eventing-contrib
# approvers list.
# The OWNERS file is used by prow to automatically merge approved PRs.

approvers:
- technical-oversight-committee
- eventing-writers
- knative-release-leads
- eventing-approvers

# Reviewers are suggested from the reviewers list first, then the approvers
# list. To add reviewers while spreading the load among existing approvers,
# copy the approvers to the reviewers list too.
reviewers:
- eventing-writers
- eventing-reviewers

167 changes: 11 additions & 156 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
@@ -1,162 +1,17 @@
# This file is auto-generated from peribolos.
# Do not modify this file, instead modify peribolos/knative.yaml

aliases:
client-reviewers:
- itsmurugappan
client-wg-leads:
- dsimansk
- navidshaikh
- rhuss
client-writers:
- dsimansk
- maximilien
- navidshaikh
- rhuss
- vyasgun
conformance-task-force-leads:
- salaboy
conformance-writers:
- salaboy
docs-reviewers:
- nainaz
- pmbanugo
- snneji
docs-wg-leads:
- snneji
docs-writers:
- csantanapr
- psschwei
- snneji
eventing-reviewers:
- aslom
- creydr
eventing-triage:
- lberk
eventing-wg-leads:
- pierDipi
eventing-writers:
eventing-approvers:
- alanfx
- aliok
- creydr
- jcrossley3
- lberk
- lionelvillard
- matzew
- odacremolbap
- pierDipi
func-reviewers:
- jrangelramos
- nainaz
func-writers:
- jrangelramos
- lance
- lkingland
- matejvasek
- salaboy
- zroubalik
functions-wg-leads:
- lance
- salaboy
knative-admin:
- csantanapr
- dprotaso
- dsimansk
- evankanderson
- knative-automation
- knative-prow-releaser-robot
- knative-prow-robot
- knative-prow-updater-robot
- knative-test-reporter-robot
- kvmware
- lance
- mchmarny
- nainaz
- pierDipi
- pradnyavmw
- psschwei
- puerco
- salaboy
- smoser-ibm
- upodroid
- zroubalik
knative-release-leads:
- dsimansk
- kvmware
- pierDipi
- pradnyavmw
knative-robots:
- knative-automation
- knative-prow-releaser-robot
- knative-prow-robot
- knative-prow-updater-robot
- knative-test-reporter-robot
operations-reviewers:
- aliok
- houshengbo
- matzew
- maximilien
operations-wg-leads:
- houshengbo
operations-writers:
- aliok
- houshengbo
- matzew
- maximilien
productivity-leads:
- kvmware
- upodroid
productivity-reviewers:
- evankanderson
- mgencur
productivity-wg-leads:
- kvmware
- upodroid
productivity-writers:
- cardil
- kvmware
- psschwei
- upodroid
security-wg-leads:
- evankanderson
security-writers:
- evankanderson
serving-approvers:
- nak3
serving-reviewers:
- KauzClay
- carlisia
- izabelacg
- jsanin-vmw
- kauana
- pradnyavmw
- retocode
- skonto
serving-triage:
- KauzClay
- retocode
- pierdipi
- skonto
serving-wg-leads:
- dprotaso
- psschwei
serving-writers:
- dprotaso
- nak3
- psschwei
steering-committee:
- csantanapr
- lance
- nainaz
- puerco
- salaboy
technical-oversight-committee:
- dprotaso
- dsimansk
- evankanderson
- psschwei
- zroubalik
trademark-committee:
- evankanderson
- mchmarny
- smoser-ibm
ux-wg-leads:
- snneji
ux-writers:
- snneji
eventing-reviewers:
- aliok
- creydr
- lberk
- matzew
- pierdipi
23 changes: 23 additions & 0 deletions openshift/ci-operator/build-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# DO NOT EDIT! Generated Dockerfile.

# Dockerfile to bootstrap build and test in openshift-ci
FROM registry.ci.openshift.org/openshift/release:golang-1.19 as builder

RUN echo "[kubernetes]" >> /etc/yum.repos.d/kubernetes.repo && \
echo "name=Kubernetes" >> /etc/yum.repos.d/kubernetes.repo && \
echo "baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64" >> /etc/yum.repos.d/kubernetes.repo && \
echo "enabled=1" >> /etc/yum.repos.d/kubernetes.repo && \
echo "gpgcheck=1" >> /etc/yum.repos.d/kubernetes.repo && \
echo "repo_gpgcheck=0" >> /etc/yum.repos.d/kubernetes.repo && \
echo "gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg" >> /etc/yum.repos.d/kubernetes.repo

RUN yum install -y kubectl httpd-tools

RUN GOFLAGS='' go install github.com/mikefarah/yq/v3@latest

# go install creates $GOPATH/.cache with root permissions, we delete it here
# to avoid permission issues with the runtime users
RUN rm -rf $GOPATH/.cache

# Allow runtime users to add entries to /etc/passwd
RUN chmod g+rw /etc/passwd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# DO NOT EDIT! Generated Dockerfile for cmd/apiserver_receive_adapter.
FROM registry.ci.openshift.org/openshift/release:golang-1.19 as builder

COPY . .

RUN mkdir -p /var/run/ko && \
mkdir -p cmd/apiserver_receive_adapter/kodata && \
go build -o /usr/bin/main ./cmd/apiserver_receive_adapter && \
cp -r cmd/apiserver_receive_adapter/kodata /var/run/ko

FROM registry.access.redhat.com/ubi8/ubi-minimal
USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
16 changes: 16 additions & 0 deletions openshift/ci-operator/knative-images/appender/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# DO NOT EDIT! Generated Dockerfile for cmd/appender.
FROM registry.ci.openshift.org/openshift/release:golang-1.19 as builder

COPY . .

RUN mkdir -p /var/run/ko && \
mkdir -p cmd/appender/kodata && \
go build -o /usr/bin/main ./cmd/appender && \
cp -r cmd/appender/kodata /var/run/ko

FROM registry.access.redhat.com/ubi8/ubi-minimal
USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
16 changes: 16 additions & 0 deletions openshift/ci-operator/knative-images/channel_controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# DO NOT EDIT! Generated Dockerfile for cmd/in_memory/channel_controller.
FROM registry.ci.openshift.org/openshift/release:golang-1.19 as builder

COPY . .

RUN mkdir -p /var/run/ko && \
mkdir -p cmd/in_memory/channel_controller/kodata && \
go build -o /usr/bin/main ./cmd/in_memory/channel_controller && \
cp -r cmd/in_memory/channel_controller/kodata /var/run/ko

FROM registry.access.redhat.com/ubi8/ubi-minimal
USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
16 changes: 16 additions & 0 deletions openshift/ci-operator/knative-images/channel_dispatcher/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# DO NOT EDIT! Generated Dockerfile for cmd/in_memory/channel_dispatcher.
FROM registry.ci.openshift.org/openshift/release:golang-1.19 as builder

COPY . .

RUN mkdir -p /var/run/ko && \
mkdir -p cmd/in_memory/channel_dispatcher/kodata && \
go build -o /usr/bin/main ./cmd/in_memory/channel_dispatcher && \
cp -r cmd/in_memory/channel_dispatcher/kodata /var/run/ko

FROM registry.access.redhat.com/ubi8/ubi-minimal
USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
16 changes: 16 additions & 0 deletions openshift/ci-operator/knative-images/controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# DO NOT EDIT! Generated Dockerfile for cmd/controller.
FROM registry.ci.openshift.org/openshift/release:golang-1.19 as builder

COPY . .

RUN mkdir -p /var/run/ko && \
mkdir -p cmd/controller/kodata && \
go build -o /usr/bin/main ./cmd/controller && \
cp -r cmd/controller/kodata /var/run/ko

FROM registry.access.redhat.com/ubi8/ubi-minimal
USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
Loading

0 comments on commit c6dfe08

Please sign in to comment.