kopium
kopium copied to clipboard
allow hiding status object
Sometimes when writing auxiliary tools/controllers for existing crds, we are sometimes only necessary to generate the spec
object for a type. In these cases it would be OK to omit the status objects of the resources.
We should add a --hide-status
flag that hides the status object and everything only used by the status object.
This can be done by pruning the schema yaml under:
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
spec:
versions:
- name: v1beta1
schema:
openAPIV3Schema:
properties:
status: <- remove this key for every spec.versions
before running the analyzer.
Leaving this here as a help wanted for now. It might be an interesting place to play around with the schema. We haven't done this type of short-circuiting before, so it might need its own file.