Documentation ¶
Index ¶
- Constants
- func AddFinalizer(obj metav1.Object, finalizers ...string)
- func GenerateToken() string
- func GetDeploymentCondition(status appsv1.DeploymentStatus, condType appsv1.DeploymentConditionType) *appsv1.DeploymentCondition
- func HasAnyFinalizer(o metav1.Object, names ...string) bool
- func HasFinalizer(o metav1.Object, names ...string) bool
- func HasOnlyFinalizer(o metav1.Object, name string) bool
- func IsDeploymentRolloutComplete(deployment *appsv1.Deployment, revision int64) (bool, error)
- func RemoveFinalizer(obj metav1.Object, toRemove ...string)
- func Revision(obj runtime.Object) (int64, error)
- func ValidateKubernetesToken(token string) error
- func ValidateSecretKeySelector(selector *providerconfig.GlobalSecretKeySelector, key string) error
Constants ¶
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 ¶
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 HasFinalizer ¶
HasFinalizer tells if a object has all the given finalizers
func HasOnlyFinalizer ¶
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.
func RemoveFinalizer ¶
RemoveFinalizer removes the given finalizers from the object
func ValidateKubernetesToken ¶
ValidateKubernetesToken checks if a given token is syntactically correct.
func ValidateSecretKeySelector ¶
func ValidateSecretKeySelector(selector *providerconfig.GlobalSecretKeySelector, key string) error
Types ¶
This section is empty.