Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Helm chart psql to at least v12.1.13 #677

Closed
fty4 opened this issue Jul 28, 2023 · 1 comment · Fixed by #776
Closed

Update Helm chart psql to at least v12.1.13 #677

fty4 opened this issue Jul 28, 2023 · 1 comment · Fixed by #776
Assignees
Labels
enhancement New feature or request

Comments

@fty4
Copy link
Member

fty4 commented Jul 28, 2023

Describe the bug

Currently the Helm chart is using postgresql in version 12.1.6:

# PostgreSQL
- name: postgresql
alias: postgresql
version: 12.1.6
repository: https://charts.bitnami.com/bitnami
condition: install.postgresql

This version will fail to run the kyverno policy require-run-as-nonroot.yaml check.

Background here is that an empty initContainers: element will be created.
This is a bug from bitnami/postgresql Helm chart which was solved in bitnami/charts#14602.
With this bug kyverno will detect a problem when checking the chart (error message in code block below).

To Reproduce

Run kyverno with the mentioned policy and see error (executed through eclipse-tractusx/e2e-testing):

policy require-run-as-nonroot -> resource edc/StatefulSet/chart-consumer-postgresql failed: 
1. autogen-run-as-non-root: validation error: Running as root is not allowed. Either the field spec.securityContext.runAsNonRoot must be set to `true`, or the fields spec.containers[*].securityContext.runAsNonRoot, spec.initContainers[*].securityContext.runAsNonRoot, and spec.ephemeralContainers[*].securityContext.runAsNonRoot must be set to `true`. rule autogen-run-as-non-root[0] failed at path /spec/template/spec/initContainers/ rule autogen-run-as-non-root[1] failed at path /spec/template/spec/initContainers/ 

policy require-run-as-nonroot -> resource edc/StatefulSet/chart-provider-postgresql failed: 
1. autogen-run-as-non-root: validation error: Running as root is not allowed. Either the field spec.securityContext.runAsNonRoot must be set to `true`, or the fields spec.containers[*].securityContext.runAsNonRoot, spec.initContainers[*].securityContext.runAsNonRoot, and spec.ephemeralContainers[*].securityContext.runAsNonRoot must be set to `true`. rule autogen-run-as-non-root[0] failed at path /spec/template/spec/initContainers/ rule autogen-run-as-non-root[1] failed at path /spec/template/spec/initContainers/ 

Expected behavior

No nun-as-non-root error should occur.

Possible Implementation

To fix this problem only an update is required to at least bitnami/postgresql 12.1.13 - or latest version (currently 12.7.1).

If you want I can rase a PR for this.

@fty4 fty4 added the bug Something isn't working label Jul 28, 2023
@paullatzelsperger
Copy link
Contributor

from an EDC perspective, this is not a bug. I replaced the label.

@paullatzelsperger paullatzelsperger added enhancement New feature or request and removed bug Something isn't working labels Aug 1, 2023
@github-project-automation github-project-automation bot moved this to Open in EDC Board Aug 1, 2023
@tuncaytunc-zf tuncaytunc-zf self-assigned this Sep 13, 2023
@github-project-automation github-project-automation bot moved this from Open to Done in EDC Board Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants