Documentation ¶
Index ¶
- func NewResourceBuilder(kubeOpts config.KubernetesOptions) *resource.Builder
- type Client
- type Kubectl
- type Manifests
- type ResourceBuilderFunc
- type Workload
- func (w *Workload) AddEmptyDirVolume(name string)
- func (w *Workload) AddInitContainer(cont corev1.Container)
- func (w *Workload) Container(name string) *corev1.Container
- func (w *Workload) DefaultContainer() *corev1.Container
- func (w *Workload) Info() *resource.Info
- func (w *Workload) Name() string
- func (w *Workload) Namespace() string
- func (w *Workload) ResetChanges()
- func (w *Workload) SetReplicasIfApplicable(n int32) bool
- func (w *Workload) TargetContainer() *corev1.Container
- func (w *Workload) Template() *corev1.PodTemplateSpec
- type WorkloadFinder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResourceBuilder ¶
func NewResourceBuilder(kubeOpts config.KubernetesOptions) *resource.Builder
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateOrUpdate ¶
func (*Client) Static ¶
func (c *Client) Static() kubernetes.Interface
type Kubectl ¶
type Kubectl interface { CpFrom(ctx context.Context, namespace, pod, container, srcPath, dstPath string) ([]byte, error) CpTo(ctx context.Context, namespace, pod, container, srcPath, dstPath string) ([]byte, error) Exec(ctx context.Context, namespace, pod, container, cmd string, args ...string) ([]byte, error) PortForward(ctx context.Context, namespace, pod, address, hostPort, podPort string) (*exec.Cmd, string, error) }
func NewKubectl ¶
func NewKubectl(opts config.KubernetesOptions) Kubectl
type Manifests ¶
type Manifests struct {
// contains filtered or unexported fields
}
func ManifestsFromFiles ¶
func ManifestsFromFiles( opts config.KubernetesOptions, client *Client, resourceBuilderFn ResourceBuilderFunc, ) (*Manifests, error)
type ResourceBuilderFunc ¶
ResourceBuilderFunc is a helper function to avoid passing KuberneteOptions through unrelated code.
func NewResourceBuilderFunc ¶
func NewResourceBuilderFunc(kubeOpts config.KubernetesOptions) ResourceBuilderFunc
type Workload ¶
type Workload struct {
// contains filtered or unexported fields
}
func (*Workload) AddEmptyDirVolume ¶
func (*Workload) AddInitContainer ¶
func (*Workload) DefaultContainer ¶
func (*Workload) ResetChanges ¶
func (w *Workload) ResetChanges()
func (*Workload) SetReplicasIfApplicable ¶
func (*Workload) TargetContainer ¶
func (*Workload) Template ¶
func (w *Workload) Template() *corev1.PodTemplateSpec
type WorkloadFinder ¶
type WorkloadFinder struct {
// contains filtered or unexported fields
}
WorkloadFinder searches for the workload object in:
- supplied manifest files (if any)
- default cluster
func NewWorkloadFinder ¶
func NewWorkloadFinder(manifests *Manifests, resourceBuilderFn ResourceBuilderFunc) *WorkloadFinder
func (*WorkloadFinder) Find ¶
func (f *WorkloadFinder) Find(target config.KubernetesTarget) (*Workload, error)
Click to show internal directories.
Click to hide internal directories.