Skip to content

Commit

Permalink
📂 Update openshift specific files.
Browse files Browse the repository at this point in the history
  • Loading branch information
serverless-qe committed Sep 28, 2024
1 parent 77f7b91 commit 9a151d1
Show file tree
Hide file tree
Showing 34 changed files with 17,509 additions and 10 deletions.
19 changes: 9 additions & 10 deletions openshift/ci-operator/build-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
# 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

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

RUN GOFLAGS='' go install github.com/mikefarah/yq/v3@latest
RUN GOFLAGS='' go install -tags="exclude_graphdriver_btrfs containers_image_openpgp" github.com/containers/skopeo/cmd/skopeo@v1.16.1

# 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
33 changes: 33 additions & 0 deletions openshift/ci-operator/knative-images/activator/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# DO NOT EDIT! Generated Dockerfile for cmd/activator.
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/activator

FROM $GO_RUNTIME

ARG VERSION=knative-nightly

COPY --from=builder /usr/bin/main /ko-app/activator

USER 65532

LABEL \
com.redhat.component="openshift-serverless-1-serving-activator-rhel8-container" \
name="openshift-serverless-1/serving-activator-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Serving Activator" \
maintainer="serverless-support@redhat.com" \
description="Red Hat OpenShift Serverless 1 Serving Activator" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Serving Activator" \
io.k8s.description="Red Hat OpenShift Serverless Serving Activator" \
io.openshift.tags="activator"

ENTRYPOINT ["/ko-app/activator"]
33 changes: 33 additions & 0 deletions openshift/ci-operator/knative-images/autoscaler-hpa/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# DO NOT EDIT! Generated Dockerfile for cmd/autoscaler-hpa.
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/autoscaler-hpa

FROM $GO_RUNTIME

ARG VERSION=knative-nightly

COPY --from=builder /usr/bin/main /ko-app/autoscaler-hpa

USER 65532

LABEL \
com.redhat.component="openshift-serverless-1-serving-autoscaler-hpa-rhel8-container" \
name="openshift-serverless-1/serving-autoscaler-hpa-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Serving Autoscaler Hpa" \
maintainer="serverless-support@redhat.com" \
description="Red Hat OpenShift Serverless 1 Serving Autoscaler Hpa" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Serving Autoscaler Hpa" \
io.k8s.description="Red Hat OpenShift Serverless Serving Autoscaler Hpa" \
io.openshift.tags="autoscaler-hpa"

ENTRYPOINT ["/ko-app/autoscaler-hpa"]
33 changes: 33 additions & 0 deletions openshift/ci-operator/knative-images/autoscaler/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# DO NOT EDIT! Generated Dockerfile for cmd/autoscaler.
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/autoscaler

FROM $GO_RUNTIME

ARG VERSION=knative-nightly

COPY --from=builder /usr/bin/main /ko-app/autoscaler

USER 65532

LABEL \
com.redhat.component="openshift-serverless-1-serving-autoscaler-rhel8-container" \
name="openshift-serverless-1/serving-autoscaler-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Serving Autoscaler" \
maintainer="serverless-support@redhat.com" \
description="Red Hat OpenShift Serverless 1 Serving Autoscaler" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Serving Autoscaler" \
io.k8s.description="Red Hat OpenShift Serverless Serving Autoscaler" \
io.openshift.tags="autoscaler"

ENTRYPOINT ["/ko-app/autoscaler"]
33 changes: 33 additions & 0 deletions openshift/ci-operator/knative-images/cleanup/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# DO NOT EDIT! Generated Dockerfile for pkg/cleanup/cmd/cleanup.
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./pkg/cleanup/cmd/cleanup

FROM $GO_RUNTIME

ARG VERSION=knative-nightly

COPY --from=builder /usr/bin/main /ko-app/cleanup

USER 65532

LABEL \
com.redhat.component="openshift-serverless-1-serving-cleanup-rhel8-container" \
name="openshift-serverless-1/serving-cleanup-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Serving Cleanup" \
maintainer="serverless-support@redhat.com" \
description="Red Hat OpenShift Serverless 1 Serving Cleanup" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Serving Cleanup" \
io.k8s.description="Red Hat OpenShift Serverless Serving Cleanup" \
io.openshift.tags="cleanup"

ENTRYPOINT ["/ko-app/cleanup"]
33 changes: 33 additions & 0 deletions openshift/ci-operator/knative-images/controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# DO NOT EDIT! Generated Dockerfile for cmd/controller.
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/controller

FROM $GO_RUNTIME

ARG VERSION=knative-nightly

COPY --from=builder /usr/bin/main /ko-app/controller

USER 65532

LABEL \
com.redhat.component="openshift-serverless-1-serving-controller-rhel8-container" \
name="openshift-serverless-1/serving-controller-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Serving Controller" \
maintainer="serverless-support@redhat.com" \
description="Red Hat OpenShift Serverless 1 Serving Controller" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Serving Controller" \
io.k8s.description="Red Hat OpenShift Serverless Serving Controller" \
io.openshift.tags="controller"

ENTRYPOINT ["/ko-app/controller"]
33 changes: 33 additions & 0 deletions openshift/ci-operator/knative-images/default-domain/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# DO NOT EDIT! Generated Dockerfile for cmd/default-domain.
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/default-domain

FROM $GO_RUNTIME

ARG VERSION=knative-nightly

COPY --from=builder /usr/bin/main /ko-app/default-domain

USER 65532

LABEL \
com.redhat.component="openshift-serverless-1-serving-default-domain-rhel8-container" \
name="openshift-serverless-1/serving-default-domain-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Serving Default Domain" \
maintainer="serverless-support@redhat.com" \
description="Red Hat OpenShift Serverless 1 Serving Default Domain" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Serving Default Domain" \
io.k8s.description="Red Hat OpenShift Serverless Serving Default Domain" \
io.openshift.tags="default-domain"

ENTRYPOINT ["/ko-app/default-domain"]
33 changes: 33 additions & 0 deletions openshift/ci-operator/knative-images/migrate/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# DO NOT EDIT! Generated Dockerfile for vendor/knative.dev/pkg/apiextensions/storageversion/cmd/migrate.
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./vendor/knative.dev/pkg/apiextensions/storageversion/cmd/migrate

FROM $GO_RUNTIME

ARG VERSION=knative-nightly

COPY --from=builder /usr/bin/main /ko-app/migrate

USER 65532

LABEL \
com.redhat.component="openshift-serverless-1-serving-migrate-rhel8-container" \
name="openshift-serverless-1/serving-migrate-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Serving Migrate" \
maintainer="serverless-support@redhat.com" \
description="Red Hat OpenShift Serverless 1 Serving Migrate" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Serving Migrate" \
io.k8s.description="Red Hat OpenShift Serverless Serving Migrate" \
io.openshift.tags="migrate"

ENTRYPOINT ["/ko-app/migrate"]
33 changes: 33 additions & 0 deletions openshift/ci-operator/knative-images/queue/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# DO NOT EDIT! Generated Dockerfile for cmd/queue.
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/queue

FROM $GO_RUNTIME

ARG VERSION=knative-nightly

COPY --from=builder /usr/bin/main /ko-app/queue

USER 65532

LABEL \
com.redhat.component="openshift-serverless-1-serving-queue-rhel8-container" \
name="openshift-serverless-1/serving-queue-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Serving Queue" \
maintainer="serverless-support@redhat.com" \
description="Red Hat OpenShift Serverless 1 Serving Queue" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Serving Queue" \
io.k8s.description="Red Hat OpenShift Serverless Serving Queue" \
io.openshift.tags="queue"

ENTRYPOINT ["/ko-app/queue"]
33 changes: 33 additions & 0 deletions openshift/ci-operator/knative-images/webhook/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# DO NOT EDIT! Generated Dockerfile for cmd/webhook.
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/webhook

FROM $GO_RUNTIME

ARG VERSION=knative-nightly

COPY --from=builder /usr/bin/main /ko-app/webhook

USER 65532

LABEL \
com.redhat.component="openshift-serverless-1-serving-webhook-rhel8-container" \
name="openshift-serverless-1/serving-webhook-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Serving Webhook" \
maintainer="serverless-support@redhat.com" \
description="Red Hat OpenShift Serverless 1 Serving Webhook" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Serving Webhook" \
io.k8s.description="Red Hat OpenShift Serverless Serving Webhook" \
io.openshift.tags="webhook"

ENTRYPOINT ["/ko-app/webhook"]
33 changes: 33 additions & 0 deletions openshift/ci-operator/knative-test-images/autoscale/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# DO NOT EDIT! Generated Dockerfile for test/test_images/autoscale.
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./test/test_images/autoscale

FROM $GO_RUNTIME

ARG VERSION=knative-nightly

COPY --from=builder /usr/bin/main /ko-app/autoscale

USER 65532

LABEL \
com.redhat.component="openshift-serverless-1-serving-test-test-images-autoscale-rhel8-container" \
name="openshift-serverless-1/serving-test-test-images-autoscale-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Serving Test Test Images Autoscale" \
maintainer="serverless-support@redhat.com" \
description="Red Hat OpenShift Serverless 1 Serving Test Test Images Autoscale" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Serving Test Test Images Autoscale" \
io.k8s.description="Red Hat OpenShift Serverless Serving Test Test Images Autoscale" \
io.openshift.tags="test-test-images-autoscale"

ENTRYPOINT ["/ko-app/autoscale"]
Loading

0 comments on commit 9a151d1

Please sign in to comment.