-
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
Updates for OpenShift compatibility #2348
Conversation
The owners of instrumentation instances are pods, not workloads. Does setting the finalizers on the workload happen today for setups that are not OpenShift? |
@RonFed I don't think this admission enforcement is on by default in most clusters. We don't even necessarily have to set the finalizers to trigger this, it's that we are trying to set ownerreferences with BlockDeletion. Source shouldn't be the ownerreference for the instrumentationconfig, because Sources can persist beyond a workload existing. InstrumentationConfig should be deleted when the workload is deleted Updated to use Pods instead of workloads for odiglet |
cc72bc8
to
b45fbba
Compare
b45fbba
to
2800f74
Compare
ce3a1c8
to
cf9296c
Compare
cf9296c
to
cb97ce2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a difficult task, great work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm,
left a few small comments.
Also, worth making sure that this change won't break users that use the image prefix
option - it looks to me like it won't but just making sure.
In the CLI we are using the same GetImageName
and in the helm there is the new util function which looks to preserve the current behavior.
@@ -4,6 +4,8 @@ import ( | |||
"k8s.io/apimachinery/pkg/util/version" | |||
) | |||
|
|||
const RedHatImagePrefix = "registry.connect.redhat.com/odigos" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this looks specific to the CLI, maybe we should move this constant there,
edit: I see that a lot of the consts here are used only in the CLI, so I guess we can keep it here for consistency
OpenShift seems to enable OwnerReferencesPermissionEnforcement by default, which gives errors like this when setting OwnerReferences:
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:
collectorsgroups/finalizers
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 fromregistry.connect.redhat.com/odigos
.