Skip to content

Commit

Permalink
fix(deploy) increase container security
Browse files Browse the repository at this point in the history
Change default values to run containers with read-only file system and
non-root user for both kong and postgres deployments.

Signed-off-by: Gerald Pape <[email protected]>
  • Loading branch information
ubergesundheit committed Apr 17, 2024
1 parent b4a9c8d commit e1d76e4
Show file tree
Hide file tree
Showing 21 changed files with 298 additions and 37 deletions.
4 changes: 0 additions & 4 deletions .kube-linter.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
checks:
exclude:
# TODO: exclude no rule
# https://github.com/Kong/charts/issues/753
- "no-read-only-root-fs"
- "run-as-non-root"
- "unset-cpu-requirements"
- "unset-memory-requirements"
2 changes: 2 additions & 0 deletions charts/kong/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
for use when the external Service and container listens should differ, such
as when terminating TLS at a LoadBalancer.
[#1021](https://github.com/Kong/charts/pull/1021)
* Run containers with read-only file system and non-root user to increase container and pod security.
[#1057](https://github.com/Kong/charts/pull/1057)

## 2.38.0

Expand Down
4 changes: 2 additions & 2 deletions charts/kong/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -898,11 +898,11 @@ On the Gateway release side, set either `admin.tls.client.secretName` to the nam
| podDisruptionBudget.minAvailable | Represents the number of Pods that must be available (integer or percentage) | |
| podSecurityPolicy.enabled | Enable podSecurityPolicy for Kong | `false` |
| podSecurityPolicy.labels | Labels to add to podSecurityPolicy for Kong | `{}` |
| podSecurityPolicy.annotations | Annotations to add to podSecurityPolicy for Kong | `{}` |
| podSecurityPolicy.annotations | Annotations to add to podSecurityPolicy for Kong | `{ "seccomp.security.alpha.kubernetes.io/allowedProfileNames": "runtime/default" }` |
| podSecurityPolicy.spec | Collection of [PodSecurityPolicy settings](https://kubernetes.io/docs/concepts/policy/pod-security-policy/#what-is-a-pod-security-policy) | |
| priorityClassName | Set pod scheduling priority class for Kong pods | `""` |
| secretVolumes | Mount given secrets as a volume in Kong container to override default certs and keys. | `[]` |
| securityContext | Set the securityContext for Kong Pods | `{}` |
| securityContext | Set the securityContext for Kong Pods | See values.yaml |
| containerSecurityContext | Set the securityContext for Containers | See values.yaml |
| serviceMonitor.enabled | Create ServiceMonitor for Prometheus Operator | `false` |
| serviceMonitor.interval | Scraping interval | `30s` |
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion charts/kong/ci/__snapshots__/custom-labels-values.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion charts/kong/ci/__snapshots__/default-values.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion charts/kong/ci/__snapshots__/kong-ingress-1-values.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion charts/kong/ci/__snapshots__/kong-ingress-2-values.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion charts/kong/ci/__snapshots__/kong-ingress-3-values.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion charts/kong/ci/__snapshots__/kong-ingress-4-values.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion charts/kong/ci/__snapshots__/proxy-appprotocol-values.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion charts/kong/ci/__snapshots__/service-account.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e1d76e4

Please sign in to comment.