utils

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Bold = color.New(color.Bold).SprintFunc()
	Red  = color.New(color.FgRed).SprintFunc()
)

Functions

func AddFinalizer

func AddFinalizer(objectMeta *metav1.ObjectMeta, finalizer string) []string

func BoolToCondition

func BoolToCondition(val bool) metav1.ConditionStatus

func CheckVolumeStatusCondition

func CheckVolumeStatusCondition(statusConditions []metav1.Condition, condType string, condStatus metav1.ConditionStatus) bool

func GetAPIExtensionsClient added in v1.1.0

func GetAPIExtensionsClient() *apiextensions.ApiextensionsV1Client

func GetClientForNonCoreGroupKindVersions

func GetClientForNonCoreGroupKindVersions(group, kind string, versions ...string) (rest.Interface, *schema.GroupVersionKind, error)

func GetDirectClientset

func GetDirectClientset() direct.Interface

func GetDiscoveryClient

func GetDiscoveryClient() discovery.DiscoveryInterface

func GetGroupKindVersions

func GetGroupKindVersions(group, kind string, versions ...string) (*schema.GroupVersionKind, error)

func GetKubeClient

func GetKubeClient() kubernetes.Interface

func GetKubeConfig

func GetKubeConfig() string

func GetMetadataClient

func GetMetadataClient() metadata.Interface

func GetVolumeStatusCondition

func GetVolumeStatusCondition(statusConditions []metav1.Condition, condType string) metav1.Condition

func Init

func Init()

func JSONifyAndLog

func JSONifyAndLog(val interface{})

func LogYAML added in v1.2.1

func LogYAML(obj interface{}) error

func ParseSingleKubeNativeFromBytes added in v1.1.0

func ParseSingleKubeNativeFromBytes(data []byte) (runtime.Object, error)

func PrintYaml added in v1.2.1

func PrintYaml(data []byte)

func RemoveFinalizer

func RemoveFinalizer(objectMeta *metav1.ObjectMeta, finalizer string) []string

func UpdateVolumeStatusCondition

func UpdateVolumeStatusCondition(statusConditions []metav1.Condition, condType string, condStatus metav1.ConditionStatus)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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