Skip to content

Commit 108f295

Browse files
authored
Merge pull request #395 from ingvagabund/konflux-onboarding
WRKLDS-1537: Konflux onboarding
2 parents 3f0d5eb + 4350f3a commit 108f295

File tree

3 files changed

+92
-0
lines changed

3 files changed

+92
-0
lines changed

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.22 as builder
2+
WORKDIR /go/src/github.com/openshift/cluster-kube-descheduler-operator
3+
COPY . .
4+
RUN make build --warn-undefined-variables
5+
6+
FROM registry.redhat.io/rhel9-4-els/rhel-minimal:9.4
7+
COPY --from=builder /go/src/github.com/openshift/cluster-kube-descheduler-operator/cluster-kube-descheduler-operator /usr/bin/
8+
RUN mkdir /licenses
9+
COPY --from=builder /go/src/github.com/openshift/cluster-kube-descheduler-operator/LICENSE /licenses/.
10+
11+
LABEL io.k8s.display-name="Kube Descheduler Operator based on RHEL 9" \
12+
io.k8s.description="This is a component of OpenShift and manages the Descheduler based on RHEL 9" \
13+
com.redhat.component="kube-descheduler-operator-container" \
14+
name="kube-descheduler-operator-rhel-9" \
15+
version="${CI_CONTAINER_VERSION}" \
16+
summary="kube-descheduler-operator" \
17+
io.openshift.expose-services="" \
18+
io.openshift.tags="openshift,kube-descheduler-operator" \
19+
description="kube-descheduler-operator-container" \
20+
maintainer="AOS workloads team, <[email protected]>"
21+
22+
USER nobody

bundle.Dockerfile

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.22 as builder
2+
WORKDIR /go/src/github.com/openshift/cluster-kube-descheduler-operator
3+
COPY . .
4+
5+
RUN mkdir licenses
6+
COPY ./LICENSE licenses/.
7+
8+
ARG OPERATOR_IMAGE=registry.stage.redhat.io/kube-descheduler-operator/kube-descheduler-rhel9-operator@sha256:d298e2013332783d7e8b76fc0d6ef7d5565b9e18fea30e1fd61d9c2ef85df5af
9+
ARG OPERAND_IMAGE=registry.stage.redhat.io/kube-descheduler-operator/descheduler-rhel9@sha256:d298e2013332783d7e8b76fc0d6ef7d5565b9e18fea30e1fd61d9c2ef85df5af
10+
ARG REPLACED_OPERATOR_IMG=registry-proxy.engineering.redhat.com/rh-osbs/kube-descheduler-operator-rhel-9:latest
11+
ARG REPLACED_OPERAND_IMG=registry-proxy.engineering.redhat.com/rh-osbs/descheduler-rhel-9:latest
12+
13+
RUN hack/replace-image.sh manifests ${REPLACED_OPERATOR_IMG} ${OPERATOR_IMAGE}
14+
RUN hack/replace-image.sh manifests ${REPLACED_OPERAND_IMG} ${OPERAND_IMAGE}
15+
16+
FROM registry.redhat.io/rhel9-4-els/rhel-minimal:9.4
17+
18+
COPY --from=builder /go/src/github.com/openshift/cluster-kube-descheduler-operator/manifests /manifests
19+
COPY --from=builder /go/src/github.com/openshift/cluster-kube-descheduler-operator/metadata /metadata
20+
COPY --from=builder /go/src/github.com/openshift/cluster-kube-descheduler-operator/licenses /licenses
21+
22+
LABEL operators.operatorframework.io.bundle.mediatype.v1="registry+v1"
23+
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
24+
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
25+
LABEL operators.operatorframework.io.bundle.package.v1="cluster-kube-descheduler-operator"
26+
LABEL operators.operatorframework.io.bundle.channels.v1=stable
27+
LABEL operators.operatorframework.io.bundle.channel.default.v1=stable
28+
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.34.2
29+
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
30+
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4
31+
32+
LABEL com.redhat.component="kube-descheduler-operator-bundle-container"
33+
LABEL description="Descheduler support for OpenShift based on RHEL 9"
34+
LABEL distribution-scope="public"
35+
LABEL name="cluster-kube-descheduler-operator-metadata-rhel-9"
36+
LABEL release="5.1.2"
37+
LABEL version="5.1.2"
38+
LABEL url="https://github.com/openshift/cluster-kube-descheduler-operator"
39+
LABEL vendor="Red Hat, Inc."
40+
LABEL summary="Descheduler support for OpenShift" \
41+
LABEL io.openshift.expose-services=""
42+
LABEL io.k8s.display-name="kube-descheduler-operator based on RHEL 9" \
43+
LABEL io.k8s.description="Descheduler support for OpenShift based on RHEL 9"
44+
LABEL io.openshift.tags="openshift,kube-descheduler-operator"
45+
LABEL com.redhat.delivery.operator.bundle=true
46+
LABEL com.redhat.openshift.versions="v4.17"
47+
LABEL com.redhat.delivery.appregistry=true
48+
LABEL maintainer="AOS workloads team, <[email protected]>"
49+
50+
USER 1001

hack/replace-image.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
DIRECTORY_PATH=$1
4+
REPLACED_IMG=$2
5+
IMAGE=$3
6+
7+
find "$DIRECTORY_PATH/" -type f -exec sed -i "s|${REPLACED_IMG}|${IMAGE}|g" {} \;
8+
9+
if grep -rq "${REPLACED_IMG}" "$DIRECTORY_PATH"; then
10+
echo "Failed to replace image references"
11+
exit 1
12+
else
13+
echo "Image references replaced"
14+
fi
15+
16+
if grep -r "${IMAGE}" "$DIRECTORY_PATH"; then
17+
echo "New image references found"
18+
else
19+
echo "No new image references found"
20+
fi

0 commit comments

Comments
 (0)