-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
OwnerReferences cannot be set to a custom resource #22958
Comments
@childsb can you help us get some attention to this by the right people? :-) |
Objects can be owned by a CR, whole OpenShift depends on that. For example, on a random 4.2-ish cluster:
So DaemonSet is owned by There is no magic involved, it should work out of the box.
Hmm, do you use correct |
Aha, thanks for the pointer! We are missing the full |
@travisn so what is the fix for this issue? Do we need to change the apiVersion in cluster.yaml ? Current content apiVersion: ceph.rook.io/v1 |
@nehaberry A fix was needed for the rook operator to generate the correct apiVersion. If you see |
for the record, we have the same issue on openshift 4.1, but not on 4.2 on 4.1 we see from our operator {"level":"info","ts":1581301783.7108648,"logger":"controller_redisenterprisecluster","msg":"Failed to create service account: serviceaccounts "test" is forbidden: cannot set blockOwnerDeletion in this case because cannot find RESTMapping for APIVersion app.redislabs.com/v1alpha1 Kind RedisEnterpriseCluster: no matches for kind "RedisEnterpriseCluster" in version "app.redislabs.com/v1alpha1""} |
Description of the issue
OwnerReferences cannot be set to a CR as seen as recently in rook/rook#2944. The fix referenced in #18784 merged several versions ago, but it still is not working. What else is necessary in order for an operator to set the ownerReferences to a CR? Is there an example of this working somewhere?
This error is returned when Rook attempts to set the ownerReferences to the CR:
Setting these ownerReferences works fine on upstream K8s. This only affects OpenShift.
Version
[provide output of the
openshift version
oroc version
command]Steps To Reproduce
Current Result
Look at the Rook operator log:
CephCluster is a CRD defined for Rook, and the operator needs to set the owner reference to this CR.
Expected Result
The operator should succeed setting the ownerReference to a CR.
Additional Information
[try to run
$ oc adm diagnostics
(oroadm diagnostics
) command if possible][if you are reporting issue related to builds, provide build logs with
BUILD_LOGLEVEL=5
][consider attaching output of the
$ oc get all -o json -n <namespace>
command to the issue][visit https://docs.openshift.org/latest/welcome/index.html]
The text was updated successfully, but these errors were encountered: