Skip to content

Commit fb69870

Browse files
committed
fix
1 parent d9a05bd commit fb69870

File tree

5 files changed

+55
-3
lines changed

5 files changed

+55
-3
lines changed

.ci-operator.yaml

Lines changed: 4 additions & 0 deletions
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.24-openshift-4.20

Dockerfile.ci

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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"]

Dockerfile.ocp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ WORKDIR /workspace
1313
COPY . .
1414

1515
ENV 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

2018
FROM --platform=$TARGETPLATFORM ${BASE_IMAGE}
2119
WORKDIR /

Makefile-ocp.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
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

OWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
reviewers:
2+
- ardaguclu
3+
approvers:
4+
- ardaguclu
5+
component: "openshift-mcp-server"

0 commit comments

Comments
 (0)