-
Notifications
You must be signed in to change notification settings - Fork 208
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
Avoid reconciling cluster-wide resources in odiglet #1355
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8a80e77
to
1d618a3
Compare
RonFed
reviewed
Jul 17, 2024
instrumentor/controllers/startlangdetection/workload_controllers.go
Outdated
Show resolved
Hide resolved
blumamir
reviewed
Jul 17, 2024
instrumentor/controllers/deleteinstrumentedapplication/common.go
Outdated
Show resolved
Hide resolved
instrumentor/controllers/startlangdetection/workload_controllers.go
Outdated
Show resolved
Hide resolved
instrumentor/controllers/startlangdetection/namespace_controller.go
Outdated
Show resolved
Hide resolved
f1ab300
to
254bd2b
Compare
RonFed
approved these changes
Jul 18, 2024
damemi
added a commit
that referenced
this pull request
Jan 31, 2025
OpenShift seems to enable [OwnerReferencesPermissionEnforcement](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#ownerreferencespermissionenforcement) by default, which gives errors like this when setting OwnerReferences: ``` 2025-01-29T19:42:38Z ERROR Reconciler error {"controller": "startlangdetection-source", "controllerGroup": "odigos.io", "controllerKind": "Source", "Source": {"name":"source-xsbv2","namespace":"test-project"}, "namespace": "test-project", "name": "source-xsbv2", "reconcileID": "c36405f6-40bb-4eb0-9d5d-fe4bc7802994", "error": "instrumentationconfigs.odigos.io \"deployment-inventory\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>"} ``` This basically means wherever we update an ownerreference with `BlockOwnerDeletion: true` (which is set by the controller-runtime helpers), we also need permission to update the finalizers for whatever we're making the owner. I found this in these places: * When the autoscaler creates a collector configmap, the owner of the ConfigMap is the CollectorsGroups. So we need to be able to update `collectorsgroups/finalizers` * When the Instrumentor creates an InstrumentationConfig, the owner of the InstrumentationConfig is the workload. So we need finalizers for deployments,statefulsets,and daemonsets * When the odiglet creates an InstrumentationInstance, the owner of the InstrumentationInstance is also the workload. Same as above This also adds the SELinux volume mount from #1131 to the Odiglet init container added in #1355, along with making the init container privileged and adding logging for when the SELinux commands aren't found (this was failing silently) This also updates the `--openshift` flag to automatically use the `*-ubi9` images. If no `--image-prefix` is set, the images will be pulled from `registry.connect.redhat.com/odigos`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.