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

chore(api): remove ClusterCryostat CRD #737

Merged
merged 4 commits into from
Feb 20, 2024

Conversation

ebaron
Copy link
Member

@ebaron ebaron commented Feb 16, 2024

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits: git commit -S -m "YOUR_COMMIT_MESSAGE"

Fixes: #732

Description of the change:

  • This removes all versions of the ClusterCryostat CRD and any controller code was associated with it.
  • The tests for conflicting Cryostat and ClusterCryostat CRs have been reworked to test scenarios where two Cryostat CRs may be using the same namespace. In all cases, there should be no conflicts anymore.
  • Added tests for the RoleBinding finalizer logic that was previously missed.
  • Merged the multi-namespace.md doc into config.md

Motivation for the change:

  • The Cryostat CRD is now capable of handling multi-namespace Cryostat instances. The ClusterCryostat CRD no longer serves a purpose and adds unnecessary maintenance and testing burden.

How to manually test:

  1. Build/deploy a bundle, you should no longer see any ClusterCryostat options and everything else should work as before.

@ebaron ebaron added chore Refactor, rename, cleanup, etc. breaking change This change (potentially) breaks API compatibility and requires corresponding changes elsewhere labels Feb 16, 2024
@ebaron ebaron requested review from a team February 16, 2024 21:16
@ebaron ebaron linked an issue Feb 16, 2024 that may be closed by this pull request
@ebaron
Copy link
Member Author

ebaron commented Feb 16, 2024

/build_test

@mergify mergify bot added the safe-to-test label Feb 16, 2024
@ebaron
Copy link
Member Author

ebaron commented Feb 16, 2024

@andrewazores
Copy link
Member

I may have just done something wrong, but creating a Cryostat CR fails for me:

image

Danger alert:Error
Fix the following errors:

    Error "failed calling webhook "mcryostat.kb.io": failed to call webhook: Post "https://cryostat-operator-controller-manager-service.clustercryostat.svc:443/mutate-operator-cryostat-io-v1beta2-cryostat?timeout=10s": dial tcp 10.217.0.72:9443: connect: connection refused" for field "undefined".

I built with:

$ make generate manifests manager oci-build bundle bundle-build

then re-tagged and pushed quay.io/andrewazores/cryostat-operator-bundle:2.5.0-remove-clustercryostat-1 and quay.io/andrewazores/cryostat-operator:2.5.0-remove-clustercryostat-1, and finally oc new-project clustercryostat ; BUNDLE_IMG=quay.io/andrewazores/cryostat-operator-bundle:2.5.0-remove-clustercryostat-1 make deploy_bundle.

@ebaron
Copy link
Member Author

ebaron commented Feb 20, 2024

I may have just done something wrong, but creating a Cryostat CR fails for me:

image

Danger alert:Error
Fix the following errors:

    Error "failed calling webhook "mcryostat.kb.io": failed to call webhook: Post "https://cryostat-operator-controller-manager-service.clustercryostat.svc:443/mutate-operator-cryostat-io-v1beta2-cryostat?timeout=10s": dial tcp 10.217.0.72:9443: connect: connection refused" for field "undefined".

I built with:

$ make generate manifests manager oci-build bundle bundle-build

then re-tagged and pushed quay.io/andrewazores/cryostat-operator-bundle:2.5.0-remove-clustercryostat-1 and quay.io/andrewazores/cryostat-operator:2.5.0-remove-clustercryostat-1, and finally oc new-project clustercryostat ; BUNDLE_IMG=quay.io/andrewazores/cryostat-operator-bundle:2.5.0-remove-clustercryostat-1 make deploy_bundle.

Oh interesting. I'll see if I can reproduce this. Thanks for the heads up

@andrewazores
Copy link
Member

