File tree Expand file tree Collapse file tree 5 files changed +55
-3
lines changed Expand file tree Collapse file tree 5 files changed +55
-3
lines changed Original file line number Diff line number Diff line change 1+ build_root_image :
2+ namespace : openshift
3+ name : release
4+ tag : rhel-9-release-golang-1.24-openshift-4.20
Original file line number Diff line number Diff line change 1+ ARG BUILDER_IMAGE=registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.24-openshift-4.20
2+ ARG BASE_IMAGE=registry.ci.openshift.org/ocp/4.20:base-rhel9
3+
4+ # Build the manager binary
5+ FROM ${BUILDER_IMAGE} AS builder
6+ ARG TARGETOS
7+ ARG TARGETARCH
8+ ARG TARGETPLATFORM
9+
10+ USER 0
11+
12+ WORKDIR /workspace
13+ COPY . .
14+
15+ ENV GOEXPERIMENT=strictfipsruntime
16+ RUN make -f Makefile-ocp.mk build-ocp GOFLAGS='-tags=strictfipsruntime -mod=vendor -a' GO_BUILD_ENV='CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH}' BINARY_NAME=openshift-mcp-server
17+
18+ FROM --platform=$TARGETPLATFORM ${BASE_IMAGE}
19+ WORKDIR /
20+ COPY --from=builder /workspace/openshift-mcp-server .
21+ RUN mkdir /licenses
22+ COPY --from=builder /workspace/LICENSE /licenses/.
23+ USER 65532:65532
24+
25+ COPY mcp_config.toml /mcp_config.toml
26+ ENV CONFIG_PATH=/mcp_config.toml
27+
28+ # Labels for enterprise contract
29+ LABEL com.redhat.component=openshift-mcp-server
30+ LABEL description="Red Hat OpenShift MCP Server"
31+ LABEL io.k8s.description="Red Hat OpenShift MCP Server"
32+ LABEL io.openshift.tags="openshift,mcp"
33+ LABEL name=openshift-mcp-server
34+ LABEL release=0.0.1
35+ LABEL url="https://github.com/openshift/openshift-mcp-server"
36+ LABEL vendor="Red Hat, Inc."
37+ LABEL version=0.0.1
38+ LABEL summary="Red Hat OpenShift MCP Server"
39+
40+ ENTRYPOINT ["/openshift-mcp-server", "--config", "$CONFIG_PATH"]
Original file line number Diff line number Diff line change @@ -13,9 +13,7 @@ WORKDIR /workspace
1313COPY . .
1414
1515ENV GOEXPERIMENT=strictfipsruntime
16- ENV COMMON_BUILD_ARGS="-tags=strictfipsruntime -mod=vendor -a"
17- ENV BINARY_NAME=openshift-mcp-server
18- RUN CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} make build
16+ RUN make -f Makefile-ocp.mk build-ocp GOFLAGS='-tags=strictfipsruntime -mod=vendor -a' GO_BUILD_ENV='CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH}' BINARY_NAME=openshift-mcp-server
1917
2018FROM --platform=$TARGETPLATFORM ${BASE_IMAGE}
2119WORKDIR /
Original file line number Diff line number Diff line change 1+ include Makefile
2+
3+ .PHONY : build-ocp
4+ build-ocp : clean format
5+ $(GO_BUILD_ENV ) go build $(COMMON_BUILD_ARGS ) $(GOFLAGS ) -o $(BINARY_NAME ) ./cmd/kubernetes-mcp-server
Original file line number Diff line number Diff line change 1+ reviewers:
2+ - ardaguclu
3+ approvers:
4+ - ardaguclu
5+ component: "openshift-mcp-server"
You can’t perform that action at this time.
0 commit comments