File tree 6 files changed +14
-36
lines changed
grout-container-app/cnfapp
grout-operator/roles/grout/templates
testpmd-container-app/cnfapp
trex-operator/roles/trexconfig/templates
6 files changed +14
-36
lines changed Original file line number Diff line number Diff line change 1
1
# # Image to build webserver
2
- FROM docker.io/library/golang :1.23 as build
2
+ FROM registry.access.redhat.com/ubi9/go-toolset :1.23 as build
3
3
4
- WORKDIR /utils
4
+ WORKDIR /tmp
5
5
COPY utils/webserver.go .
6
6
RUN go mod init webserver.go
7
7
RUN GOOS=linux CGO_ENABLED=0 go build -a -o webserver .
@@ -53,12 +53,12 @@ RUN chmod 750 /var/log/grout
53
53
RUN chown example-cnf /var/log/grout
54
54
55
55
# Copy scripts
56
- COPY --chmod=550 --from=build /utils /webserver /usr/local/bin/webserver
56
+ COPY --chmod=550 --from=build /tmp /webserver /usr/local/bin/webserver
57
57
COPY --chmod=550 scripts/grout-wrapper /usr/local/bin/example-cnf/grout-wrapper
58
58
COPY --chmod=550 scripts/retrieve-grout-ip-addresses /usr/local/bin/example-cnf/retrieve-grout-ip-addresses
59
59
60
60
# Move to the custom user
61
- USER example-cnf
61
+ USER root
62
62
63
63
# Prepare entrypoint
64
64
ENTRYPOINT ["/usr/local/bin/example-cnf/grout-wrapper" ]
Original file line number Diff line number Diff line change 49
49
values :
50
50
- pkt-gen
51
51
topologyKey : kubernetes.io/hostname
52
- securityContext :
53
- runAsNonRoot : true
54
- runAsUser : 56560
55
52
serviceAccountName : grout-account
56
53
{% if runtime_class_name is defined and runtime_class_name | length %}
57
54
runtimeClassName : " {{ runtime_class_name }}"
@@ -64,17 +61,10 @@ spec:
64
61
image : " {{ image_grout }}"
65
62
imagePullPolicy : " {{ image_pull_policy }}"
66
63
securityContext :
67
- runAsNonRoot : true
68
- runAsUser : 56560
69
64
{% if run_deployment is defined and run_deployment == 1 %}
70
65
readOnlyRootFilesystem : true
71
66
{% endif %}
72
- {% if privileged %}
73
67
privileged : true
74
- {% else %}
75
- capabilities :
76
- add : ["IPC_LOCK", "NET_ADMIN", "AUDIT_WRITE"]
77
- {% endif %}
78
68
resources :
79
69
limits :
80
70
hugepages-1Gi : {{ hugepage_1gb_count }}
Original file line number Diff line number Diff line change 2
2
FROM quay.io/rh-nfv-int/dpdk:v0.0.1 as build
3
3
4
4
# # Image to build webserver
5
- FROM docker.io/library/golang :1.23 as build2
5
+ FROM registry.access.redhat.com/ubi9/go-toolset :1.23 as build2
6
6
7
- WORKDIR /utils
7
+ WORKDIR /tmp
8
8
COPY utils/webserver.go .
9
9
RUN go mod init webserver.go
10
10
RUN GOOS=linux CGO_ENABLED=0 go build -a -o webserver .
@@ -43,7 +43,7 @@ RUN chmod 750 /var/log/testpmd
43
43
RUN chown example-cnf /var/log/testpmd
44
44
45
45
# Copy scripts
46
- COPY --chmod=550 --from=build2 /utils /webserver /usr/local/bin/webserver
46
+ COPY --chmod=550 --from=build2 /tmp /webserver /usr/local/bin/webserver
47
47
COPY --chmod=550 --from=build /usr/local/bin/dpdk-testpmd /usr/local/bin/example-cnf/testpmd
48
48
COPY --chmod=550 scripts/testpmd-wrapper /usr/local/bin/example-cnf/testpmd-wrapper
49
49
Original file line number Diff line number Diff line change 1
- FROM docker.io/library/golang :1.23 as build
1
+ FROM registry.access.redhat.com/ubi9/go-toolset :1.23 as build
2
2
3
- WORKDIR /utils
3
+ WORKDIR /tmp
4
4
COPY utils/webserver.go .
5
5
RUN go mod init webserver.go
6
6
RUN GOOS=linux CGO_ENABLED=0 go build -a -o webserver .
@@ -45,7 +45,7 @@ RUN chown example-cnf:example-cnf /var/log/trex
45
45
46
46
# Copy scripts
47
47
COPY --chmod=550 scripts /usr/local/bin/
48
- COPY --chmod=550 --from=build /utils /webserver /usr/local/bin/webserver
48
+ COPY --chmod=550 --from=build /tmp /webserver /usr/local/bin/webserver
49
49
COPY --chmod=550 pyfiles /opt/pyfiles/
50
50
51
51
# Move to the custom user
Original file line number Diff line number Diff line change 1
- FROM docker.io/library/golang :1.23 as build
1
+ FROM registry.access.redhat.com/ubi9/go-toolset :1.23 as build
2
2
3
- WORKDIR /utils
3
+ WORKDIR /tmp
4
4
COPY utils/webserver.go .
5
5
RUN go mod init webserver.go
6
6
RUN GOOS=linux CGO_ENABLED=0 go build -a -o webserver .
@@ -79,7 +79,7 @@ RUN chmod 664 /usr/local/bin/example-cnf/trex_cfg.yaml
79
79
80
80
# Copy scripts
81
81
COPY --chmod=550 scripts /usr/local/bin
82
- COPY --chmod=550 --from=build /utils /webserver /usr/local/bin/webserver
82
+ COPY --chmod=550 --from=build /tmp /webserver /usr/local/bin/webserver
83
83
84
84
# Move to the custom user
85
- USER example-cnf
85
+ USER root
Original file line number Diff line number Diff line change 58
58
values :
59
59
- cnf-app
60
60
topologyKey : kubernetes.io/hostname
61
- securityContext :
62
- runAsNonRoot : true
63
- runAsUser : 56560
64
61
serviceAccountName : trex-server-account
65
62
{% if runtime_class_name is defined and runtime_class_name | length %}
66
63
runtimeClassName : " {{ runtime_class_name }}"
@@ -82,17 +79,10 @@ spec:
82
79
- name : " http-probe"
83
80
containerPort : 8096
84
81
securityContext :
85
- runAsNonRoot : true
86
- runAsUser : 56560
87
82
{% if run_deployment is defined and run_deployment == 1 %}
88
83
readOnlyRootFilesystem : true
89
84
{% endif %}
90
- {% if privileged %}
91
85
privileged : true
92
- {% else %}
93
- capabilities :
94
- add : ["IPC_LOCK", "NET_ADMIN", "AUDIT_WRITE"]
95
- {% endif %}
96
86
resources :
97
87
limits :
98
88
hugepages-1Gi : {{ hugepage_1gb_count }}
@@ -168,8 +158,6 @@ spec:
168
158
image : " {{ image_app }}"
169
159
imagePullPolicy : " {{ image_pull_policy }}"
170
160
securityContext :
171
- runAsNonRoot : true
172
- runAsUser : 56560
173
161
{% if run_deployment is defined and run_deployment == 1 %}
174
162
readOnlyRootFilesystem : true
175
163
{% endif %}
You can’t perform that action at this time.
0 commit comments