k8sutils

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ApicastSecretLabel is the label that secrets need to have in order to reconcile changes
	ApicastSecretLabel = "apicast.apps.3scale.net/watched-by=apicast"
)
View Source
const (
	DeleteTagAnnotation = "apps.3scale.net/delete"
)

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 ConditionMarshal added in v0.8.0

func ConditionMarshal(conditions []metav1.Condition) ([]byte, error)

ConditionMarshal marshals the set of conditions as a JSON array, sorted by condition type.

func CopyConditions added in v0.8.0

func CopyConditions(conditions []metav1.Condition) []metav1.Condition

CopyConditions copies the set of conditions

func EnsureObjectMeta

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

EnsureObjectMeta ensure Labels, Annotations

func EnsureString

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

func EnvVarFromSecretKey added in v0.5.1

func EnvVarFromSecretKey(name string, secretName string, secretKey string) v1.EnvVar

func EnvVarFromValue added in v0.5.1

func EnvVarFromValue(name string, value string) v1.EnvVar

func FindDeploymentStatusCondition added in v0.7.1

func FindDeploymentStatusCondition(conditions []appsv1.DeploymentCondition, condType appsv1.DeploymentConditionType) *appsv1.DeploymentCondition

func FindEnvVar

func FindEnvVar(a []v1.EnvVar, x string) int

FindEnvVar returns the smallest index i at which x == a[i], or -1 if there is no such index.

func IsObjectTaggedToDelete added in v0.3.0

func IsObjectTaggedToDelete(obj KubernetesObject) bool

func IsStatusConditionTrue added in v0.7.1

func IsStatusConditionTrue(conditions []appsv1.DeploymentCondition, condType appsv1.DeploymentConditionType) bool

func MergeMapStringString

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

func ObjectInfo

func ObjectInfo(obj KubernetesObject) string

func SecretStringDataFromData

func SecretStringDataFromData(secret *v1.Secret) map[string]string

func TagObjectToDelete added in v0.3.0

func TagObjectToDelete(obj KubernetesObject)

Types

type KubernetesObject

type KubernetesObject interface {
	metav1.Object
	runtime.Object
}

Jump to

Keyboard shortcuts

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