Skip to content

Commit

Permalink
UPSTREAM: <carry>: Add Dockerfile to buld kube-apiserver for openshif…
Browse files Browse the repository at this point in the history
…t-install architectures
  • Loading branch information
JoelSpeed authored and bertinatto committed Mar 6, 2024
1 parent c7e0096 commit a1a0730
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This Dockerfile builds an image containing Mac and Linux/AMD64 versions of
# the kube-apiserver layered on top of the cluster-native Linux installer image.
# The resulting image is used to build the openshift-install binary.

FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS macbuilder
ARG TAGS=""
WORKDIR /go/src/k8s.io/kubernetes
COPY . .
ENV KUBE_BUILD_PLATFORMS=darwin/amd64
ENV KUBE_STATIC_OVERRIDES=kube-apiserver
RUN make WHAT='cmd/kube-apiserver'

FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS macarmbuilder
ARG TAGS=""
WORKDIR /go/src/k8s.io/kubernetes
COPY . .
ENV KUBE_BUILD_PLATFORMS=darwin/arm64
ENV KUBE_STATIC_OVERRIDES=kube-apiserver
RUN make WHAT='cmd/kube-apiserver'

FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS linuxbuilder
ARG TAGS=""
WORKDIR /go/src/k8s.io/kubernetes
COPY . .
ENV KUBE_BUILD_PLATFORMS=linux/amd64
ENV KUBE_STATIC_OVERRIDES=kube-apiserver
RUN make WHAT='cmd/kube-apiserver'

FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS linuxarmbuilder
ARG TAGS=""
WORKDIR /go/src/k8s.io/kubernetes
COPY . .
ENV KUBE_BUILD_PLATFORMS=linux/arm64
ENV KUBE_STATIC_OVERRIDES=kube-apiserver
RUN make WHAT='cmd/kube-apiserver'

FROM registry.ci.openshift.org/ocp/4.16:base
COPY --from=macbuilder /go/src/k8s.io/kubernetes/_output/local/bin/darwin/amd64/kube-apiserver /usr/share/openshift/darwin/amd64/kube-apiserver
COPY --from=macarmbuilder /go/src/k8s.io/kubernetes/_output/local/bin/darwin/arm64/kube-apiserver /usr/share/openshift/darwin/arm64/kube-apiserver
COPY --from=linuxbuilder /go/src/k8s.io/kubernetes/_output/local/bin/linux/amd64/kube-apiserver /usr/share/openshift/linux/amd64/kube-apiserver
COPY --from=linuxarmbuilder /go/src/k8s.io/kubernetes/_output/local/bin/linux/arm64/kube-apiserver /usr/share/openshift/linux/arm64/kube-apiserver

# This image is not an operator, it is only used as part of the build pipeline.
LABEL io.openshift.release.operator=false
10 changes: 10 additions & 0 deletions openshift-hack/images/installer-kube-apiserver-artifacts/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
reviewers:
- JoelSpeed
- vincepri
- patrickdillon
- r4f4
approvers:
- JoelSpeed
- vincepri
- patrickdillon
- r4f4

0 comments on commit a1a0730

Please sign in to comment.