Documentation ¶
Index ¶
- func ExecuteSuccessfully() types.GomegaMatcher
- func JoinKubeResources(resources ...string) string
- func JoinKubeResourcesAndSet(f *HookExecutionConfig, resources ...string)
- func SimpleBindingGeneratedBindingContext(binding BindingType) context.GeneratedBindingContexts
- func TempDirWithPerms(dir, prefix string, perms int) (name string, err error)
- func TempFileWithPerms(dir, pattern string, perms int) (f *os.File, err error)
- type BindingContextsSlice
- func (bcs *BindingContextsSlice) Array() []gjson.Result
- func (bcs *BindingContextsSlice) Get(path string) library.KubeResult
- func (bcs *BindingContextsSlice) Parse() library.KubeResult
- func (bcs *BindingContextsSlice) Set(contexts ...context.GeneratedBindingContexts)
- func (bcs *BindingContextsSlice) String() string
- type CustomCRD
- type HookExecutionConfig
- func (hec *HookExecutionConfig) AddHookEnv(env string)
- func (hec *HookExecutionConfig) ConfigValuesDelete(path string)
- func (hec *HookExecutionConfig) ConfigValuesGet(path string) library.KubeResult
- func (hec *HookExecutionConfig) ConfigValuesSet(path string, value interface{})
- func (hec *HookExecutionConfig) ConfigValuesSetFromYaml(path string, value []byte)
- func (hec *HookExecutionConfig) GenerateAfterAllContext() hookcontext.GeneratedBindingContexts
- func (hec *HookExecutionConfig) GenerateAfterDeleteHelmContext() hookcontext.GeneratedBindingContexts
- func (hec *HookExecutionConfig) GenerateAfterHelmContext() hookcontext.GeneratedBindingContexts
- func (hec *HookExecutionConfig) GenerateBeforeAllContext() hookcontext.GeneratedBindingContexts
- func (hec *HookExecutionConfig) GenerateBeforeHelmContext() hookcontext.GeneratedBindingContexts
- func (hec *HookExecutionConfig) GenerateOnStartupContext() hookcontext.GeneratedBindingContexts
- func (hec *HookExecutionConfig) GenerateScheduleContext(crontab string) hookcontext.GeneratedBindingContexts
- func (hec *HookExecutionConfig) KubeClient() *klient.Client
- func (hec *HookExecutionConfig) KubeStateSet(newKubeState string) hookcontext.GeneratedBindingContexts
- func (hec *HookExecutionConfig) KubeStateSetAndWaitForBindingContexts(newKubeState string, _ int) hookcontext.GeneratedBindingContexts
- func (hec *HookExecutionConfig) KubernetesGlobalResource(kind, name string) object_store.KubeObject
- func (hec *HookExecutionConfig) KubernetesResource(kind, namespace, name string) object_store.KubeObject
- func (hec *HookExecutionConfig) RegisterCRD(group, version, kind string, namespaced bool)
- func (hec *HookExecutionConfig) RunGoHook()
- func (hec *HookExecutionConfig) RunHook()
- func (hec *HookExecutionConfig) ValuesDelete(path string)
- func (hec *HookExecutionConfig) ValuesGet(path string) library.KubeResult
- func (hec *HookExecutionConfig) ValuesSet(path string, value interface{})
- func (hec *HookExecutionConfig) ValuesSetFromYaml(path string, value []byte)
- type ShellOperatorHookConfig
- type TestMetricsCollector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteSuccessfully ¶
func ExecuteSuccessfully() types.GomegaMatcher
func JoinKubeResources ¶
func JoinKubeResourcesAndSet ¶
func JoinKubeResourcesAndSet(f *HookExecutionConfig, resources ...string)
func SimpleBindingGeneratedBindingContext ¶
func SimpleBindingGeneratedBindingContext(binding BindingType) context.GeneratedBindingContexts
SimpleBindingGeneratedBindingContext is a helper to create empty binding contexts for OnStartup/Schedule/AfterHelm/etc.
func TempDirWithPerms ¶
Types ¶
type BindingContextsSlice ¶
type BindingContextsSlice struct { JSON string BindingContexts []binding_context.BindingContext }
func (*BindingContextsSlice) Array ¶
func (bcs *BindingContextsSlice) Array() []gjson.Result
func (*BindingContextsSlice) Get ¶
func (bcs *BindingContextsSlice) Get(path string) library.KubeResult
func (*BindingContextsSlice) Parse ¶
func (bcs *BindingContextsSlice) Parse() library.KubeResult
func (*BindingContextsSlice) Set ¶
func (bcs *BindingContextsSlice) Set(contexts ...context.GeneratedBindingContexts)
func (*BindingContextsSlice) String ¶
func (bcs *BindingContextsSlice) String() string
type HookExecutionConfig ¶
type HookExecutionConfig struct { HookPath string GoHook *kind.GoHook KubeExtraCRDs []CustomCRD IsKubeStateInited bool BindingContexts BindingContextsSlice BindingContextController *hookcontext.BindingContextController ValuesValidator *validation.ValuesValidator GoHookError error GoHookBindingActions []go_hook.BindingAction MetricsCollector TestMetricsCollector PatchCollector *object_patch.PatchCollector Session *gexec.Session LogrusOutput *gbytes.Buffer // contains filtered or unexported fields }
func HookExecutionConfigInit ¶
func HookExecutionConfigInit(initValues, initConfigValues string, k8sVersion ...k8s.FakeClusterVersion) *HookExecutionConfig
func (*HookExecutionConfig) AddHookEnv ¶
func (hec *HookExecutionConfig) AddHookEnv(env string)
func (*HookExecutionConfig) ConfigValuesDelete ¶
func (hec *HookExecutionConfig) ConfigValuesDelete(path string)
func (*HookExecutionConfig) ConfigValuesGet ¶
func (hec *HookExecutionConfig) ConfigValuesGet(path string) library.KubeResult
func (*HookExecutionConfig) ConfigValuesSet ¶
func (hec *HookExecutionConfig) ConfigValuesSet(path string, value interface{})
func (*HookExecutionConfig) ConfigValuesSetFromYaml ¶
func (hec *HookExecutionConfig) ConfigValuesSetFromYaml(path string, value []byte)
func (*HookExecutionConfig) GenerateAfterAllContext ¶
func (hec *HookExecutionConfig) GenerateAfterAllContext() hookcontext.GeneratedBindingContexts
GenerateAfterAllContext returns binding context for afterAll binding with all available snapshots.
func (*HookExecutionConfig) GenerateAfterDeleteHelmContext ¶
func (hec *HookExecutionConfig) GenerateAfterDeleteHelmContext() hookcontext.GeneratedBindingContexts
GenerateAfterDeleteHelmContext returns binding context for afterDeleteHelm binding with all available snapshots.
func (*HookExecutionConfig) GenerateAfterHelmContext ¶
func (hec *HookExecutionConfig) GenerateAfterHelmContext() hookcontext.GeneratedBindingContexts
GenerateAfterHelmContext returns binding context for afterHelm binding with all available snapshots.
func (*HookExecutionConfig) GenerateBeforeAllContext ¶
func (hec *HookExecutionConfig) GenerateBeforeAllContext() hookcontext.GeneratedBindingContexts
GenerateBeforeAllContext returns binding context for beforeAll binding with all available snapshots.
func (*HookExecutionConfig) GenerateBeforeHelmContext ¶
func (hec *HookExecutionConfig) GenerateBeforeHelmContext() hookcontext.GeneratedBindingContexts
GenerateBeforeHelmContext returns binding context for beforeHelm binding with all available snapshots.
func (*HookExecutionConfig) GenerateOnStartupContext ¶
func (hec *HookExecutionConfig) GenerateOnStartupContext() hookcontext.GeneratedBindingContexts
GenerateOnStartupContext returns binding context for OnStartup.
func (*HookExecutionConfig) GenerateScheduleContext ¶
func (hec *HookExecutionConfig) GenerateScheduleContext(crontab string) hookcontext.GeneratedBindingContexts
GenerateScheduleContext returns binding context for Schedule with needed snapshots.
func (*HookExecutionConfig) KubeClient ¶
func (hec *HookExecutionConfig) KubeClient() *klient.Client
func (*HookExecutionConfig) KubeStateSet ¶
func (hec *HookExecutionConfig) KubeStateSet(newKubeState string) hookcontext.GeneratedBindingContexts
func (*HookExecutionConfig) KubeStateSetAndWaitForBindingContexts ¶
func (hec *HookExecutionConfig) KubeStateSetAndWaitForBindingContexts(newKubeState string, _ int) hookcontext.GeneratedBindingContexts
func (*HookExecutionConfig) KubernetesGlobalResource ¶
func (hec *HookExecutionConfig) KubernetesGlobalResource(kind, name string) object_store.KubeObject
func (*HookExecutionConfig) KubernetesResource ¶
func (hec *HookExecutionConfig) KubernetesResource(kind, namespace, name string) object_store.KubeObject
func (*HookExecutionConfig) RegisterCRD ¶
func (hec *HookExecutionConfig) RegisterCRD(group, version, kind string, namespaced bool)
func (*HookExecutionConfig) RunGoHook ¶
func (hec *HookExecutionConfig) RunGoHook()
func (*HookExecutionConfig) RunHook ¶
func (hec *HookExecutionConfig) RunHook()
func (*HookExecutionConfig) ValuesDelete ¶
func (hec *HookExecutionConfig) ValuesDelete(path string)
func (*HookExecutionConfig) ValuesGet ¶
func (hec *HookExecutionConfig) ValuesGet(path string) library.KubeResult
func (*HookExecutionConfig) ValuesSet ¶
func (hec *HookExecutionConfig) ValuesSet(path string, value interface{})
func (*HookExecutionConfig) ValuesSetFromYaml ¶
func (hec *HookExecutionConfig) ValuesSetFromYaml(path string, value []byte)
type ShellOperatorHookConfig ¶
type ShellOperatorHookConfig struct { ConfigVersion interface{} `json:"configVersion,omitempty"` Kubernetes interface{} `json:"kubernetes,omitempty"` Schedule interface{} `json:"schedule,omitempty"` }
type TestMetricsCollector ¶
type TestMetricsCollector interface {
CollectedMetrics() []operation.MetricOperation
}