Documentation ¶
Index ¶
- func CreateFQAPIs(pkg string, gvs map[string][]string) (apis []string)
- func FormatOperatorNameDNS1123(name string) string
- func GetCRDManifestPaths(crdsDir string) (crdPaths []string, err error)
- func GetCRDs(crdsDir string) ([]*apiextv1beta1.CustomResourceDefinition, error)
- func GetDisplayName(name string) string
- func GetKubeconfigAndNamespace(configPath string) (*rest.Config, string, error)
- func GetObjectBytes(obj interface{}, m MarshalFunc) ([]byte, error)
- func GetTypeMetaFromBytes(b []byte) (t metav1.TypeMeta, err error)
- func ParseGroupSubpackages(apisDir string) (map[string][]string, error)
- func ParseGroupVersions(apisDir string) (map[string][]string, error)
- type CRDVersions
- type MarshalFunc
- type MatchingFields
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFQAPIs ¶ added in v0.11.0
CreateFQAPIs return a slice of all fully qualified pkg + groups + versions of pkg and gvs in the format "pkg/groupA/v1".
func FormatOperatorNameDNS1123 ¶ added in v0.14.0
FormatOperatorNameDNS1123 ensures name is DNS1123 label-compliant by replacing all non-compliant UTF-8 characters with "-".
func GetCRDManifestPaths ¶ added in v0.6.0
GetCRDManifestPaths gets all CRD manifest paths in crdsDir and subdirs.
func GetCRDs ¶ added in v0.6.0
func GetCRDs(crdsDir string) ([]*apiextv1beta1.CustomResourceDefinition, error)
GetCRDs parses all CRD manifests in the directory crdsDir and all of its subdirectories.
func GetDisplayName ¶ added in v0.9.0
GetDisplayName turns a project dir name in any of {snake, chain, camel} cases, hierarchical dot structure, or space-delimited into a space-delimited, title'd display name. Ex. "another-_AppOperator_againTwiceThrice More" -> "Another App Operator Again Twice Thrice More"
func GetKubeconfigAndNamespace ¶
GetKubeconfigAndNamespace returns the *rest.Config and default namespace defined in the kubeconfig at the specified path. If no path is provided, returns the default *rest.Config and namespace
func GetObjectBytes ¶ added in v0.6.0
func GetObjectBytes(obj interface{}, m MarshalFunc) ([]byte, error)
GetObjectBytes marshalls an object with m and removes runtime-managed fields: 'status', 'creationTimestamp'
func GetTypeMetaFromBytes ¶ added in v0.10.0
GetTypeMetaFromBytes gets the type and object metadata from b. b is assumed to be a single Kubernetes resource manifest.
func ParseGroupSubpackages ¶ added in v0.11.0
ParseGroupSubpackages parses the apisDir directory tree and returns a map of all found API groups to subpackages.
Types ¶
type CRDVersions ¶ added in v0.13.0
type CRDVersions []apiextv1beta1.CustomResourceDefinitionVersion
func (CRDVersions) Len ¶ added in v0.13.0
func (vs CRDVersions) Len() int
func (CRDVersions) Less ¶ added in v0.13.0
func (vs CRDVersions) Less(i, j int) bool
func (CRDVersions) Swap ¶ added in v0.13.0
func (vs CRDVersions) Swap(i, j int)
type MarshalFunc ¶ added in v0.9.0
type MatchingFields ¶ added in v0.11.0
MatchingFields implements the client.ListOption and client.DeleteAllOfOption interfaces so fields.Selector can be used directly in client.List and client.DeleteAllOf.
func (MatchingFields) ApplyToDeleteAllOf ¶ added in v0.11.0
func (m MatchingFields) ApplyToDeleteAllOf(opts *client.DeleteAllOfOptions)
func (MatchingFields) ApplyToList ¶ added in v0.11.0
func (m MatchingFields) ApplyToList(opts *client.ListOptions)