plugin

package
v0.7.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2026 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDurationRound added in v0.7.14

func DefaultDurationRound() func(duration interface{}) string

func Run added in v0.7.0

func Run(f util.Factory, streams genericiooptions.IOStreams, args []string) error

func SetDurationRound added in v0.7.14

func SetDurationRound(f func(duration interface{}) string) (revertFunc func())

SetDurationRound is a helper method for tests

Types

type RenderableObject added in v0.7.0

type RenderableObject struct {
	unstructured.Unstructured

	Config *viper.Viper
	// contains filtered or unexported fields
}

RenderableObject is the object passed to the templates, also provides methods to run queries against Kubernetes API. It is an unstructured.Unstructured (so it has the Object field that keeps the Object) but there a numerous helper methods that already helps with the templates.

func (RenderableObject) Annotations added in v0.7.0

func (r RenderableObject) Annotations() (annotations map[string]interface{})

func (RenderableObject) Include added in v0.7.0

func (r RenderableObject) Include(templateName string, data interface{}) (string, error)

func (RenderableObject) IncludeRenderableObject added in v0.7.0

func (r RenderableObject) IncludeRenderableObject(obj RenderableObject) (output string)

func (RenderableObject) KStatus added in v0.7.2

func (r RenderableObject) KStatus() *kstatus.Result

KStatus return a Result object of kstatus for the object.

func (RenderableObject) Kind added in v0.7.0

func (r RenderableObject) Kind() (kind string)

func (RenderableObject) KubeGet added in v0.7.0

func (r RenderableObject) KubeGet(namespace string, args ...string) (out []RenderableObject)

func (RenderableObject) KubeGetByLabelsMap added in v0.7.0

func (r RenderableObject) KubeGetByLabelsMap(namespace, resourceType string, labels map[string]interface{}) (out []RenderableObject)

KubeGetByLabelsMap returns results similar to this:

> kubectl get -n {namespace} {resourceType} -l {label_key=label_val,...}

func (RenderableObject) KubeGetEvents added in v0.7.0

func (r RenderableObject) KubeGetEvents() RenderableObject

func (RenderableObject) KubeGetFirst added in v0.7.0

func (r RenderableObject) KubeGetFirst(namespace string, args ...string) RenderableObject

KubeGetFirst returns a new RenderableObject with a nil Object when no object found.

func (RenderableObject) KubeGetIngressesMatchingService added in v0.7.0

func (r RenderableObject) KubeGetIngressesMatchingService(namespace, svcName string) (out []RenderableObject)

func (RenderableObject) KubeGetNodeStatsSummary added in v0.7.0

func (r RenderableObject) KubeGetNodeStatsSummary(nodeName string) map[string]interface{}

func (RenderableObject) KubeGetNonTerminatedPodsOnNode added in v0.7.0

func (r RenderableObject) KubeGetNonTerminatedPodsOnNode(nodeName string) (podList []RenderableObject)

KubeGetNonTerminatedPodsOnNode returns details of all pods which are not in terminal status

func (RenderableObject) KubeGetOwners added in v0.7.0

func (r RenderableObject) KubeGetOwners() (out []RenderableObject)

KubeGetOwners returns the list of objects which are listed in the Owner references of an object.

func (RenderableObject) KubeGetServicesMatchingLabels added in v0.7.0

func (r RenderableObject) KubeGetServicesMatchingLabels(namespace string, labels map[string]interface{}) (out []RenderableObject)

func (RenderableObject) KubeGetServicesMatchingPod added in v0.7.7

func (r RenderableObject) KubeGetServicesMatchingPod(namespace, podName string) (out []RenderableObject)

func (RenderableObject) KubeGetUnifiedDiffString added in v0.7.0

func (r RenderableObject) KubeGetUnifiedDiffString(resourceOrKind, namespace, nameA, nameB string) string

KubeGetUnifiedDiffString generates a unified diff between given 2 resources and ignores several keys which are known to be creating noise in diff, see the removeFieldsThatCreateDiffNoise function to see which fields are being dropped.

func (RenderableObject) Labels added in v0.7.0

func (r RenderableObject) Labels() (labels map[string]interface{})

func (RenderableObject) Metadata added in v0.7.0

func (r RenderableObject) Metadata() (metadata map[string]interface{})

func (RenderableObject) Name added in v0.7.0

func (r RenderableObject) Name() string

func (RenderableObject) Namespace added in v0.7.0

func (r RenderableObject) Namespace() string

func (RenderableObject) RolloutStatus added in v0.7.0

func (r RenderableObject) RolloutStatus(obj RenderableObject) map[string]interface{}

RolloutStatus returns a map[string]interface{} with 3 keys: done: bool, message, error: string

func (RenderableObject) Spec added in v0.7.0

func (r RenderableObject) Spec() (spec map[string]interface{})

func (RenderableObject) Status added in v0.7.0

func (r RenderableObject) Status() (status map[string]interface{})

func (RenderableObject) StatusConditions added in v0.7.0

func (r RenderableObject) StatusConditions() (conditions []interface{})

func (RenderableObject) String added in v0.7.0

func (r RenderableObject) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL