Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Incorrect Kind in ownerRef #98

Open
vpavlin opened this issue Oct 1, 2019 · 3 comments
Open

Incorrect Kind in ownerRef #98

vpavlin opened this issue Oct 1, 2019 · 3 comments

Comments

@vpavlin
Copy link

vpavlin commented Oct 1, 2019

I am trying to run Airflow Operator on OpenShift 4 and I am hitting an interesting issue:

ERROR: logging before flag.Parse: E0930 15:45:08.736404       1 genericreconciler.go:52] Failed: [*v1alpha1.AirflowBase/airflowop-system/pc-base(cmpnt:*airflowbase.Postgres)] Create. statefulsets.apps "pc-base-postgres" is forbidden: cannot set blockOwnerDeletion in this case because cannot find RESTMapping for APIVersion airflow.k8s.io/v1alpha1 Kind *v1alpha1.AirflowBase: no matches for kind "*v1alpha1.AirflowBase" in version "airflow.k8s.io/v1alpha1"

I traced the source of this to https://github.com/GoogleCloudPlatform/airflow-operator/blob/master/vendor/sigs.k8s.io/controller-reconciler/pkg/genericreconciler/genericreconciler.go#L219 - i.e. the Kind gets set to actual type (*v1alpha1.AirflowBase) instead of just AirflowBase

I also noticed this function https://github.com/GoogleCloudPlatform/airflow-operator/blob/master/pkg/apis/airflow/v1alpha1/airflowbase_types.go#L513 which looks like that is what we actually want to be used, but it never enters that function during execution.

It also seems the controller-reconciler project is gone.

I was able to workaround the issue by turning of the blockOwnerDeletion but I don't like that at all:) It unblocked me for experimenting more with Airflow, but I would like to find a real solution.

Any thoughts on how to solve this?

@barney-s
Copy link
Contributor

controller-reconciler is a manually vendored project. We are trying to fix that. For now copy that from master into your vendor directory.

@barney-s
Copy link
Contributor

Would you ensure that the CRDs are installed ?
do a kubectl get crd and see if AirflowBase and AirflowCluster are available.

@vpavlin
Copy link
Author

vpavlin commented Oct 10, 2019

Would you ensure that the CRDs are installed ?

Yes, as I mentioned, I found a workaround with disabling blockOwnerDeletion and at that point everything got deployed. But it is still broken in a sense that artifacts wouldn't get deleted when I delete the operator

controller-reconciler is a manually vendored project. We are trying to fix that. For now copy that from master into your vendor directory.

The problem with controller-reconciler is that it sets the Kind incorrect - see the link that I shared

I am happy to send a PR, but I am not sure what is the good way to fix this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants