Skip to content

Commit 28b21f1

Browse files
committed
Test support for Mellanox interfaces
1 parent 322f394 commit 28b21f1

File tree

6 files changed

+14
-36
lines changed

6 files changed

+14
-36
lines changed

grout-container-app/cnfapp/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## 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
33

4-
WORKDIR /utils
4+
WORKDIR /tmp
55
COPY utils/webserver.go .
66
RUN go mod init webserver.go
77
RUN GOOS=linux CGO_ENABLED=0 go build -a -o webserver .
@@ -53,12 +53,12 @@ RUN chmod 750 /var/log/grout
5353
RUN chown example-cnf /var/log/grout
5454

5555
# 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
5757
COPY --chmod=550 scripts/grout-wrapper /usr/local/bin/example-cnf/grout-wrapper
5858
COPY --chmod=550 scripts/retrieve-grout-ip-addresses /usr/local/bin/example-cnf/retrieve-grout-ip-addresses
5959

6060
# Move to the custom user
61-
USER example-cnf
61+
USER root
6262

6363
# Prepare entrypoint
6464
ENTRYPOINT ["/usr/local/bin/example-cnf/grout-wrapper"]

grout-operator/roles/grout/templates/deployment.yml

-10
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ spec:
4949
values:
5050
- pkt-gen
5151
topologyKey: kubernetes.io/hostname
52-
securityContext:
53-
runAsNonRoot: true
54-
runAsUser: 56560
5552
serviceAccountName: grout-account
5653
{% if runtime_class_name is defined and runtime_class_name | length %}
5754
runtimeClassName: "{{ runtime_class_name }}"
@@ -64,17 +61,10 @@ spec:
6461
image: "{{ image_grout }}"
6562
imagePullPolicy: "{{ image_pull_policy }}"
6663
securityContext:
67-
runAsNonRoot: true
68-
runAsUser: 56560
6964
{% if run_deployment is defined and run_deployment == 1 %}
7065
readOnlyRootFilesystem: true
7166
{% endif %}
72-
{% if privileged %}
7367
privileged: true
74-
{% else %}
75-
capabilities:
76-
add: ["IPC_LOCK", "NET_ADMIN", "AUDIT_WRITE"]
77-
{% endif %}
7868
resources:
7969
limits:
8070
hugepages-1Gi: {{ hugepage_1gb_count }}

testpmd-container-app/cnfapp/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
FROM quay.io/rh-nfv-int/dpdk:v0.0.1 as build
33

44
## 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
66

7-
WORKDIR /utils
7+
WORKDIR /tmp
88
COPY utils/webserver.go .
99
RUN go mod init webserver.go
1010
RUN GOOS=linux CGO_ENABLED=0 go build -a -o webserver .
@@ -43,7 +43,7 @@ RUN chmod 750 /var/log/testpmd
4343
RUN chown example-cnf /var/log/testpmd
4444

4545
# 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
4747
COPY --chmod=550 --from=build /usr/local/bin/dpdk-testpmd /usr/local/bin/example-cnf/testpmd
4848
COPY --chmod=550 scripts/testpmd-wrapper /usr/local/bin/example-cnf/testpmd-wrapper
4949

trex-container-app/app/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM docker.io/library/golang:1.23 as build
1+
FROM registry.access.redhat.com/ubi9/go-toolset:1.23 as build
22

3-
WORKDIR /utils
3+
WORKDIR /tmp
44
COPY utils/webserver.go .
55
RUN go mod init webserver.go
66
RUN GOOS=linux CGO_ENABLED=0 go build -a -o webserver .
@@ -45,7 +45,7 @@ RUN chown example-cnf:example-cnf /var/log/trex
4545

4646
# Copy scripts
4747
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
4949
COPY --chmod=550 pyfiles /opt/pyfiles/
5050

5151
# Move to the custom user

trex-container-app/server/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM docker.io/library/golang:1.23 as build
1+
FROM registry.access.redhat.com/ubi9/go-toolset:1.23 as build
22

3-
WORKDIR /utils
3+
WORKDIR /tmp
44
COPY utils/webserver.go .
55
RUN go mod init webserver.go
66
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
7979

8080
# Copy scripts
8181
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
8383

8484
# Move to the custom user
85-
USER example-cnf
85+
USER root

trex-operator/roles/trexconfig/templates/deployment.yml

-12
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ spec:
5858
values:
5959
- cnf-app
6060
topologyKey: kubernetes.io/hostname
61-
securityContext:
62-
runAsNonRoot: true
63-
runAsUser: 56560
6461
serviceAccountName: trex-server-account
6562
{% if runtime_class_name is defined and runtime_class_name | length %}
6663
runtimeClassName: "{{ runtime_class_name }}"
@@ -82,17 +79,10 @@ spec:
8279
- name: "http-probe"
8380
containerPort: 8096
8481
securityContext:
85-
runAsNonRoot: true
86-
runAsUser: 56560
8782
{% if run_deployment is defined and run_deployment == 1 %}
8883
readOnlyRootFilesystem: true
8984
{% endif %}
90-
{% if privileged %}
9185
privileged: true
92-
{% else %}
93-
capabilities:
94-
add: ["IPC_LOCK", "NET_ADMIN", "AUDIT_WRITE"]
95-
{% endif %}
9686
resources:
9787
limits:
9888
hugepages-1Gi: {{ hugepage_1gb_count }}
@@ -168,8 +158,6 @@ spec:
168158
image: "{{ image_app }}"
169159
imagePullPolicy: "{{ image_pull_policy }}"
170160
securityContext:
171-
runAsNonRoot: true
172-
runAsUser: 56560
173161
{% if run_deployment is defined and run_deployment == 1 %}
174162
readOnlyRootFilesystem: true
175163
{% endif %}

0 commit comments

Comments
 (0)