package
0.0.0-20191024030528-a481964b876e
Repository: https://github.com/divinerapier/learn-kubernetes.git
Documentation: pkg.go.dev

# Functions

CreateOrMutateConfigMap tries to create the ConfigMap provided as cm.
CreateOrRetainConfigMap creates a ConfigMap if the target resource doesn't exist.
CreateOrUpdateClusterRole creates a ClusterRole if the target resource doesn't exist.
CreateOrUpdateClusterRoleBinding creates a ClusterRoleBinding if the target resource doesn't exist.
CreateOrUpdateConfigMap creates a ConfigMap if the target resource doesn't exist.
CreateOrUpdateDaemonSet creates a DaemonSet if the target resource doesn't exist.
CreateOrUpdateDeployment creates a Deployment if the target resource doesn't exist.
CreateOrUpdateRole creates a Role if the target resource doesn't exist.
CreateOrUpdateRoleBinding creates a RoleBinding if the target resource doesn't exist.
CreateOrUpdateSecret creates a Secret if the target resource doesn't exist.
CreateOrUpdateServiceAccount creates a ServiceAccount if the target resource doesn't exist.
DefaultMarshalFunc is the default MarshalFunc used; uses YAML to print objects to the user.
DeleteDaemonSetForeground deletes the specified DaemonSet in foreground mode; i.e.
DeleteDeploymentForeground deletes the specified Deployment in foreground mode; i.e.
GetConfigMapWithRetry tries to retrieve a ConfigMap using the given client, retrying if we get an unexpected error.
GetDefaultDryRunClientOptions returns the default DryRunClientOptions values.
MutateConfigMap takes a ConfigMap Object Meta (namespace and name), retrieves the resource from the server and tries to mutate it by calling to the mutator callback, then an Update of the mutated ConfigMap will be performed.
NewClientBackedDryRunGetter creates a new ClientBackedDryRunGetter instance based on the rest.Config object.
NewClientBackedDryRunGetterFromKubeconfig creates a new ClientBackedDryRunGetter instance from the given KubeConfig file.
NewDryRunClient is a wrapper for NewDryRunClientWithOpts using some default values.
NewDryRunClientWithOpts returns a clientset.Interface that can be used normally for talking to the Kubernetes API.
NewInitDryRunGetter creates a new instance of the InitDryRunGetter struct.
NewKubeWaiter returns a new Waiter object that talks to the given Kubernetes cluster.
PatchNode tries to patch a node using patchFn for the actual mutating logic.
PatchNodeOnce executes patchFn on the node object found by the node name.
PrintBytesWithLinePrefix prints objBytes to writer w with linePrefix in the beginning of every line.
TryRunCommand runs a function a maximum of failureThreshold times, and retries on error.

# Structs

ClientBackedDryRunGetter implements the DryRunGetter interface for use in NewDryRunClient() and proxies all GET and LIST requests to the backing API server reachable via rest.Config.
DryRunClientOptions specifies options to pass to NewDryRunClientWithOpts in order to get a dryrun clientset.
InitDryRunGetter implements the DryRunGetter interface and can be used to GET/LIST values in the dryrun fake clientset Need to handle these routes in a special manner: - GET /default/services/kubernetes -- must return a valid Service - GET /clusterrolebindings/system:nodes -- can safely return a NotFound error - GET /kube-system/secrets/bootstrap-token-* -- can safely return a NotFound error - GET /nodes/<node-name> -- must return a valid Node - ...all other, unknown GETs/LISTs will be logged.
KubeWaiter is an implementation of Waiter that is backed by a Kubernetes client.

# Interfaces

DryRunGetter is an interface that must be supplied to the NewDryRunClient function in order to construct a fully functional fake dryrun clientset.
Waiter is an interface for waiting for criteria in Kubernetes to happen.

# Type aliases

ConfigMapMutator is a function that mutates the given ConfigMap and optionally returns an error.
MarshalFunc takes care of converting any object to a byte array for displaying the object to the user.