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

Avoid injecting the owner for all cluster scoped resources based on 0.7.2 Manifestival #1509

Closed
houshengbo opened this issue Jul 28, 2023 · 0 comments · Fixed by #1510
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@houshengbo
Copy link
Contributor

0.7.2 Manifestival introduced the following error message.

{"severity":"ERROR","timestamp":"2023-07-28T16:55:17.698740051Z","logger":"knative-operator.manifestival","caller":"manifestival@v0.7.2/manifestival.go:165","message":"Failed to update merged resource, trying overwrite","commit":"c92298f-dirty","knative.dev/pod":"knative-operator-54f7867d59-qp95q","error":"ValidatingWebhookConfiguration.admissionregistration.k8s.io \"validation.inmemorychannel.eventing.knative.dev\" is invalid: metadata.ownerReferences: Invalid value: []v1.OwnerReference{v1.OwnerReference{APIVersion:\"operator.knative.dev/v1beta1\", Kind:\"KnativeEventing\", Name:\"knative-eventing\", UID:\"8db6724e-a45b-4e2c-9688-9d739db84021\", Controller:(*bool)(0x401946ce75), BlockOwnerDeletion:(*bool)(0x401946ce76)}, v1.OwnerReference{APIVersion:\"v1\", Kind:\"Namespace\", Name:\"eventing-test\", UID:\"e7badf16-0cc4-4638-b24f-5950827e9da5\", Controller:(*bool)(0x401946ce77), BlockOwnerDeletion:(*bool)(0x401946ce78)}}: Only one reference can have Controller set to true. Found \"true\" in references for KnativeEventing/knative-eventing and Namespace/eventing-test","stacktrace":"github.com/manifestival/manifestival.Manifest.update\n\tgithub.com/manifestival/manifestival@v0.7.2/manifestival.go:165\ngithub.com/manifestival/manifestival.Manifest.apply\n\tgithub.com/manifestival/manifestival@v0.7.2/manifestival.go:155\ngithub.com/manifestival/manifestival.Manifest.Apply\n\tgithub.com/manifestival/manifestival@v0.7.2/manifestival.go:100\nknative.dev/operator/pkg/reconciler/common.Install\n\tknative.dev/operator/pkg/reconciler/common/install.go:65\nknative.dev/operator/pkg/reconciler/manifests.Install\n\tknative.dev/operator/pkg/reconciler/manifests/install.go:33\nknative.dev/operator/pkg/reconciler/common.Stages.Execute\n\tknative.dev/operator/pkg/reconciler/common/stages.go:36\nknative.dev/operator/pkg/reconciler/knativeeventing.(*Reconciler).ReconcileKind\n\tknative.dev/operator/pkg/reconciler/knativeeventing/knativeeventing.go:128\nknative.dev/operator/pkg/client/injection/reconciler/operator/v1beta1/knativeeventing.(*reconcilerImpl).Reconcile\n\tknative.dev/operator/pkg/client/injection/reconciler/operator/v1beta1/knativeeventing/reconciler.go:236\nknative.dev/pkg/controller.(*Impl).processNextWorkItem\n\tknative.dev/pkg@v0.0.0-20230727013143-aa56e29007bb/controller/controller.go:542\nknative.dev/pkg/controller.(*Impl).RunContext.func3\n\tknative.dev/pkg@v0.0.0-20230727013143-aa56e29007bb/controller/controller.go:491"}

We need the lib Manifestival 0.7.2 to resolve the issue of nil pointer when deleting a non-existent resources, but we need to add a logic to validate whether it is a cluster scoped resource before injecting the owner.

@houshengbo houshengbo added the kind/bug Categorizes issue or PR as related to a bug. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant