Skip to content

Commit

Permalink
[release-v1.15] fix: correct clusterrole permissions (knative-extensi…
Browse files Browse the repository at this point in the history
…ons#4016) (#1158)

* fix: correct clusterrole permissions (knative-extensions#4016)

Signed-off-by: Calum Murray <[email protected]>

* Run make generate-release

Signed-off-by: Pierangelo Di Pilato <[email protected]>

---------

Signed-off-by: Calum Murray <[email protected]>
Signed-off-by: Pierangelo Di Pilato <[email protected]>
Co-authored-by: Pierangelo Di Pilato <[email protected]>
  • Loading branch information
Cali0707 and pierDipi authored Sep 16, 2024
1 parent 3671b1d commit b9c5bfe
Show file tree
Hide file tree
Showing 26 changed files with 99 additions and 161 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ rules:
- "deployments"
verbs:
- "delete"
- "get"
- "list"
# we need to get statefulsets
- apiGroups:
Expand Down
18 changes: 8 additions & 10 deletions openshift/ci-operator/build-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# DO NOT EDIT! Generated Dockerfile.

FROM registry.ci.openshift.org/ocp/4.17:cli-artifacts as tools

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

RUN echo "[kubernetes]" >> /etc/yum.repos.d/kubernetes.repo && \
echo "name=Kubernetes" >> /etc/yum.repos.d/kubernetes.repo && \
echo "baseurl=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/" >> /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 "gpgkey=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/repodata/repomd.xml.key" >> /etc/yum.repos.d/kubernetes.repo
ARG TARGETARCH

COPY --from=tools /usr/share/openshift/linux_$TARGETARCH/oc.rhel8 /usr/bin/oc

RUN yum install -y kubectl httpd-tools
RUN ln -s /usr/bin/oc /usr/bin/kubectl

RUN yum install -y httpd-tools

RUN wget https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && \
chmod 700 ./get-helm-3
Expand All @@ -22,6 +23,3 @@ 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
7 changes: 2 additions & 5 deletions openshift/ci-operator/knative-images/event_display/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ FROM $GO_RUNTIME

ARG VERSION=knative-v1.15

# Install zoneinfo.
RUN microdnf install tzdata
COPY --from=builder /usr/bin/main /usr/bin/event_display

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main

LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-event-display-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-event-display-rhel8" \
Expand All @@ -31,4 +28,4 @@ LABEL \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Event Display" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Event Display"

ENTRYPOINT ["/usr/bin/main"]
ENTRYPOINT ["/usr/bin/event_display"]
7 changes: 2 additions & 5 deletions openshift/ci-operator/knative-images/heartbeats/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ FROM $GO_RUNTIME

ARG VERSION=knative-v1.15

# Install zoneinfo.
RUN microdnf install tzdata
COPY --from=builder /usr/bin/main /usr/bin/heartbeats

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main

LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-heartbeats-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-heartbeats-rhel8" \
Expand All @@ -31,4 +28,4 @@ LABEL \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Heartbeats" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Heartbeats"

ENTRYPOINT ["/usr/bin/main"]
ENTRYPOINT ["/usr/bin/heartbeats"]
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ FROM $GO_RUNTIME

ARG VERSION=knative-v1.15

# Install zoneinfo.
RUN microdnf install tzdata
COPY --from=builder /usr/bin/main /usr/bin/kafka-controller

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main

LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-kafka-controller-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-kafka-controller-rhel8" \
Expand All @@ -31,4 +28,4 @@ LABEL \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Kafka Controller" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Kafka Controller"

ENTRYPOINT ["/usr/bin/main"]
ENTRYPOINT ["/usr/bin/kafka-controller"]
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ FROM $GO_RUNTIME

ARG VERSION=knative-v1.15

# Install zoneinfo.
RUN microdnf install tzdata
COPY --from=builder /usr/bin/main /usr/bin/kafka-source-controller

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main

LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-kafka-source-controller-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-kafka-source-controller-rhel8" \
Expand All @@ -31,4 +28,4 @@ LABEL \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Kafka Source Controller" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Kafka Source Controller"

ENTRYPOINT ["/usr/bin/main"]
ENTRYPOINT ["/usr/bin/kafka-source-controller"]
7 changes: 2 additions & 5 deletions openshift/ci-operator/knative-images/migrate/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ FROM $GO_RUNTIME

ARG VERSION=knative-v1.15

# Install zoneinfo.
RUN microdnf install tzdata
COPY --from=builder /usr/bin/main /usr/bin/migrate

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main

LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-migrate-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-migrate-rhel8" \
Expand All @@ -31,4 +28,4 @@ LABEL \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Migrate" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Migrate"

ENTRYPOINT ["/usr/bin/main"]
ENTRYPOINT ["/usr/bin/migrate"]
7 changes: 2 additions & 5 deletions openshift/ci-operator/knative-images/post-install/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ FROM $GO_RUNTIME

ARG VERSION=knative-v1.15

# Install zoneinfo.
RUN microdnf install tzdata
COPY --from=builder /usr/bin/main /usr/bin/post-install

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main

LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-post-install-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-post-install-rhel8" \
Expand All @@ -31,4 +28,4 @@ LABEL \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Post Install" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Post Install"

ENTRYPOINT ["/usr/bin/main"]
ENTRYPOINT ["/usr/bin/post-install"]
7 changes: 2 additions & 5 deletions openshift/ci-operator/knative-images/webhook-kafka/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ FROM $GO_RUNTIME

ARG VERSION=knative-v1.15

# Install zoneinfo.
RUN microdnf install tzdata
COPY --from=builder /usr/bin/main /usr/bin/webhook-kafka

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main

LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-webhook-kafka-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-webhook-kafka-rhel8" \
Expand All @@ -31,4 +28,4 @@ LABEL \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Webhook Kafka" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Webhook Kafka"

ENTRYPOINT ["/usr/bin/main"]
ENTRYPOINT ["/usr/bin/webhook-kafka"]
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ FROM $GO_RUNTIME

ARG VERSION=knative-v1.15

# Install zoneinfo.
RUN microdnf install tzdata
COPY --from=builder /usr/bin/main /usr/bin/committed-offset

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main

LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-test-test-images-committed-offset-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-test-test-images-committed-offset-rhel8" \
Expand All @@ -31,4 +28,4 @@ LABEL \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Test Test Images Committed Offset" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Test Test Images Committed Offset"

ENTRYPOINT ["/usr/bin/main"]
ENTRYPOINT ["/usr/bin/committed-offset"]
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ FROM $GO_RUNTIME

ARG VERSION=knative-v1.15

# Install zoneinfo.
RUN microdnf install tzdata
COPY --from=builder /usr/bin/main /usr/bin/consumer-group-lag-provider-test

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main

LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-test-test-images-consumer-group-lag-provider-test-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-test-test-images-consumer-group-lag-provider-test-rhel8" \
Expand All @@ -31,4 +28,4 @@ LABEL \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Test Test Images Consumer Group Lag Provider Test" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Test Test Images Consumer Group Lag Provider Test"

ENTRYPOINT ["/usr/bin/main"]
ENTRYPOINT ["/usr/bin/consumer-group-lag-provider-test"]
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ FROM $GO_RUNTIME

ARG VERSION=knative-v1.15

# Install zoneinfo.
RUN microdnf install tzdata
COPY --from=builder /usr/bin/main /usr/bin/event-sender

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main

LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-vendor-knative.dev-eventing-test-test-images-event-sender-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-vendor-knative.dev-eventing-test-test-images-event-sender-rhel8" \
Expand All @@ -31,4 +28,4 @@ LABEL \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Vendor Knative.Dev Eventing Test Test Images Event Sender" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Vendor Knative.Dev Eventing Test Test Images Event Sender"

ENTRYPOINT ["/usr/bin/main"]
ENTRYPOINT ["/usr/bin/event-sender"]
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ FROM $GO_RUNTIME

ARG VERSION=knative-v1.15

# Install zoneinfo.
RUN microdnf install tzdata
COPY --from=builder /usr/bin/main /usr/bin/eventshub

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main

LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-eventshub-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-eventshub-rhel8" \
Expand All @@ -31,4 +28,4 @@ LABEL \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Eventshub" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Eventshub"

ENTRYPOINT ["/usr/bin/main"]
ENTRYPOINT ["/usr/bin/eventshub"]
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ FROM $GO_RUNTIME

ARG VERSION=knative-v1.15

# Install zoneinfo.
RUN microdnf install tzdata
COPY --from=builder /usr/bin/main /usr/bin/kafka-consumer

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main

LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-test-test-images-kafka-consumer-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-test-test-images-kafka-consumer-rhel8" \
Expand All @@ -31,4 +28,4 @@ LABEL \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Test Test Images Kafka Consumer" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Test Test Images Kafka Consumer"

ENTRYPOINT ["/usr/bin/main"]
ENTRYPOINT ["/usr/bin/kafka-consumer"]
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ FROM $GO_RUNTIME

ARG VERSION=knative-v1.15

# Install zoneinfo.
RUN microdnf install tzdata
COPY --from=builder /usr/bin/main /usr/bin/logs-exporter

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main

LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-logs-exporter-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-logs-exporter-rhel8" \
Expand All @@ -31,4 +28,4 @@ LABEL \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Logs Exporter" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Logs Exporter"

ENTRYPOINT ["/usr/bin/main"]
ENTRYPOINT ["/usr/bin/logs-exporter"]
7 changes: 2 additions & 5 deletions openshift/ci-operator/knative-test-images/print/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ FROM $GO_RUNTIME

ARG VERSION=knative-v1.15

# Install zoneinfo.
RUN microdnf install tzdata
COPY --from=builder /usr/bin/main /usr/bin/print

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main

LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-vendor-knative.dev-eventing-test-test-images-print-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-vendor-knative.dev-eventing-test-test-images-print-rhel8" \
Expand All @@ -31,4 +28,4 @@ LABEL \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Vendor Knative.Dev Eventing Test Test Images Print" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Vendor Knative.Dev Eventing Test Test Images Print"

ENTRYPOINT ["/usr/bin/main"]
ENTRYPOINT ["/usr/bin/print"]
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ FROM $GO_RUNTIME

ARG VERSION=knative-v1.15

# Install zoneinfo.
RUN microdnf install tzdata
COPY --from=builder /usr/bin/main /usr/bin/recordevents

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main

LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-vendor-knative.dev-eventing-test-test-images-recordevents-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-vendor-knative.dev-eventing-test-test-images-recordevents-rhel8" \
Expand All @@ -31,4 +28,4 @@ LABEL \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Vendor Knative.Dev Eventing Test Test Images Recordevents" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Vendor Knative.Dev Eventing Test Test Images Recordevents"

ENTRYPOINT ["/usr/bin/main"]
ENTRYPOINT ["/usr/bin/recordevents"]
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ FROM $GO_RUNTIME

ARG VERSION=knative-v1.15

# Install zoneinfo.
RUN microdnf install tzdata
COPY --from=builder /usr/bin/main /usr/bin/request-sender

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main

LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-vendor-knative.dev-eventing-test-test-images-request-sender-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-vendor-knative.dev-eventing-test-test-images-request-sender-rhel8" \
Expand All @@ -31,4 +28,4 @@ LABEL \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Vendor Knative.Dev Eventing Test Test Images Request Sender" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Vendor Knative.Dev Eventing Test Test Images Request Sender"

ENTRYPOINT ["/usr/bin/main"]
ENTRYPOINT ["/usr/bin/request-sender"]
7 changes: 2 additions & 5 deletions openshift/ci-operator/knative-test-images/watch-cm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ FROM $GO_RUNTIME

ARG VERSION=knative-v1.15

# Install zoneinfo.
RUN microdnf install tzdata
COPY --from=builder /usr/bin/main /usr/bin/watch-cm

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main

LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-watch-cm-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-watch-cm-rhel8" \
Expand All @@ -31,4 +28,4 @@ LABEL \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Watch Cm" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Watch Cm"

ENTRYPOINT ["/usr/bin/main"]
ENTRYPOINT ["/usr/bin/watch-cm"]
Loading

0 comments on commit b9c5bfe

Please sign in to comment.