helper

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2020 License: Apache-2.0 Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmpResourceList added in v0.4.0

func CmpResourceList(a, b *v1.ResourceList) bool

CmpResourceList returns true if the resourceList a is equal to b,

func CmpResources added in v0.4.0

func CmpResources(a, b *v1.ResourceRequirements) bool

CmpResources returns true if the resource requirements a is equal to b,

func EnsureObjectMeta added in v0.4.0

func EnsureObjectMeta(existing, desired *metav1.ObjectMeta) bool

EnsureObjectMeta ensure Labels, Annotations

func EnsureString added in v0.4.0

func EnsureString(modified *bool, existing *string, required string)

func GetEnvVar added in v0.4.0

func GetEnvVar(key, def string) string

func GetSecret added in v0.5.0

func GetSecret(name string, namespace string, client k8sclient.Client) (*v1.Secret, error)

func GetSecretDataFromStringData added in v0.5.0

func GetSecretDataFromStringData(secretStringData map[string]string) map[string][]byte

func GetSecretDataValue added in v0.5.0

func GetSecretDataValue(secretData map[string][]byte, fieldName string) *string

func GetSecretDataValueOrDefault added in v0.5.0

func GetSecretDataValueOrDefault(secretData map[string][]byte, fieldName string, defaultValue string) string

func GetSecretStringDataFromData added in v0.5.0

func GetSecretStringDataFromData(secretData map[string][]byte) map[string]string

func GetStringPointerValueOrDefault added in v0.5.0

func GetStringPointerValueOrDefault(val *string, def string) string

func GetTestSecret added in v0.5.0

func GetTestSecret(namespace, secretName string, data map[string]string) *v1.Secret

func MergeMapStringString added in v0.4.0

func MergeMapStringString(modified *bool, existing *map[string]string, desired map[string]string)

func MergeSecretData added in v0.5.0

func MergeSecretData(from, to map[string][]byte) map[string][]byte

Returns a new map containing the contents of `from` and the contents of `to`. The value for entries with duplicated keys will be that of `from`

func PortFromURL

func PortFromURL(url *url.URL) int

PortFromURL infers port number if it is not explict

func PortaClient

func PortaClient(url *url.URL, masterAccessToken string) (*client.ThreeScaleClient, error)

PortaClient instantiates porta_client.ThreeScaleClient from admin url object

func PortaClientFromURLString

func PortaClientFromURLString(adminURLStr, masterAccessToken string) (*client.ThreeScaleClient, error)

PortaClientFromURLString instantiate porta_client.ThreeScaleClient from admin url string

func SetURLDefaultPort

func SetURLDefaultPort(rawurl string) string

SetURLDefaultPort adds the default Port if not set

func UnwrapRawExtensions added in v0.3.0

func UnwrapRawExtensions(rawExts []runtime.RawExtension) []common.KubernetesObject

func WrapRawExtension added in v0.3.0

func WrapRawExtension(object runtime.Object) runtime.RawExtension

func WrapRawExtensions added in v0.3.0

func WrapRawExtensions(objects []common.KubernetesObject) []runtime.RawExtension

Types

This section is empty.

Jump to

Keyboard shortcuts

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