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 Feb 4, 2025
1 parent bdb2fb4 commit 0ec08d6
Show file tree
Hide file tree
Showing 28 changed files with 219 additions and 44 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"
17 changes: 12 additions & 5 deletions charts/kong/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## Unreleased

### Fixes

* 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.47.0

### Changes
Expand Down Expand Up @@ -346,27 +353,27 @@

## 2.26.5

### Fixed
### Fixed

* Kuma ServiceAccount Token hints and volumes are also available in migrations
Pods.
[#877](https://github.com/Kong/charts/pull/877)

## 2.26.4

### Fixed
### Fixed

* updated `admin_api_uri` to `admin_gui_api_url` as per [kong documentation](https://docs.konghq.com/gateway/3.4.x/reference/configuration/#admin_api_uri).
* updated `admin_api_uri` to `admin_gui_api_url` as per [kong documentation](https://docs.konghq.com/gateway/3.4.x/reference/configuration/#admin_api_uri).

## 2.26.3

### Fixed
### Fixed

* Enabled Service and Ingress in Kong Manager for non enterprise users.

## 2.26.2

### Fixed
### Fixed

* Add missing CRD KongConsumerGroup and extend status subresource for CRDs

Expand Down
4 changes: 2 additions & 2 deletions charts/kong/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -906,11 +906,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.trustCRDsExist | Do not check for the Prometheus Operator CRDs, just try to deploy | `false` |
Expand Down

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.

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

7 changes: 6 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.

7 changes: 6 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.

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.

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

7 changes: 6 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.

7 changes: 6 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.

Loading

0 comments on commit 0ec08d6

Please sign in to comment.