Skip to content

Commit

Permalink
🔥 Apply carried patches.
Browse files Browse the repository at this point in the history
  • Loading branch information
serverless-qe committed Dec 14, 2023
1 parent 94889f5 commit 0478ed5
Show file tree
Hide file tree
Showing 70 changed files with 11,354 additions and 101 deletions.
2 changes: 1 addition & 1 deletion .ko.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Use :nonroot base image for all containers
defaultBaseImage: gcr.io/distroless/static:nonroot
defaultBaseImage: registry.access.redhat.com/ubi8/ubi-minimal:latest
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ spec:
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ spec:
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault

---

Expand Down
2 changes: 0 additions & 2 deletions config/brokers/mt-channel-broker/deployments/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ spec:
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault

ports:
- name: metrics
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion config/channels/in-memory-channel/configmaps/tracing.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions config/channels/in-memory-channel/deployments/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ spec:
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault

ports:
- name: metrics
Expand Down
2 changes: 0 additions & 2 deletions config/channels/in-memory-channel/deployments/dispatcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,3 @@ spec:
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
40 changes: 10 additions & 30 deletions config/core/configmaps/sugar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,13 @@ metadata:
annotations:
knative.dev/example-checksum: "62dfac6f"
data:
_example: |
################################
# #
# EXAMPLE CONFIGURATION #
# #
################################
# This block is not actually functional configuration,
# but serves to illustrate the available configuration
# options and document them in a way that is accessible
# to users that `kubectl edit` this config map.
#
# These sample configuration options may be copied out of
# this example block and unindented to be in the data block
# to actually change the configuration.
# namespace-selector specifies a LabelSelector which
# determines which namespaces the Sugar Controller should operate upon
# Use an empty value to disable the feature (this is the default):
namespace-selector: ""
# Use an empty object as a string to enable for all namespaces
namespace-selector: "{}"
# trigger-selector specifies a LabelSelector which
# determines which triggers the Sugar Controller should operate upon
# Use an empty value to disable the feature (this is the default):
trigger-selector: ""
# Use an empty object as string to enable for all triggers
trigger-selector: "{}"
namespace-selector: |
matchExpressions:
- key: "eventing.knative.dev/injection"
operator: "In"
values: ["enabled"]
trigger-selector: |
matchExpressions:
- key: "eventing.knative.dev/injection"
operator: "In"
values: ["enabled"]
2 changes: 0 additions & 2 deletions config/core/deployments/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ spec:
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault

livenessProbe:
httpGet:
Expand Down
2 changes: 0 additions & 2 deletions config/core/deployments/pingsource-mt-adapter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,5 @@ spec:
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault

serviceAccountName: pingsource-mt-adapter
4 changes: 2 additions & 2 deletions config/core/deployments/webhook-hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: autoscaling/v2
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: eventing-webhook
Expand Down Expand Up @@ -47,7 +47,7 @@ metadata:
app.kubernetes.io/version: devel
app.kubernetes.io/name: knative-eventing
spec:
minAvailable: 80%
minAvailable: 1
selector:
matchLabels:
app: eventing-webhook
4 changes: 1 addition & 3 deletions config/core/deployments/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ spec:
# will NOT be considered by the sinkbinding webhook.
# The default is `exclusion`.
- name: SINK_BINDING_SELECTION_MODE
value: "exclusion"
value: "inclusion"
- name: POD_NAME
valueFrom:
fieldRef:
Expand All @@ -99,8 +99,6 @@ spec:
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault

ports:
- name: https-webhook
Expand Down
41 changes: 41 additions & 0 deletions config/openshift-serverless-view-eventing-configmaps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright 2022 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: knative-eventing
name: openshift-serverless-view-eventing-configmaps
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: openshift-serverless-view-eventing-configmaps
namespace: knative-eventing
subjects:
- kind: Group
name: system:authenticated
apiGroup: rbac.authorization.k8s.io
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: openshift-serverless-view-eventing-configmaps
23 changes: 23 additions & 0 deletions config/openshift-trusted-cabundle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2020 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v1
kind: ConfigMap
metadata:
name: config-openshift-trusted-cabundle
namespace: knative-eventing
labels:
app.kubernetes.io/version: devel
app.kubernetes.io/name: knative-eventing
config.openshift.io/inject-trusted-cabundle: "true"
2 changes: 0 additions & 2 deletions config/post-install/storage-version-migrator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,3 @@ spec:
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
2 changes: 0 additions & 2 deletions config/tools/appender/appender.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,3 @@ spec:
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
2 changes: 0 additions & 2 deletions config/tools/event-display/event-display.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,3 @@ spec:
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
2 changes: 0 additions & 2 deletions config/tools/heartbeats/heartbeats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ spec:
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault

sink:
ref:
Expand Down
2 changes: 0 additions & 2 deletions config/tools/recordevents/recordevents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,3 @@ spec:
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
2 changes: 0 additions & 2 deletions config/tools/websocket-source/websocket-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ spec:
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault

sink:
ref:
Expand Down
28 changes: 28 additions & 0 deletions openshift/ci-operator/build-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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 wget https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && \
chmod 700 ./get-helm-3

RUN ./get-helm-3 --version v3.11.3 --no-sudo && helm version

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,20 @@
# 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

# install the missing zoneinfo to ubi-minimal
RUN microdnf install tzdata

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
20 changes: 20 additions & 0 deletions openshift/ci-operator/knative-images/appender/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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

# install the missing zoneinfo to ubi-minimal
RUN microdnf install tzdata

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
20 changes: 20 additions & 0 deletions openshift/ci-operator/knative-images/channel_controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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

# install the missing zoneinfo to ubi-minimal
RUN microdnf install tzdata

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
20 changes: 20 additions & 0 deletions openshift/ci-operator/knative-images/channel_dispatcher/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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

# install the missing zoneinfo to ubi-minimal
RUN microdnf install tzdata

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
20 changes: 20 additions & 0 deletions openshift/ci-operator/knative-images/controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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

# install the missing zoneinfo to ubi-minimal
RUN microdnf install tzdata

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 0478ed5

Please sign in to comment.