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

Add appArmorProfile to securityContext #3037

Closed
wants to merge 1 commit into from

Conversation

jbmolle
Copy link

@jbmolle jbmolle commented Jun 12, 2024

Description: Add appArmorProfile in securityContext definitions so it is not removed by openteletry-operator

Link to tracking Issue(s): #3036

Testing: None

Documentation: None

@jbmolle jbmolle requested a review from a team as a code owner June 12, 2024 16:26
Copy link

linux-foundation-easycla bot commented Jun 12, 2024

CLA Not Signed

@swiatekm
Copy link
Contributor

swiatekm commented Jun 12, 2024

We use the SecurityContext definition from the Kubernetes API. From what I can see, appArmorProfile was added in Kubernetes 1.30, and we haven't yet upgraded to its API libraries. The reason is that they require Go 1.22, and we still support 1.21 as per #2757.

@jbmolle
Copy link
Author

jbmolle commented Jun 12, 2024

@swiatekm-sumo Thanks for the feedback, that's very helpful!
I've actually found the problem when I tried to update Cilium to version 1.15.5 which uses appArmorProfile instead of annotations.
The init containers from Cilium can't start because opentelemetry-operator modifies the pod yaml sent to kube-apiserver.
Is there a way to exclude the pod YAML from being mutated by the webhook? (With an annotation maybe?)

@swiatekm
Copy link
Contributor

I don't think there's a way to do that, unfortunately. It's not so much that the operator modifies the Pod, but rather deserializes the Pod data into a struct that doesn't have the appArmor field, so the field is effectively ignored and the operator isn't even aware it exists. Best you can do if you want to solve this in the short term, would be to fork the operator, update the API libraries, and build with Go 1.22.

@swiatekm
Copy link
Contributor

@jbmolle can we close this PR? #3036 was fixed by #3061.

@jbmolle
Copy link
Author

jbmolle commented Jun 24, 2024

Yes sure

@jbmolle jbmolle closed this Jun 24, 2024
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.

appArmorProfile is removed from SecurityContext
2 participants