Skip to content

Commit

Permalink
Run echo as non root. (istio#31568)
Browse files Browse the repository at this point in the history
* Run echo as non root.

* fix

* fix

* test
  • Loading branch information
bianpengyuan committed Mar 19, 2021
1 parent bff2198 commit 88a3d5b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/test/framework/components/echo/kube/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ spec:
- name: app
image: {{ $.Hub }}/app:{{ $.Tag }}
imagePullPolicy: {{ $.PullPolicy }}
securityContext:
runAsUser: 1338
runAsGroup: 1338
args:
- --metrics=15014
- --cluster
Expand Down
3 changes: 3 additions & 0 deletions pkg/test/framework/components/echo/kube/testdata/basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ spec:
- name: app
image: testing.hub/app:latest
imagePullPolicy: Always
securityContext:
runAsUser: 1338
runAsGroup: 1338
args:
- --metrics=15014
- --cluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
- name: app
image: testing.hub/app:latest
imagePullPolicy: Always
securityContext:
runAsUser: 1338
runAsGroup: 1338
args:
- --metrics=15014
- --cluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ spec:
- name: app
image: testing.hub/app:latest
imagePullPolicy: Always
securityContext:
runAsUser: 1338
runAsGroup: 1338
args:
- --metrics=15014
- --cluster
Expand Down Expand Up @@ -119,6 +122,9 @@ spec:
- name: app
image: testing.hub/app:latest
imagePullPolicy: Always
securityContext:
runAsUser: 1338
runAsGroup: 1338
args:
- --metrics=15014
- --cluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ spec:
- name: app
image: testing.hub/app:latest
imagePullPolicy: Always
securityContext:
runAsUser: 1338
runAsGroup: 1338
args:
- --metrics=15014
- --cluster
Expand Down Expand Up @@ -113,6 +116,9 @@ spec:
- name: app
image: testing.hub/app:latest
imagePullPolicy: Always
securityContext:
runAsUser: 1338
runAsGroup: 1338
args:
- --metrics=15014
- --cluster
Expand Down

0 comments on commit 88a3d5b

Please sign in to comment.