Documentation ¶
Index ¶
- type Execute
- func (x *Execute) Action(id int, name string, doc []byte, portForward string, ...) error
- func (x *Execute) Apply(id int, name string, labels map[string]string, b []byte) ([]KindNamespaceName, error)
- func (x *Execute) Prune(id int, deployed []KindNamespaceName, labels map[string]string, ...) error
- func (x *Execute) Wait(id int, flags string) error
- type KindNamespaceName
- type Kubectl
- type Kubectler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Execute ¶
type Execute struct { // DryRun prevents making changes to the target cluster. DryRun bool // Environ are the environment variables on Tool invocation. Environ []string // Kubectl knows how to invoke 'kubectl' Kubectl Kubectler // Out is the stream to send steps to in a format that is 'kubectl apply -f -' consumable. // Setting Out prevents any other processing (like 'wait') to take place. Out io.Writer Log logr.Logger }
Execute executes Action, Apply, Wait steps.
func (*Execute) Action ¶
func (x *Execute) Action(id int, name string, doc []byte, portForward string, passedValues *yamlx.Values) error
Action performs an action on the target cluster.
func (*Execute) Apply ¶
func (x *Execute) Apply(id int, name string, labels map[string]string, b []byte) ([]KindNamespaceName, error)
Apply applies the resource in b to the target cluster.
func (*Execute) Prune ¶ added in v0.4.0
func (x *Execute) Prune(id int, deployed []KindNamespaceName, labels map[string]string, namespaces []string) error
Prune diff deployed with the resources in namespaces selected by labels. The resources that are in cluster but not in deployed are deleted. NB. an empty string in namespaces selects non-namespaced resources.
type KindNamespaceName ¶ added in v0.4.0
type KindNamespaceName struct { GVK v1.GroupVersionKind Namespace string Name string }
KindNamespaceName TODO call it K8sResourceRef? K8sObjectRef
func NewKindNamespaceName ¶ added in v0.4.0
func NewKindNamespaceName(obj *unstructured.Unstructured) KindNamespaceName
func (KindNamespaceName) Resource ¶
func (k KindNamespaceName) Resource() string
Resource returns the name of the resource like; pod, configmap, xyz.constraints.gatekeeper.sh TODO use APIResources to do mapping.
func (KindNamespaceName) String ¶ added in v0.4.0
func (k KindNamespaceName) String() string
String makes the receiver implement Stringer.
Click to show internal directories.
Click to hide internal directories.