Documentation
¶
Index ¶
- Variables
- func AssertMajorVersion(specVersion *apiextensionsv1.CustomResourceDefinitionVersion, kind string, ...) error
- func Decode(content []byte) (*apiextensionsv1.CustomResourceDefinition, error)
- func Parse(scanner *bufio.Scanner) (*apiextensionsv1.CustomResourceDefinition, error)
- func SelectVersion(spec *apiextensionsv1.CustomResourceDefinitionSpec, version string) *apiextensionsv1.CustomResourceDefinitionVersion
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoCRD failure when the YAML is not a CRD ErrNoCRD = errors.New("not a CRD") )
Functions ¶
func AssertMajorVersion ¶
func AssertMajorVersion(specVersion *apiextensionsv1.CustomResourceDefinitionVersion, kind string, majorVersion string) error
AssertMajorVersion checks the given SDK majorVersion exists for the given Kubernetes kind and CRD version
func Decode ¶
func Decode(content []byte) (*apiextensionsv1.CustomResourceDefinition, error)
Decode reads raw content as bytes and tries to convertdecode as a CRD schema, or will return an error if decoding fails
func Parse ¶
func Parse(scanner *bufio.Scanner) (*apiextensionsv1.CustomResourceDefinition, error)
Parse scans a YAML stream and returns the next CRD found. If more than one CRD is present in the stream, calling again on the same stream returns the next CRD found.
func SelectVersion ¶
func SelectVersion(spec *apiextensionsv1.CustomResourceDefinitionSpec, version string) *apiextensionsv1.CustomResourceDefinitionVersion
SelectVersion extracts the CRD version definition matching the given version.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.