Documentation ¶
Index ¶
- func CreateOrUpdateClusterRole(client clientset.Interface, clusterRole *rbac.ClusterRole) error
- func CreateOrUpdateClusterRoleBinding(client clientset.Interface, clusterRoleBinding *rbac.ClusterRoleBinding) error
- func CreateOrUpdateConfigMap(client clientset.Interface, cm *v1.ConfigMap) error
- func CreateOrUpdateDaemonSet(client clientset.Interface, ds *extensions.DaemonSet) error
- func CreateOrUpdateDeployment(client clientset.Interface, deploy *extensions.Deployment) 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 CreateOrUpdateServiceAccount(client clientset.Interface, sa *v1.ServiceAccount) error
- func DefaultMarshalFunc(obj runtime.Object) ([]byte, error)
- func NewDryRunClient(drg DryRunGetter, w io.Writer) clientset.Interface
- func NewDryRunClientWithOpts(opts DryRunClientOptions) clientset.Interface
- func TryRunCommand(f func() error, failureThreshold uint8) error
- func WaitForAPI(client clientset.Interface, timeout time.Duration) error
- func WaitForPodsWithLabel(client clientset.Interface, timeout time.Duration, out io.Writer, ...) error
- func WaitForStaticPodToDisappear(client clientset.Interface, timeout time.Duration, podName string) error
- type ClientBackedDryRunGetter
- type DryRunClientOptions
- type DryRunGetter
- type InitDryRunGetter
- type MarshalFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdateClusterRole ¶
func CreateOrUpdateClusterRole(client clientset.Interface, clusterRole *rbac.ClusterRole) error
CreateOrUpdateClusterRole creates a ClusterRole if the target resource doesn't exist. If the resource exists already, this function will update the resource instead.
func CreateOrUpdateClusterRoleBinding ¶
func CreateOrUpdateClusterRoleBinding(client clientset.Interface, clusterRoleBinding *rbac.ClusterRoleBinding) error
CreateOrUpdateClusterRoleBinding creates a ClusterRoleBinding if the target resource doesn't exist. If the resource exists already, this function will update the resource instead.
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 CreateOrUpdateDaemonSet ¶
func CreateOrUpdateDaemonSet(client clientset.Interface, ds *extensions.DaemonSet) error
CreateOrUpdateDaemonSet creates a DaemonSet if the target resource doesn't exist. If the resource exists already, this function will update the resource instead.
func CreateOrUpdateDeployment ¶
func CreateOrUpdateDeployment(client clientset.Interface, deploy *extensions.Deployment) error
CreateOrUpdateDeployment creates a Deployment 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 CreateOrUpdateServiceAccount ¶
func CreateOrUpdateServiceAccount(client clientset.Interface, sa *v1.ServiceAccount) error
CreateOrUpdateServiceAccount creates a ServiceAccount if the target resource doesn't exist. If the resource exists already, this function will update the resource instead.
func DefaultMarshalFunc ¶
DefaultMarshalFunc is the default MarshalFunc used; uses YAML to print objects to the user
func NewDryRunClient ¶
func NewDryRunClient(drg DryRunGetter, w io.Writer) clientset.Interface
NewDryRunClient is a wrapper for NewDryRunClientWithOpts using some default values
func NewDryRunClientWithOpts ¶
func NewDryRunClientWithOpts(opts DryRunClientOptions) clientset.Interface
NewDryRunClientWithOpts returns a clientset.Interface that can be used normally for talking to the Kubernetes API. This client doesn't apply changes to the backend. The client gets GET/LIST values from the DryRunGetter implementation. This client logs all I/O to the writer w in YAML format
func TryRunCommand ¶
TryRunCommand runs a function a maximum of failureThreshold times, and retries on error. If failureThreshold is hit; the last error is returned
func WaitForAPI ¶
WaitForAPI waits for the API Server's /healthz endpoint to report "ok"
Types ¶
type ClientBackedDryRunGetter ¶
type ClientBackedDryRunGetter struct {
// contains filtered or unexported fields
}
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
func NewClientBackedDryRunGetter ¶
func NewClientBackedDryRunGetter(config *rest.Config) *ClientBackedDryRunGetter
NewClientBackedDryRunGetter creates a new ClientBackedDryRunGetter instance based on the rest.Config object
func NewClientBackedDryRunGetterFromKubeconfig ¶
func NewClientBackedDryRunGetterFromKubeconfig(file string) (*ClientBackedDryRunGetter, error)
NewClientBackedDryRunGetterFromKubeconfig creates a new ClientBackedDryRunGetter instance from the given KubeConfig file
func (*ClientBackedDryRunGetter) HandleGetAction ¶
func (clg *ClientBackedDryRunGetter) HandleGetAction(action core.GetAction) (bool, runtime.Object, error)
HandleGetAction handles GET actions to the dryrun clientset this interface supports
func (*ClientBackedDryRunGetter) HandleListAction ¶
func (clg *ClientBackedDryRunGetter) HandleListAction(action core.ListAction) (bool, runtime.Object, error)
HandleListAction handles LIST actions to the dryrun clientset this interface supports
type DryRunClientOptions ¶
type DryRunClientOptions struct { Writer io.Writer Getter DryRunGetter PrependReactors []core.Reactor AppendReactors []core.Reactor MarshalFunc MarshalFunc PrintGETAndLIST bool }
DryRunClientOptions specifies options to pass to NewDryRunClientWithOpts in order to get a dryrun clientset
type DryRunGetter ¶
type DryRunGetter interface { HandleGetAction(core.GetAction) (bool, runtime.Object, error) HandleListAction(core.ListAction) (bool, runtime.Object, error) }
DryRunGetter is an interface that must be supplied to the NewDryRunClient function in order to contstruct a fully functional fake dryrun clientset
type InitDryRunGetter ¶
type InitDryRunGetter struct {
// contains filtered or unexported fields
}
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
func NewInitDryRunGetter ¶
func NewInitDryRunGetter(masterName string, serviceSubnet string) *InitDryRunGetter
NewInitDryRunGetter creates a new instance of the InitDryRunGetter struct
func (*InitDryRunGetter) HandleGetAction ¶
HandleGetAction handles GET actions to the dryrun clientset this interface supports
func (*InitDryRunGetter) HandleListAction ¶
func (idr *InitDryRunGetter) HandleListAction(action core.ListAction) (bool, runtime.Object, error)
HandleListAction handles GET actions to the dryrun clientset this interface supports. Currently there are no known LIST calls during kubeadm init this code has to take care of.