Skip to content

Commit 4dc2ae6

Browse files
Merge pull request kubernetes-sigs#30 from ardaguclu/add-prow-dockerfile
<CARRY>: CNTRLPLANE-211: Add Prow Dockerfile and Update Konflux Dockerfile accordingly
2 parents 2cbb936 + 7404596 commit 4dc2ae6

File tree

4 files changed

+87
-12
lines changed

4 files changed

+87
-12
lines changed

.ci-operator.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build_root_image:
2+
namespace: openshift
3+
name: release
4+
tag: rhel-9-release-golang-1.23-openshift-4.19

Dockerfile.ci

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
ARG BUILDER_IMAGE=registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.23-openshift-4.19
2+
ARG BASE_IMAGE=registry.ci.openshift.org/ocp/builder:rhel-9-base-openshift-4.19
3+
4+
# Build the manager binary
5+
FROM ${BUILDER_IMAGE} AS builder
6+
7+
ARG TARGETOS
8+
ARG TARGETARCH
9+
ARG TARGETPLATFORM
10+
11+
ENV GOEXPERIMENT=strictfipsruntime
12+
13+
WORKDIR /workspace
14+
COPY . .
15+
16+
RUN CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -tags strictfipsruntime -mod=vendor -a -o manager cmd/main.go
17+
18+
FROM --platform=$TARGETPLATFORM ${BASE_IMAGE}
19+
WORKDIR /
20+
COPY --from=builder /workspace/manager .
21+
RUN mkdir /licenses
22+
COPY --from=builder /workspace/LICENSE /licenses/.
23+
USER 65532:65532
24+
25+
LABEL com.redhat.component="Leader Worker Set"
26+
LABEL name="lws"
27+
LABEL release="0.5.1"
28+
LABEL version="0.5.1"
29+
LABEL url="https://github.com/openshift/kubernetes-sigs-lws"
30+
LABEL vendor="Red Hat, Inc."
31+
LABEL description="LeaderWorkerSet: An API for deploying a group of pods as a unit of replication. \
32+
It aims to address common deployment patterns of AI/ML inference workloads, \
33+
especially multi-host inference workloads where the LLM will be sharded \
34+
and run across multiple devices on multiple nodes."
35+
LABEL io.k8s.description="LeaderWorkerSet: An API for deploying a group of pods as a unit of replication. \
36+
It aims to address common deployment patterns of AI/ML inference workloads, \
37+
especially multi-host inference workloads where the LLM will be sharded \
38+
and run across multiple devices on multiple nodes."
39+
LABEL summary="LeaderWorkerSet: An API for deploying a group of pods as a unit of replication. \
40+
It aims to address common deployment patterns of AI/ML inference workloads, \
41+
especially multi-host inference workloads where the LLM will be sharded \
42+
and run across multiple devices on multiple nodes."
43+
LABEL io.k8s.display-name="Leader Worker Set"
44+
LABEL io.openshift.tags="openshift,operator,leaderworkerset,lws"
45+
46+
ENTRYPOINT ["/manager"]

Dockerfile.ocp

+29-10
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,46 @@
11
ARG BUILDER_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.23
2-
ARG BASE_IMAGE=registry.redhat.io/rhel9-4-els/rhel:9.4
3-
2+
ARG BASE_IMAGE=registry.redhat.io/rhel9-4-els/rhel-minimal:9.4
43

54
# Build the manager binary
65
FROM ${BUILDER_IMAGE} AS builder
7-
FROM --platform=${BUILDPLATFORM} ${BUILDER_IMAGE} as builder
86

97
ARG TARGETOS
108
ARG TARGETARCH
9+
ARG TARGETPLATFORM
10+
11+
ENV GOEXPERIMENT=strictfipsruntime
1112

1213
WORKDIR /workspace
1314
COPY . .
1415

15-
# Build
16-
# the GOARCH has not a default value to allow the binary be built according to the host where the command
17-
# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO
18-
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
19-
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
20-
RUN CGO_ENABLED=${CGO_ENABLED:-1} GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go
16+
RUN CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -tags strictfipsruntime -mod=vendor -a -o manager cmd/main.go
2117

22-
FROM ${BASE_IMAGE}
18+
FROM --platform=$TARGETPLATFORM ${BASE_IMAGE}
2319
WORKDIR /
2420
COPY --from=builder /workspace/manager .
21+
RUN mkdir /licenses
22+
COPY --from=builder /workspace/LICENSE /licenses/.
2523
USER 65532:65532
2624

25+
LABEL com.redhat.component="Leader Worker Set"
26+
LABEL name="lws"
27+
LABEL release="0.5.1"
28+
LABEL version="0.5.1"
29+
LABEL url="https://github.com/openshift/kubernetes-sigs-lws"
30+
LABEL vendor="Red Hat, Inc."
31+
LABEL description="LeaderWorkerSet: An API for deploying a group of pods as a unit of replication. \
32+
It aims to address common deployment patterns of AI/ML inference workloads, \
33+
especially multi-host inference workloads where the LLM will be sharded \
34+
and run across multiple devices on multiple nodes."
35+
LABEL io.k8s.description="LeaderWorkerSet: An API for deploying a group of pods as a unit of replication. \
36+
It aims to address common deployment patterns of AI/ML inference workloads, \
37+
especially multi-host inference workloads where the LLM will be sharded \
38+
and run across multiple devices on multiple nodes."
39+
LABEL summary="LeaderWorkerSet: An API for deploying a group of pods as a unit of replication. \
40+
It aims to address common deployment patterns of AI/ML inference workloads, \
41+
especially multi-host inference workloads where the LLM will be sharded \
42+
and run across multiple devices on multiple nodes."
43+
LABEL io.k8s.display-name="Leader Worker Set"
44+
LABEL io.openshift.tags="openshift,operator,leaderworkerset,lws"
45+
2746
ENTRYPOINT ["/manager"]

OWNERS

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
# See the OWNERS docs at https://go.k8s.io/owners
2-
1+
reviewers:
2+
- ardaguclu
3+
- atiratree
4+
- kannon92
5+
- mrunalp
36
approvers:
7+
- ardaguclu
8+
- atiratree
49
- kannon92
510
- mrunalp
11+
component: "kubernetes-sigs-lws"

0 commit comments

Comments
 (0)