kubernetes

package
v2.18.9 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// RevisionAnnotation is the revision annotation of a deployment's replica sets which records its rollout sequence
	RevisionAnnotation = "deployment.kubernetes.io/revision"
)

Variables

This section is empty.

Functions

func AddFinalizer

func AddFinalizer(obj metav1.Object, finalizers ...string)

AddFinalizer will add the given finalizer to the object. It uses a StringSet to avoid duplicates

func GenerateToken

func GenerateToken() string

GenerateToken generates a new, random token that can be used as an admin and kubelet token.

func GetDeploymentCondition added in v2.17.0

func GetDeploymentCondition(status appsv1.DeploymentStatus, condType appsv1.DeploymentConditionType) *appsv1.DeploymentCondition

GetDeploymentCondition returns the condition with the provided type.

func HasAnyFinalizer

func HasAnyFinalizer(o metav1.Object, names ...string) bool

func HasFinalizer

func HasFinalizer(o metav1.Object, names ...string) bool

HasFinalizer tells if a object has all the given finalizers

func HasOnlyFinalizer

func HasOnlyFinalizer(o metav1.Object, name string) bool

HasOnlyFinalizer tells if an object has only the given finalizer

func IsDeploymentRolloutComplete added in v2.17.0

func IsDeploymentRolloutComplete(deployment *appsv1.Deployment, revision int64) (bool, error)

IsDeploymentRolloutComplete returns a bool saying whether the deployment completed and an error in case an unexpected condition arrives.

based on: https://github.com/kubernetes/kubernetes/blob/252887e39f905389156d2bc9c5932688857588e4/staging/src/k8s.io/kubectl/pkg/polymorphichelpers/rollout_status.go#L59

func RemoveFinalizer

func RemoveFinalizer(obj metav1.Object, toRemove ...string)

RemoveFinalizer removes the given finalizers from the object

func Revision added in v2.17.0

func Revision(obj runtime.Object) (int64, error)

Revision returns the revision number of the input object.

func ValidateKubernetesToken

func ValidateKubernetesToken(token string) error

ValidateKubernetesToken checks if a given token is syntactically correct.

func ValidateSecretKeySelector

func ValidateSecretKeySelector(selector *providerconfig.GlobalSecretKeySelector, key string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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