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

controller/security: properly add strictSecurity to initContainers #1141

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

f41gh7
Copy link
Collaborator

@f41gh7 f41gh7 commented Nov 1, 2024

Previously strictSecurity was added to the operator defined initContainer only if there is user-defined initContainers. This logic is incorrect.

Operator must apply strict security configuration only to the containers created on its own.
All security related settings for side-car and initContainers must be managed by operator's users.

This commit fixes incorrect logic and properly apply strict security params to the init containers.
Affected CRDs - VMAgent, VMAuth and VMAlertmanager.

Added tests to verify this logic.

Related issue:
#1134

Previously strictSecurity was added to the operator defined initContainer only
if there is user-defined initContainers. This logic is incorrect.

 Operator must apply strict security configuration only to the containers created on its own.
All security related settings for side-car and initContainers must be managed by operator's users.

 This commit fixes incorrect logic and properly apply strict security params to the init containers.
Affected CRDs - VMAgent, VMAuth and VMAlertmanager.

 Added tests to verify this logic.

Related issue:
#1134

Signed-off-by: f41gh7 <[email protected]>
@f41gh7 f41gh7 merged commit a67a936 into master Nov 1, 2024
3 checks passed
@f41gh7 f41gh7 deleted the gh-1134 branch November 1, 2024 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants