Documentation ¶
Index ¶
- func ConvertToLiasonScheme(obj runtime.Object) (newobj runtime.Object, err error)
- func ConvertToPodSpec(podspec *corev1.PodSpec) core.PodSpec
- func ConvertToPreferredVersion(obj runtime.Object, clusterSpec collecttypes.ClusterMetadataSpec, ...) (newobj runtime.Object, err error)
- func ConvertToSupportedVersion(obj runtime.Object, clusterSpec collecttypes.ClusterMetadataSpec, ...) (runtime.Object, error)
- func ConvertToV1PodSpec(podSpec *core.PodSpec) corev1.PodSpec
- func ConvertToVersion(obj runtime.Object, dgv schema.GroupVersion) (newobj runtime.Object, err error)
- func GetGVKNFromK(k K8sResourceT) (group string, version string, kind string, metadataName string, err error)
- func GetInfoFromK8sResource(k8sResource K8sResourceT) (kind, apiVersion, name string, err error)
- func GetK8sResourcesWithPaths(k8sResourcesPath string, currDirOnly bool) (map[string][]K8sResourceT, error)
- func GetKubernetesObjsInDir(dir string) []runtime.Object
- func GetOnlyGVKInfoFromK8sResource(k8sResource K8sResourceT) (kind, apiVersion string, err error)
- func GetSchema() *runtime.Scheme
- func Intersection(objs1 []runtime.Object, objs2 []runtime.Object) []runtime.Object
- type K8sResourceT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToLiasonScheme ¶
ConvertToLiasonScheme converts objects to liason type
func ConvertToPodSpec ¶
ConvertToPodSpec podspec to core pod spec
func ConvertToPreferredVersion ¶
func ConvertToPreferredVersion(obj runtime.Object, clusterSpec collecttypes.ClusterMetadataSpec, setDefaultValuesInYamls bool) (newobj runtime.Object, err error)
ConvertToPreferredVersion converts obj to a preferred Version
func ConvertToSupportedVersion ¶
func ConvertToSupportedVersion(obj runtime.Object, clusterSpec collecttypes.ClusterMetadataSpec, setDefaultValuesInYamls bool) (runtime.Object, error)
ConvertToSupportedVersion converts obj to a supported Version
func ConvertToV1PodSpec ¶
ConvertToV1PodSpec podspec to v1 pod spec
func ConvertToVersion ¶
func ConvertToVersion(obj runtime.Object, dgv schema.GroupVersion) (newobj runtime.Object, err error)
ConvertToVersion converts objects to a version
func GetGVKNFromK ¶ added in v0.3.13
func GetGVKNFromK(k K8sResourceT) (group string, version string, kind string, metadataName string, err error)
GetGVKNFromK gets the GVK and metadata.name information for a K8s resource
func GetInfoFromK8sResource ¶
func GetInfoFromK8sResource(k8sResource K8sResourceT) (kind, apiVersion, name string, err error)
GetInfoFromK8sResource returns some useful information given a k8s resource
func GetK8sResourcesWithPaths ¶
func GetK8sResourcesWithPaths(k8sResourcesPath string, currDirOnly bool) (map[string][]K8sResourceT, error)
GetK8sResourcesWithPaths gets the k8s resources from a folder along with the relaive paths where they were found. Mutiple resources maybe specified in the same yaml file.
func GetKubernetesObjsInDir ¶
GetKubernetesObjsInDir returns returns all kubernetes objects in a dir
func GetOnlyGVKInfoFromK8sResource ¶ added in v0.3.13
func GetOnlyGVKInfoFromK8sResource(k8sResource K8sResourceT) (kind, apiVersion string, err error)
GetOnlyGVKInfoFromK8sResource returns the Group Version Kind information given a k8s resource
Types ¶
type K8sResourceT ¶
type K8sResourceT = map[string]interface{}
K8sResourceT represents type used to process K8s objects. Not using type alias breaks parameterizer currently.
func GetK8sResourcesFromYaml ¶ added in v0.3.6
func GetK8sResourcesFromYaml(k8sYaml string) ([]K8sResourceT, error)
GetK8sResourcesFromYaml decodes k8s resources from yaml