Skip to content

DEVOPS-2692-lightrun-k-8-s-operator-set-read-only-filesystem-for-init-container #44

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions internal/controller/patch_funcs.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add to the docs that this version of operator does not support init containers older than version ??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its tricky because I don't know the operator version (it depends when it will be merged) but I can manually add warning to the release when it will release (similar to what we did in release https://github.com/lightrun-platform/lightrun-k8s-operator/releases/tag/0.3.0)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed when this change will be merge only LR versions >= 1.57.0

Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ func (r *LightrunJavaAgentReconciler) addInitContainer(deploymentApplyConfig *ap
).
WithAllowPrivilegeEscalation(false).
WithRunAsNonRoot(true).
WithReadOnlyRootFilesystem(true).
WithSeccompProfile(
corev1ac.SeccompProfile().
WithType(corev1.SeccompProfileTypeRuntimeDefault),
Expand Down Expand Up @@ -316,6 +317,7 @@ func (r *LightrunJavaAgentReconciler) addInitContainerToStatefulSet(statefulSetA
).
WithAllowPrivilegeEscalation(false).
WithRunAsNonRoot(true).
WithReadOnlyRootFilesystem(true).
WithSeccompProfile(
corev1ac.SeccompProfile().
WithType(corev1.SeccompProfileTypeRuntimeDefault),
Expand Down
Loading