Skip to content

Commit 5e5a3dd

Browse files
Add oc command to Dockerfile for initContainer
1 parent 6685254 commit 5e5a3dd

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -tags strictfipsruntime -a -o
1717

1818
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8
1919
WORKDIR /
20+
21+
RUN microdnf update -y && \
22+
microdnf install tar -y \
23+
&& microdnf clean all && \
24+
rm -rf /var/cache/yum
25+
ADD https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz /tmp/openshift-client-linux.tar.gz
26+
RUN tar -C /usr/local/bin -xvzf /tmp/openshift-client-linux.tar.gz && \
27+
chmod +x /usr/local/bin/oc /usr/local/bin/kubectl && \
28+
rm /tmp/openshift-client-linux.tar.gz
29+
2030
COPY --from=builder /workspace/manager .
2131

2232
USER 65532:65532

config/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ spec:
3838
capabilities:
3939
drop:
4040
- "ALL"
41-
image: registry.access.redhat.com/ubi8/ubi@sha256:edc34f89cf9c818c2fb28b8ea1780f384db563ce4293dc0ab8e73ec01791e5af
41+
image: $(codeflare_operator_controller_image)
4242
command:
4343
- sh
4444
- -c

config/manager/params.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
varReference:
22
- path: spec/template/spec/containers[]/image
33
kind: Deployment
4+
- path: spec/template/spec/initContainers[]/image
5+
kind: Deployment

0 commit comments

Comments
 (0)