k8sschema

package
v0.3.4-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2022 License: Apache-2.0 Imports: 56 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToLiasonScheme

func ConvertToLiasonScheme(obj runtime.Object) (newobj runtime.Object, err error)

ConvertToLiasonScheme converts objects to liason type

func ConvertToPodSpec

func ConvertToPodSpec(podspec *corev1.PodSpec) core.PodSpec

ConvertToPodSpec podspec to core pod spec

func ConvertToPreferredVersion

func ConvertToPreferredVersion(obj runtime.Object, clusterSpec collecttypes.ClusterMetadataSpec) (newobj runtime.Object, err error)

ConvertToPreferredVersion converts obj to a preferred Version

func ConvertToSupportedVersion

func ConvertToSupportedVersion(obj runtime.Object, clusterSpec collecttypes.ClusterMetadataSpec) (runtime.Object, error)

ConvertToSupportedVersion converts obj to a supported Version

func ConvertToV1PodSpec

func ConvertToV1PodSpec(podSpec *core.PodSpec) corev1.PodSpec

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 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) (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

func GetKubernetesObjsInDir(dir string) []runtime.Object

GetKubernetesObjsInDir returns returns all kubernetes objects in a dir

func GetSchema

func GetSchema() *runtime.Scheme

GetSchema returns the scheme

func Intersection

func Intersection(objs1 []runtime.Object, objs2 []runtime.Object) []runtime.Object

Intersection finds overlapping objects between the two arrays

Types

type K8sResourceT

type K8sResourceT = map[string]interface{}

K8sResourceT represents type used to process K8s objects. Not using type alias breaks parameterizer currently.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL