Commit 0057599
authored
Non root controller image (#262)
Description of changes:
#### Before
* OpenShift enforces `nonRoot` security posture by running container images using random UID and does not allow specifying `runAsUser` field in deployment spec.
* Before this change, ACK generated artifacts enforced `nonRoot` security posture using `SecurityContext`'s `runAsUser` and `runAsNonRoot` field, while the container image ran as `root` by default
-----
#### Now
* With this change, ACK controller images now run by default with `non-root` User(1000)
* Removed `runAsUser` field from deployment templates. This change keeps the existing functionality because K8s pod inherit UserId from Image metadata and ACK controller still runs with non-root user(1000) [Tested and Validated]
> runAsUser: "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. " - Official Documentation
* Removing `runAsUser` unblock OpenShift installation and allows OpenShift to run container using random UserId
* Keeping `runAsNonRoot` field, keeps the validation in place that ACK controller does not run as `root`. This validation helps security posture for both OpenShift and helm/kustomize installation.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.1 parent b24c062 commit 0057599
File tree
4 files changed
+7
-2
lines changed- templates
- config/controller
- helm/templates
4 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| 63 | + | |
61 | 64 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
| |||
0 commit comments