/crd-gates

Add feature gates to CRDs

Primary LanguageGoApache License 2.0Apache-2.0

crd-gates

Add feature gates to CRDs

$ crd-gates crd.yaml

It outputs the processed CRD manifest to stdout.

It does the following transformation of schemas:

properties:
  foo:
    description: [[GATE:FeatureGateName]] THIS IS AN ALPHA FIELD. This is a foo field.

to

properties:
  # {{- if .FeatureGateName }}
  foo:
    description: THIS IS AN ALPHA FIELD. This is a foo field.
  # {{- end }}