Skip to content

Commit ede33a4

Browse files
Merge pull request #87 from JesseStutler/release-0.1-cherry-pick
[Cherry-pick] Add security context configuration and bump image to v0.1.1
2 parents 5ace89a + 8180032 commit ede33a4

File tree

3 files changed

+35
-6
lines changed

3 files changed

+35
-6
lines changed

deployment/build/frontend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ COPY --from=builder /app/build /usr/share/nginx/html
1616

1717
COPY frontend/nginx.conf /etc/nginx/nginx.conf
1818

19-
EXPOSE 80
19+
EXPOSE 8080
2020

2121
CMD ["nginx", "-g", "daemon off;"]

deployment/volcano-dashboard.yaml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,51 @@ spec:
1616
labels:
1717
app: volcano-dashboard
1818
spec:
19+
securityContext:
20+
seLinuxOptions:
21+
level: s0:c123,c456
22+
seccompProfile:
23+
type: RuntimeDefault
1924
serviceAccountName: volcano-dashboard
2025
containers:
21-
- image: volcanosh/vc-dashboard-frontend:v0.1.0
26+
- image: volcanosh/vc-dashboard-frontend:v0.1.1
2227
imagePullPolicy: Always
2328
name: frontend
2429
ports:
25-
- containerPort: 80
30+
- containerPort: 8080
2631
name: frontend
2732
protocol: TCP
28-
- image: volcanosh/vc-dashboard-backend:v0.1.0
33+
securityContext:
34+
allowPrivilegeEscalation: false
35+
capabilities:
36+
drop:
37+
- ALL
38+
runAsNonRoot: true
39+
runAsUser: 1000
40+
volumeMounts:
41+
- mountPath: /var/cache/nginx
42+
name: nginx-cache
43+
- mountPath: /run
44+
name: nginx-run
45+
- image: volcanosh/vc-dashboard-backend:v0.1.1
2946
imagePullPolicy: Always
3047
name: backend
3148
ports:
3249
- containerPort: 3001
3350
name: backend
3451
protocol: TCP
52+
securityContext:
53+
allowPrivilegeEscalation: false
54+
capabilities:
55+
drop:
56+
- ALL
57+
runAsNonRoot: true
58+
runAsUser: 1000
59+
volumes:
60+
- name: nginx-cache
61+
emptyDir: {}
62+
- name: nginx-run
63+
emptyDir: {}
3564
---
3665

3766
# volcano dashboard serviceAccount
@@ -115,6 +144,6 @@ spec:
115144
- name: frontend
116145
port: 80
117146
protocol: TCP
118-
targetPort: 80
147+
targetPort: 8080
119148
selector:
120149
app: volcano-dashboard

frontend/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ events {}
33
http {
44
include mime.types;
55
server {
6-
listen 80;
6+
listen 8080;
77
server_name localhost;
88

99
location / {

0 commit comments

Comments
 (0)