Documentation ¶
Index ¶
- func Run(cmd *exec.Cmd) ([]byte, []byte, error)
- type Kubectl
- func (c *Kubectl) Apply(targetNamespace string, slug string, yamlDoc []byte, dryRun bool, wait bool, ...) ([]byte, []byte, error)
- func (c *Kubectl) ApplyCreateOrPatch(targetNamespace string, slug string, yamlDoc []byte, dryRun bool, wait bool, ...) ([]byte, []byte, error)
- func (c *Kubectl) Remove(targetNamespace string, yamlDoc []byte, wait bool) ([]byte, []byte, error)
- type KubectlInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Kubectl ¶
type Kubectl struct {
// contains filtered or unexported fields
}
func (*Kubectl) ApplyCreateOrPatch ¶
func (c *Kubectl) ApplyCreateOrPatch(targetNamespace string, slug string, yamlDoc []byte, dryRun bool, wait bool, annotateSlug bool) ([]byte, []byte, error)
ApplyCreateOrPatch attempts to run a `kubectl apply` on the yaml document. If it fails it will try to split a multi-doc and try again. As a last resort it will try create and patch. It's important to use patch as a last resort because it can trigger load balancer services to redeploy with new nodeports (SC-41322) and will remove the continuity of kubectl apply metadata.
type KubectlInterface ¶ added in v1.98.3
type KubectlInterface interface { Apply(targetNamespace string, slug string, yamlDoc []byte, dryRun bool, wait bool, annotateSlug bool) ([]byte, []byte, error) Remove(targetNamespace string, yamlDoc []byte, wait bool) ([]byte, []byte, error) ApplyCreateOrPatch(targetNamespace string, slug string, yamlDoc []byte, dryRun bool, wait bool, annotateSlug bool) ([]byte, []byte, error) }
func NewKubectl ¶
func NewKubectl(kubectl, kustomize string, config *rest.Config) KubectlInterface
Click to show internal directories.
Click to hide internal directories.