FROM openshift/golang-builder:1.12 AS builder
ENV SOURCE_GIT_COMMIT=7c430e3e821ec90916a205b71f5dfc6daf919ce2 SOURCE_DATE_EPOCH=1578928515 BUILD_VERSION=v4.3.0 SOURCE_GIT_URL=https://github.com/openshift/cluster-kube-controller-manager-operator SOURCE_GIT_TAG=7c430e3e BUILD_RELEASE=202001211731
WORKDIR /go/src/github.com/openshift/cluster-kube-controller-manager-operator
COPY . .
RUN make build --warn-undefined-variables

FROM openshift/ose-base:v4.3.0.20200121.173126
ENV SOURCE_GIT_COMMIT=7c430e3e821ec90916a205b71f5dfc6daf919ce2 SOURCE_DATE_EPOCH=1578928515 BUILD_VERSION=v4.3.0 SOURCE_GIT_URL=https://github.com/openshift/cluster-kube-controller-manager-operator SOURCE_GIT_TAG=7c430e3e BUILD_RELEASE=202001211731
RUN mkdir -p /usr/share/bootkube/manifests
COPY --from=builder /go/src/github.com/openshift/cluster-kube-controller-manager-operator/bindata/bootkube/* /usr/share/bootkube/manifests/
COPY --from=builder /go/src/github.com/openshift/cluster-kube-controller-manager-operator/cluster-kube-controller-manager-operator /usr/bin/
COPY manifests /manifests
COPY vendor/github.com/openshift/api/operator/v1/0000_25_kube-controller-manager-operator_01_config.crd.yaml /manifests

LABEL \
        com.redhat.component="ose-cluster-kube-controller-manager-operator-container" \
        name="openshift/ose-cluster-kube-controller-manager-operator" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-kube-controller-manager-operator" \
        io.openshift.release.operator="true" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-kube-controller-manager-operator/commit/7c430e3e821ec90916a205b71f5dfc6daf919ce2" \
        version="v4.3.0" \
        io.openshift.build.commit.id="7c430e3e821ec90916a205b71f5dfc6daf919ce2" \
        release="202001211731"