$ oc logs -f pod/cryostat-operator-controller-manager-bf855f7fb-hbpj9
2024-02-20T15:15:56Z	INFO	setup	detected OpenShift environment
2024-02-20T15:15:56Z	INFO	setup	found cert-manager installation
2024-02-20T15:15:56Z	INFO	setup	starting manager	{"version": "2.5.0-dev"}
2024-02-20T15:15:56Z	INFO	Starting server	{"kind": "health probe", "addr": "[::]:8081"}
I0220 15:15:56.311316       1 leaderelection.go:248] attempting to acquire leader lease clustercryostat/d696d7ab.redhat.com...
I0220 15:16:13.534113       1 leaderelection.go:258] successfully acquired lease clustercryostat/d696d7ab.redhat.com
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "clustercryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "ClusterCryostat", "source": "kind source: *v1beta1.ClusterCryostat"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "cryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "Cryostat", "source": "kind source: *v1beta1.Cryostat"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "cryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "Cryostat", "source": "kind source: *v1.Deployment"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "cryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "Cryostat", "source": "kind source: *v1.Service"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "cryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "Cryostat", "source": "kind source: *v1.Secret"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "cryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "Cryostat", "source": "kind source: *v1.PersistentVolumeClaim"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "cryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "Cryostat", "source": "kind source: *v1.ServiceAccount"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "cryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "Cryostat", "source": "kind source: *v1.Role"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "cryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "Cryostat", "source": "kind source: *v1.RoleBinding"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "cryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "Cryostat", "source": "kind source: *v1.Ingress"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "cryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "Cryostat", "source": "kind source: *v1.Route"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "cryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "Cryostat", "source": "kind source: *v1.Issuer"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "cryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "Cryostat", "source": "kind source: *v1.Certificate"}
2024-02-20T15:16:13Z	INFO	Starting Controller	{"controller": "cryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "Cryostat"}
2024-02-20T15:16:13Z	DEBUG	events	cryostat-operator-controller-manager-bf855f7fb-hbpj9_704a2d6f-6007-4801-bbe2-6e62506e5ba5 became leader	{"type": "Normal", "object": {"kind":"Lease","namespace":"clustercryostat","name":"d696d7ab.redhat.com","uid":"2bf4b03a-92cc-4517-851f-1609e91c8147","apiVersion":"coordination.k8s.io/v1","resourceVersion":"1601305"}, "reason": "LeaderElection"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "clustercryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "ClusterCryostat", "source": "kind source: *v1.Deployment"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "clustercryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "ClusterCryostat", "source": "kind source: *v1.Service"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "clustercryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "ClusterCryostat", "source": "kind source: *v1.Secret"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "clustercryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "ClusterCryostat", "source": "kind source: *v1.PersistentVolumeClaim"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "clustercryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "ClusterCryostat", "source": "kind source: *v1.ServiceAccount"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "clustercryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "ClusterCryostat", "source": "kind source: *v1.Role"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "clustercryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "ClusterCryostat", "source": "kind source: *v1.RoleBinding"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "clustercryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "ClusterCryostat", "source": "kind source: *v1.Ingress"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "clustercryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "ClusterCryostat", "source": "kind source: *v1.Route"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "clustercryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "ClusterCryostat", "source": "kind source: *v1.Issuer"}
2024-02-20T15:16:13Z	INFO	Starting EventSource	{"controller": "clustercryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "ClusterCryostat", "source": "kind source: *v1.Certificate"}
2024-02-20T15:16:13Z	INFO	Starting Controller	{"controller": "clustercryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "ClusterCryostat"}
2024-02-20T15:16:13Z	ERROR	controller-runtime.source	if kind is a CRD, it should be installed before calling Start	{"kind": "ClusterCryostat.operator.cryostat.io", "error": "no matches for kind \"ClusterCryostat\" in version \"operator.cryostat.io/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:143
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:235
k8s.io/apimachinery/pkg/util/wait.poll
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:582
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:547
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:136
2024-02-20T15:16:13Z	INFO	Starting workers	{"controller": "cryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "Cryostat", "worker count": 1}
2024-02-20T15:16:23Z	ERROR	controller-runtime.source	if kind is a CRD, it should be installed before calling Start	{"kind": "ClusterCryostat.operator.cryostat.io", "error": "no matches for kind \"ClusterCryostat\" in version \"operator.cryostat.io/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:143
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:235
k8s.io/apimachinery/pkg/util/wait.WaitForWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:662
k8s.io/apimachinery/pkg/util/wait.poll
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:596
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:547
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:136
2024-02-20T15:16:33Z	ERROR	controller-runtime.source	if kind is a CRD, it should be installed before calling Start	{"kind": "ClusterCryostat.operator.cryostat.io", "error": "no matches for kind \"ClusterCryostat\" in version \"operator.cryostat.io/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:143
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:235
k8s.io/apimachinery/pkg/util/wait.WaitForWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:662
k8s.io/apimachinery/pkg/util/wait.poll
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:596
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:547
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:136
2024-02-20T15:16:43Z	ERROR	controller-runtime.source	if kind is a CRD, it should be installed before calling Start	{"kind": "ClusterCryostat.operator.cryostat.io", "error": "no matches for kind \"ClusterCryostat\" in version \"operator.cryostat.io/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:143
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:235
k8s.io/apimachinery/pkg/util/wait.WaitForWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:662
k8s.io/apimachinery/pkg/util/wait.poll
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:596
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:547
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:136
2024-02-20T15:16:53Z	ERROR	controller-runtime.source	if kind is a CRD, it should be installed before calling Start	{"kind": "ClusterCryostat.operator.cryostat.io", "error": "no matches for kind \"ClusterCryostat\" in version \"operator.cryostat.io/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:143
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:235
k8s.io/apimachinery/pkg/util/wait.WaitForWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:662
k8s.io/apimachinery/pkg/util/wait.poll
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:596
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:547
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:136
2024-02-20T15:17:03Z	ERROR	controller-runtime.source	if kind is a CRD, it should be installed before calling Start	{"kind": "ClusterCryostat.operator.cryostat.io", "error": "no matches for kind \"ClusterCryostat\" in version \"operator.cryostat.io/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:143
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:235
k8s.io/apimachinery/pkg/util/wait.WaitForWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:662
k8s.io/apimachinery/pkg/util/wait.poll
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:596
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:547
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:136
2024-02-20T15:17:13Z	ERROR	controller-runtime.source	if kind is a CRD, it should be installed before calling Start	{"kind": "ClusterCryostat.operator.cryostat.io", "error": "no matches for kind \"ClusterCryostat\" in version \"operator.cryostat.io/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:143
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:235
k8s.io/apimachinery/pkg/util/wait.WaitForWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:662
k8s.io/apimachinery/pkg/util/wait.poll
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:596
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:547
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:136
2024-02-20T15:17:23Z	ERROR	controller-runtime.source	if kind is a CRD, it should be installed before calling Start	{"kind": "ClusterCryostat.operator.cryostat.io", "error": "no matches for kind \"ClusterCryostat\" in version \"operator.cryostat.io/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:143
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:235
k8s.io/apimachinery/pkg/util/wait.WaitForWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:662
k8s.io/apimachinery/pkg/util/wait.poll
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:596
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:547
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:136
2024-02-20T15:17:33Z	ERROR	controller-runtime.source	if kind is a CRD, it should be installed before calling Start	{"kind": "ClusterCryostat.operator.cryostat.io", "error": "no matches for kind \"ClusterCryostat\" in version \"operator.cryostat.io/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:143
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:235
k8s.io/apimachinery/pkg/util/wait.WaitForWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:662
k8s.io/apimachinery/pkg/util/wait.poll
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:596
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:547
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:136
2024-02-20T15:17:43Z	ERROR	controller-runtime.source	if kind is a CRD, it should be installed before calling Start	{"kind": "ClusterCryostat.operator.cryostat.io", "error": "no matches for kind \"ClusterCryostat\" in version \"operator.cryostat.io/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:143
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:235
k8s.io/apimachinery/pkg/util/wait.WaitForWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:662
k8s.io/apimachinery/pkg/util/wait.poll
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:596
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:547
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:136
2024-02-20T15:17:53Z	ERROR	controller-runtime.source	if kind is a CRD, it should be installed before calling Start	{"kind": "ClusterCryostat.operator.cryostat.io", "error": "no matches for kind \"ClusterCryostat\" in version \"operator.cryostat.io/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:143
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:235
k8s.io/apimachinery/pkg/util/wait.WaitForWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:662
k8s.io/apimachinery/pkg/util/wait.poll
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:596
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:547
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:136
2024-02-20T15:18:03Z	ERROR	controller-runtime.source	if kind is a CRD, it should be installed before calling Start	{"kind": "ClusterCryostat.operator.cryostat.io", "error": "no matches for kind \"ClusterCryostat\" in version \"operator.cryostat.io/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:143
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:235
k8s.io/apimachinery/pkg/util/wait.WaitForWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:662
k8s.io/apimachinery/pkg/util/wait.poll
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:596
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
	/go/pkg/mod/k8s.io/apimachinery@v0.26.10/pkg/util/wait/wait.go:547
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/source/source.go:136
2024-02-20T15:18:13Z	ERROR	Could not wait for Cache to sync	{"controller": "clustercryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "ClusterCryostat", "error": "failed to wait for clustercryostat caches to sync: timed out waiting for cache to be synced"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/internal/controller/controller.go:211
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/internal/controller/controller.go:216
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/internal/controller/controller.go:242
sigs.k8s.io/controller-runtime/pkg/manager.(*runnableGroup).reconcile.func1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/manager/runnable_group.go:219
2024-02-20T15:18:13Z	INFO	Stopping and waiting for non leader election runnables
2024-02-20T15:18:13Z	INFO	Stopping and waiting for leader election runnables
2024-02-20T15:18:13Z	INFO	Shutdown signal received, waiting for all workers to finish	{"controller": "cryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "Cryostat"}
2024-02-20T15:18:13Z	INFO	All workers finished	{"controller": "cryostat", "controllerGroup": "operator.cryostat.io", "controllerKind": "Cryostat"}
2024-02-20T15:18:13Z	INFO	Stopping and waiting for caches
2024-02-20T15:18:13Z	INFO	Stopping and waiting for webhooks
2024-02-20T15:18:13Z	INFO	Wait completed, proceeding to shutdown the manager
2024-02-20T15:18:13Z	ERROR	setup	problem running manager	{"error": "failed to wait for clustercryostat caches to sync: timed out waiting for cache to be synced"}
main.main
	/workspace/internal/main.go:193
runtime.main
	/usr/local/go/src/runtime/proc.go:250
2024-02-20T15:18:13Z	ERROR	error received after stop sequence was engaged	{"error": "leader election lost"}
sigs.k8s.io/controller-runtime/pkg/manager.(*controllerManager).engageStopProcedure.func1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.7/pkg/manager/internal.go:555

@ebaron
Copy link
Member Author

ebaron commented Feb 20, 2024

I think what's happened is that your bundle image is using the latest CI operator image. The logs indicate that it's still trying to load a ClusterCryostat controller, which this PR has removed.

Trying building with make generate manifests manager oci-build bundle bundle-build OPERATOR_IMG=quay.io/andrewazores/cryostat-operator:2.5.0-remove-clustercryostat-2 BUNDLE_IMG=quay.io/andrewazores/cryostat-operator-bundle:2.5.0-remove-clustercryostat-2

@ebaron ebaron merged commit a8ae2c6 into cryostatio:cryostat3 Feb 20, 2024
7 checks passed
andrewazores pushed a commit that referenced this pull request Feb 22, 2024
* chore(api): remove ClusterCryostat CRD

* Update config.md

* Delete docs/multi-namespace.md

* Add RoleBinding finalizer tests
mwangggg pushed a commit to mwangggg/cryostat-operator that referenced this pull request Feb 29, 2024
* chore(api): remove ClusterCryostat CRD

* Update config.md

* Delete docs/multi-namespace.md

* Add RoleBinding finalizer tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This change (potentially) breaks API compatibility and requires corresponding changes elsewhere chore Refactor, rename, cleanup, etc. safe-to-test
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Story] Remove ClusterCryostat CRD
2 participants