Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f23249f

Browse files
committedOct 10, 2024·
spec
Signed-off-by: myan <myan@redhat.com> add Signed-off-by: myan <myan@redhat.com> format agent Signed-off-by: myan <myan@redhat.com> add the document Signed-off-by: myan <myan@redhat.com> document Signed-off-by: myan <myan@redhat.com>
1 parent 02b6e7f commit f23249f

File tree

90 files changed

+1723
-1813
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+1723
-1813
lines changed
 

‎agent/Containerfile.operator

+21-21
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ COPY go.mod go.sum ./
1010
COPY ./agent/ ./agent/
1111
COPY ./pkg/ ./pkg/
1212

13-
RUN CGO_ENABLED=1 GOFLAGS="-p=4" go build -tags strictfipsruntime -a -v -o bin/agent ./agent/cmd/agent/main.go
13+
RUN CGO_ENABLED=1 GOFLAGS="-p=4" go build -tags strictfipsruntime -a -v -o bin/agent ./agent/cmd/main.go
1414

1515
# Stage 2: Copy the binaries from the image builder to the base image
1616
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
@@ -29,22 +29,22 @@ ARG IMAGE_SUMMARY
2929
ARG IMAGE_OPENSHIFT_TAGS
3030

3131
LABEL org.label-schema.vendor="Red Hat" \
32-
org.label-schema.name="$IMAGE_NAME_ARCH" \
33-
org.label-schema.description="$IMAGE_DESCRIPTION" \
34-
org.label-schema.vcs-ref=$VCS_REF \
35-
org.label-schema.vcs-url=$VCS_URL \
36-
org.label-schema.license="Red Hat Advanced Cluster Management for Kubernetes EULA" \
37-
org.label-schema.schema-version="1.0" \
38-
name="$IMAGE_NAME" \
39-
maintainer="$IMAGE_MAINTAINER" \
40-
vendor="$IMAGE_VENDOR" \
41-
version="$IMAGE_VERSION" \
42-
release="$IMAGE_RELEASE" \
43-
description="$IMAGE_DESCRIPTION" \
44-
summary="$IMAGE_SUMMARY" \
45-
io.k8s.display-name="$IMAGE_DISPLAY_NAME" \
46-
io.k8s.description="$IMAGE_DESCRIPTION" \
47-
io.openshift.tags="$IMAGE_OPENSHIFT_TAGS"
32+
org.label-schema.name="$IMAGE_NAME_ARCH" \
33+
org.label-schema.description="$IMAGE_DESCRIPTION" \
34+
org.label-schema.vcs-ref=$VCS_REF \
35+
org.label-schema.vcs-url=$VCS_URL \
36+
org.label-schema.license="Red Hat Advanced Cluster Management for Kubernetes EULA" \
37+
org.label-schema.schema-version="1.0" \
38+
name="$IMAGE_NAME" \
39+
maintainer="$IMAGE_MAINTAINER" \
40+
vendor="$IMAGE_VENDOR" \
41+
version="$IMAGE_VERSION" \
42+
release="$IMAGE_RELEASE" \
43+
description="$IMAGE_DESCRIPTION" \
44+
summary="$IMAGE_SUMMARY" \
45+
io.k8s.display-name="$IMAGE_DISPLAY_NAME" \
46+
io.k8s.description="$IMAGE_DESCRIPTION" \
47+
io.openshift.tags="$IMAGE_OPENSHIFT_TAGS"
4848

4949
ENV USER_UID=1001
5050
ENV USER_NAME=agent
@@ -53,10 +53,10 @@ ENV USER_NAME=agent
5353
COPY --from=builder /workspace/bin/agent /usr/local/bin/agent
5454

5555
COPY ./agent/scripts/user_setup /usr/local/scripts/user_setup
56-
RUN /usr/local/scripts/user_setup
56+
RUN /usr/local/scripts/user_setup
5757

58-
RUN microdnf update -y && \
59-
microdnf clean all
58+
RUN microdnf update -y &&
59+
microdnf clean all
6060

6161
USER ${USER_UID}
62-
ENTRYPOINT ["/usr/local/bin/agent"]
62+
ENTRYPOINT ["/usr/local/bin/agent"]

‎agent/Dockerfile

+3-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ COPY go.mod go.sum ./
99
COPY ./agent/ ./agent/
1010
COPY ./pkg/ ./pkg/
1111

12-
RUN go build -o bin/agent ./agent/cmd/agent/main.go
12+
RUN go build -o bin/agent ./agent/cmd/main.go
1313

1414
# Stage 2: Copy the binaries from the image builder to the base image
1515
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
@@ -20,10 +20,9 @@ ENV USER_NAME=agent
2020
COPY --from=builder /workspace/bin/agent /usr/local/bin/agent
2121

2222
COPY ./agent/scripts/user_setup /usr/local/scripts/user_setup
23-
RUN /usr/local/scripts/user_setup
23+
RUN /usr/local/scripts/user_setup
2424

25-
RUN microdnf update -y && \
26-
microdnf clean all
25+
RUN microdnf update -y && microdnf clean all
2726

2827
USER ${USER_UID}
2928
ENTRYPOINT ["/usr/local/bin/agent"]

0 commit comments

Comments
 (0)
Please sign in to comment.