Documentation ¶
Index ¶
- func CreateOrUpdateConfigMap(client clientset.Interface, cm *v1.ConfigMap) error
- func CreateOrUpdateRole(client clientset.Interface, role *rbac.Role) error
- func CreateOrUpdateRoleBinding(client clientset.Interface, roleBinding *rbac.RoleBinding) error
- func CreateOrUpdateSecret(client clientset.Interface, secret *v1.Secret) error
- func GetConfigMapWithRetry(client clientset.Interface, namespace, name string) (*v1.ConfigMap, error)
- func GetNodePoolInfoWithRetry(cfg *clientcmdapi.Config, name string) (*v1beta1.NodePool, error)
- func TryRunCommand(f func() error, failureThreshold int) error
- type ConfigMapMutator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdateConfigMap ¶
CreateOrUpdateConfigMap creates a ConfigMap if the target resource doesn't exist. If the resource exists already, this function will update the resource instead.
func CreateOrUpdateRole ¶
CreateOrUpdateRole creates a Role if the target resource doesn't exist. If the resource exists already, this function will update the resource instead.
func CreateOrUpdateRoleBinding ¶
func CreateOrUpdateRoleBinding(client clientset.Interface, roleBinding *rbac.RoleBinding) error
CreateOrUpdateRoleBinding creates a RoleBinding if the target resource doesn't exist. If the resource exists already, this function will update the resource instead.
func CreateOrUpdateSecret ¶
CreateOrUpdateSecret creates a Secret if the target resource doesn't exist. If the resource exists already, this function will update the resource instead.
func GetConfigMapWithRetry ¶
func GetConfigMapWithRetry(client clientset.Interface, namespace, name string) (*v1.ConfigMap, error)
GetConfigMapWithRetry tries to retrieve a ConfigMap using the given client, retrying if we get an unexpected error.
TODO: evaluate if this can be done better. Potentially remove the retry if feasible.
func GetNodePoolInfoWithRetry ¶ added in v1.4.0
func TryRunCommand ¶
TryRunCommand runs a function a maximum of failureThreshold times, and retries on error. If failureThreshold is hit; the last error is returned
Types ¶
type ConfigMapMutator ¶
ConfigMapMutator is a function that mutates the given ConfigMap and optionally returns an error