phisco / crd-gates

Add feature gates to CRDs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 }}

About

Add feature gates to CRDs

License:Apache License 2.0


Languages

Language:Go 100.0%