Skip to content

Commit

Permalink
Merge pull request grafana/phlare#444 from glindstedt/patch-1
Browse files Browse the repository at this point in the history
Stricter default for `podSecurityContext`
  • Loading branch information
simonswine authored Dec 7, 2022
2 parents 9e9fb1a + 8ddc908 commit 0e23d94
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions operations/phlare/helm/phlare/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
| phlare.podAnnotations."phlare.grafana.com/port" | string | `"4100"` | |
| phlare.podAnnotations."phlare.grafana.com/scrape" | string | `"true"` | |
| phlare.podSecurityContext.fsGroup | int | `10001` | |
| phlare.podSecurityContext.runAsNonRoot | bool | `true` | |
| phlare.podSecurityContext.runAsUser | int | `10001` | |
| phlare.replicaCount | int | `1` | |
| phlare.resources | object | `{}` | |
| phlare.securityContext | object | `{}` | |
Expand Down
8 changes: 8 additions & 0 deletions operations/phlare/helm/phlare/rendered/micro-services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,8 @@ spec:
serviceAccountName: phlare-dev
securityContext:
fsGroup: 10001
runAsNonRoot: true
runAsUser: 10001
containers:
- name: "agent"
securityContext:
Expand Down Expand Up @@ -775,6 +777,8 @@ spec:
serviceAccountName: phlare-dev
securityContext:
fsGroup: 10001
runAsNonRoot: true
runAsUser: 10001
containers:
- name: "distributor"
securityContext:
Expand Down Expand Up @@ -851,6 +855,8 @@ spec:
serviceAccountName: phlare-dev
securityContext:
fsGroup: 10001
runAsNonRoot: true
runAsUser: 10001
containers:
- name: "querier"
securityContext:
Expand Down Expand Up @@ -1024,6 +1030,8 @@ spec:
serviceAccountName: phlare-dev
securityContext:
fsGroup: 10001
runAsNonRoot: true
runAsUser: 10001
containers:
- name: "ingester"
securityContext:
Expand Down
2 changes: 2 additions & 0 deletions operations/phlare/helm/phlare/rendered/single-binary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ spec:
serviceAccountName: phlare-dev
securityContext:
fsGroup: 10001
runAsNonRoot: true
runAsUser: 10001
containers:
- name: "phlare"
securityContext:
Expand Down
2 changes: 2 additions & 0 deletions operations/phlare/helm/phlare/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ phlare:

podSecurityContext:
fsGroup: 10001
runAsUser: 10001
runAsNonRoot: true

securityContext:
{}
Expand Down
4 changes: 3 additions & 1 deletion operations/phlare/jsonnet/values.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@
"phlare.grafana.com/scrape": "true"
},
"podSecurityContext": {
"fsGroup": 10001
"fsGroup": 10001,
"runAsNonRoot": true,
"runAsUser": 10001
},
"replicaCount": 1,
"resources": {},
Expand Down

0 comments on commit 0e23d94

Please sign in to comment.