[bitnami/mariadb] Add initContainerSecurityContext parameter for primary initContainer #34373
+147
−107
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change
This change adds a new
primary.initContainerSecurityContext
parameter to the MariaDB chart, allowing separate security context configuration for thepreserve-logs-symlinks
initContainer. Previously, the initContainer shared the same security context as the main MariaDB container (primary.containerSecurityContext
), which caused deployment failures in environments with strict security policies.The change modifies:
values.yaml
: Adds the newinitContainerSecurityContext
parameter with full documentationtemplates/primary/statefulset.yaml
: Updates the initContainer to use the new security context parameterChart.yaml
: Bumps version from 20.5.8 to 20.5.9Benefits
azurepolicy-k8sazurev2selinux
)Possible drawbacks
No known limitations. This is a backward-compatible addition that:
containerSecurityContext
Applicable issues
This resolves deployment issues where Azure security policies deny pods with SELinux options, specifically addressing the error:
SELinux options is not allowed, pod: mariadb-xxx, container mariadb. Allowed options: []
Additional information
This change enables users to set
primary.initContainerSecurityContext.seLinuxOptions: null
to comply with Azure security policies while maintaining security settings for the main MariaDB container. The implementation follows the same pattern established in other Bitnami charts for handling initContainer-specific configurations.Checklist
Chart.yaml
according to semver. This is not necessary when the changes only affect README.md files.README.md
using readme-generator-for-helm