kube

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// AnnoWorkflowLastAppliedConfig is the annotation for last applied config
	AnnoWorkflowLastAppliedConfig = "workflow.oam.dev/last-applied-configuration"
	// AnnoWorkflowLastAppliedTime is annotation for last applied time
	AnnoWorkflowLastAppliedTime = "workflow.oam.dev/last-applied-time"
)
View Source
const (
	// WorkflowResourceCreator is the creator name of workflow resource
	WorkflowResourceCreator string = "workflow"
)

Variables

This section is empty.

Functions

func GetProviders added in v0.6.2

func GetProviders() map[string]cuexruntime.ProviderFn

GetProviders get kube providers.

func GetTemplate added in v0.6.2

func GetTemplate() string

GetTemplate get kube template.

func Patch added in v0.6.2

func Patch(ctx context.Context, params *providertypes.Params[cue.Value]) (cue.Value, error)

Patch patch CR in cluster.

Types

type ApplyInParallelParams added in v0.6.2

type ApplyInParallelParams = providertypes.Params[ApplyInParallelVars]

ApplyInParallelParams .

type ApplyInParallelReturnVars added in v0.6.2

type ApplyInParallelReturnVars struct {
	Resource []*unstructured.Unstructured `json:"value"`
}

ApplyInParallelReturnVars .

type ApplyInParallelReturns added in v0.6.2

type ApplyInParallelReturns = providertypes.Returns[ApplyInParallelReturnVars]

ApplyInParallelReturns .

func ApplyInParallel added in v0.6.2

func ApplyInParallel(ctx context.Context, params *ApplyInParallelParams) (*ApplyInParallelReturns, error)

ApplyInParallel create or update CRs in parallel.

type ApplyInParallelVars added in v0.6.2

type ApplyInParallelVars struct {
	Resources []*unstructured.Unstructured `json:"value"`
	Cluster   string                       `json:"cluster,omitempty"`
}

ApplyInParallelVars .

type ListFilter added in v0.6.2

type ListFilter struct {
	Namespace      string            `json:"namespace,omitempty"`
	MatchingLabels map[string]string `json:"matchingLabels,omitempty"`
}

ListFilter filter for list resources

type ListReturnVars added in v0.6.2

type ListReturnVars struct {
	Resources *unstructured.UnstructuredList `json:"values"`
	Error     string                         `json:"err,omitempty"`
}

ListReturnVars .

type ListReturns added in v0.6.2

type ListReturns = providertypes.Returns[ListReturnVars]

ListReturns .

func List added in v0.6.2

func List(ctx context.Context, params *ResourceParams) (*ListReturns, error)

List lists CRs from cluster.

type ResourceParams added in v0.6.2

type ResourceParams = providertypes.Params[ResourceVars]

ResourceParams .

type ResourceReturnVars added in v0.6.2

type ResourceReturnVars struct {
	Resource *unstructured.Unstructured `json:"value"`
	Error    string                     `json:"err,omitempty"`
}

ResourceReturnVars .

type ResourceReturns added in v0.6.2

type ResourceReturns = providertypes.Returns[ResourceReturnVars]

ResourceReturns .

func Apply added in v0.6.2

func Apply(ctx context.Context, params *ResourceParams) (*ResourceReturns, error)

Apply create or update CR in cluster.

func Delete added in v0.6.2

func Delete(ctx context.Context, params *ResourceParams) (*ResourceReturns, error)

Delete deletes CR from cluster.

func Read added in v0.6.2

func Read(ctx context.Context, params *ResourceParams) (*ResourceReturns, error)

Read get CR from cluster.

type ResourceVars added in v0.6.2

type ResourceVars struct {
	Resource *unstructured.Unstructured `json:"value"`
	Filter   *ListFilter                `json:"filter,omitempty"`
	Cluster  string                     `json:"cluster,omitempty"`
}

ResourceVars .

Jump to

Keyboard shortcuts

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