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

fix(api): deprecate FlightRecorder and Recording CRDs #356

Merged
merged 4 commits into from
Mar 28, 2022

Conversation

ebaron
Copy link
Member

@ebaron ebaron commented Mar 25, 2022

The CRD spec has properties for whether a version is deprecated and a warning string to show the user when they try to use that version. Newer controller-tools versions support these properties using marker comments, but this requires Operator SDK 1.10 and we're still quite a bit behind that (see #287). In the meantime, I've added Kustomize patches to add these properties.

Example:

$ kubectl get recording
Warning: operator.cryostat.io/v1beta1 Recording is deprecated; please use the Cryostat web application or the Cryostat HTTP API to manage recordings
No resources found in cryostat-operator-system namespace.

I didn't see this have an effect in the UI, so I've added the operators.operatorframework.io/internal-objects annotation to our CSV. This results in the FlightRecorder and Recording APIs being hidden from the OpenShift Console's operator UI. The functionality remains available via command line or through the CustomResourceDefinitions page in the OpenShift Console.

Bundle for testing:

make deploy_bundle BUNDLE_IMG=quay.io/ebaron/cryostat-operator-bundle:deprecate-api-01

Fixes: #349

Copy link

@hareetd hareetd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well.

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

Successfully merging this pull request may close these issues.

Deprecate FlightRecorder/Recording APIs
4 participants