common

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddonGVR

func AddonGVR() schema.GroupVersionResource

AddonGVR returns the schema representation of the addon resource

func CRDGVR

CRDGVR returns the schema representation for customresourcedefinitions

func ContainsString

func ContainsString(slice []string, s string) bool

ContainsString helper function to check string in a slice of strings.

func ConvertWorkflowPhaseToAddonPhase added in v0.7.0

func ConvertWorkflowPhaseToAddonPhase(lifecycle addonv1.LifecycleStep, phase wfv1.WorkflowPhase) addonv1.ApplicationAssemblyPhase

func ExtractChecksumAndLifecycleStep added in v0.7.0

func ExtractChecksumAndLifecycleStep(addonWorkflowName string) (string, addonv1.LifecycleStep, error)

ExtractChecksumAndLifecycleStep extracts the checksum and lifecycle step from the workflow name

func FromUnstructured added in v0.5.0

func FromUnstructured(un *unstructured.Unstructured) (*addonv1.Addon, error)

func FromUnstructuredObj added in v0.5.0

func FromUnstructuredObj(un *unstructured.Unstructured, v interface{}) error

FromUnstructuredObj convert unstructured to objects

func GetAddonMgrScheme added in v0.5.0

func GetAddonMgrScheme() *runtime.Scheme

func GetCurrentTimestamp added in v0.8.0

func GetCurrentTimestamp() int64

GetCurrentTimestamp -- get current timestamp in millisecond

func IsExpired added in v0.1.0

func IsExpired(startTime int64, ttlTime int64) bool

IsExpired --- check if reached ttl time

func NewAddonClient added in v0.5.0

func NewAddonClient(cfg *rest.Config) addonv1versioned.Interface

NewAddonClient - declare new addon client

func NewWFClient added in v0.5.0

func NewWFClient(cfg *rest.Config) wfv1versioned.Interface

NewWFClient -- declare new workflow client

func NewWorkflowInformer added in v0.5.0

func NewWorkflowInformer(dclient dynamic.Interface, ns string, resyncPeriod time.Duration) cache.SharedIndexInformer

func RemoveString

func RemoveString(slice []string, s string) (result []string)

RemoveString helper function to remove a string in a slice of strings.

func SecretGVR

func SecretGVR() schema.GroupVersionResource

SecretGVR returns the schema representation of the secret resource

func ToUnstructured added in v0.5.0

func ToUnstructured(wf *wfv1.Workflow) (*unstructured.Unstructured, error)

ToUnstructured converts an workflow to an Unstructured object

func WorkFlowFromUnstructured added in v0.5.0

func WorkFlowFromUnstructured(un *unstructured.Unstructured) (*wfv1.Workflow, error)

func WorkflowGVR

func WorkflowGVR() schema.GroupVersionResource

WorkflowGVR returns the schema representation of the workflow resource

func WorkflowType

func WorkflowType() *unstructured.Unstructured

WorkflowType return an unstructured workflow type object

Types

type Validator

type Validator interface {
	Validate() (bool, error)
	ValidateDependencies() error
}

Validator is a common interface for validators

Jump to

Keyboard shortcuts

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