Skip to content

Commit

Permalink
Backport of NET-5186 Add NET_BIND_SERVICE capability to Consul's rest…
Browse files Browse the repository at this point in the history
…ricted securityContext into release/1.1.x (#2838)

NET-5186 Add NET_BIND_SERVICE capability to Consul's restricted securityContext (#2787)

* Add NET_BIND_SERVICE capability to Consul's restricted securityContext

* Add changelog entry

* Update related bats tests

* Change type of release note

Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>
  • Loading branch information
1 parent d0c40c5 commit 9aaa391
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/2787.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
Add NET_BIND_SERVICE capability to restricted security context used for consul-dataplane
```
2 changes: 2 additions & 0 deletions charts/consul/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ securityContext:
capabilities:
drop:
- ALL
add:
- NET_BIND_SERVICE
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
Expand Down
6 changes: 4 additions & 2 deletions charts/consul/test/unit/server-statefulset.bats
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,8 @@ load _helpers
local expected=$(echo '{
"allowPrivilegeEscalation": false,
"capabilities": {
"drop": ["ALL"]
"drop": ["ALL"],
"add": ["NET_BIND_SERVICE"]
},
"runAsNonRoot": true,
"seccompProfile": {
Expand Down Expand Up @@ -898,7 +899,8 @@ load _helpers
local expected=$(echo '{
"allowPrivilegeEscalation": false,
"capabilities": {
"drop": ["ALL"]
"drop": ["ALL"],
"add": ["NET_BIND_SERVICE"]
},
"runAsNonRoot": true,
"seccompProfile": {
Expand Down

0 comments on commit 9aaa391

Please sign in to comment.