Documentation
¶
Index ¶
Constants ¶
View Source
const BatchHookConfigV1 = "v1"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchHookConfig ¶
type BatchHookConfig struct { Version string `yaml:"version" json:"version"` Hooks []HookConfig `yaml:"hooks" json:"hooks"` Readiness *HookConfig `yaml:"readiness,omitempty" json:"readiness,omitempty"` }
type FieldSelector ¶
type FieldSelector struct {
MatchExpressions []FieldSelectorRequirement `json:"matchExpressions" yaml:"matchExpressions"`
}
type FilterFunc ¶
type FilterFunc func(*unstructured.Unstructured) (FilterResult, error)
type FilterResult ¶
type FilterResult any
type GoHookMetadata ¶
type HookConfig ¶
type HookConfig struct { ConfigVersion string `yaml:"configVersion" json:"configVersion"` Metadata GoHookMetadata `yaml:"metadata" json:"metadata"` Schedule []ScheduleConfig `yaml:"schedule,omitempty" json:"schedule,omitempty"` Kubernetes []KubernetesConfig `yaml:"kubernetes,omitempty" json:"kubernetes,omitempty"` // OnStartup runs hook on module/global startup // Attention! During the startup you don't have snapshots available // use native KubeClient to fetch resources OnStartup *uint `yaml:"onStartup,omitempty" json:"onStartup,omitempty"` OnBeforeHelm *uint `yaml:"beforeHelm,omitempty" json:"beforeHelm,omitempty"` OnAfterHelm *uint `yaml:"afterHelm,omitempty" json:"afterHelm,omitempty"` OnAfterDeleteHelm *uint `yaml:"afterDeleteHelm,omitempty" json:"afterDeleteHelm,omitempty"` AllowFailure *bool `yaml:"allowFailure,omitempty" json:"allowFailure,omitempty"` Settings *HookConfigSettings `yaml:"settings,omitempty" json:"settings,omitempty"` LogLevelRaw string `yaml:"logLevel,omitempty" json:"logLevel,omitempty"` }
type HookConfigSettings ¶
type HookConfigSettings struct { ExecutionMinInterval time.Duration `yaml:"executionMinInterval,omitempty" json:"executionMinInterval,omitempty"` ExecutionBurst int `yaml:"executionBurst,omitempty" json:"executionBurst,omitempty"` // EnableSchedulesOnStartup // set to true, if you need to run 'Schedule' hooks without waiting addon-operator readiness EnableSchedulesOnStartup *bool `yaml:"enableSchedulesOnStartup,omitempty" json:"enableSchedulesOnStartup,omitempty"` }
type KubernetesConfig ¶
type KubernetesConfig struct { Name string `json:"name"` // APIVersion of objects. "v1" is used if not set. APIVersion string `json:"apiVersion,omitempty"` // Kind of objects. Kind string `json:"kind,omitempty"` // NameSelector used to subscribe on object by its name. NameSelector *NameSelector `json:"nameSelector,omitempty"` // NamespaceSelector used to subscribe on objects in namespaces. NamespaceSelector *NamespaceSelector `json:"namespace,omitempty"` // LabelSelector used to subscribe on objects by matching their labels. LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"` // FieldSelector used to subscribe on objects by matching specific fields (the list of fields is narrow, see shell-operator documentation). FieldSelector *FieldSelector `json:"fieldSelector,omitempty"` // ExecuteHookOnEvents is true by default. Set to false if only snapshot update is needed. // *bool --> ExecuteHookOnEvents: [All events] || empty slice || nil ExecuteHookOnEvents *bool `json:"executeHookOnEvent,omitempty"` // ExecuteHookOnSynchronization is true by default. Set to false if only snapshot update is needed. // true || false ExecuteHookOnSynchronization *bool `json:"executeHookOnSynchronization,omitempty"` // WaitForSynchronization is true by default. Set to false if beforeHelm is not required this snapshot on start. // true || false WaitForSynchronization *bool `json:"waitForSynchronization,omitempty"` // false by default // if JQ filter is empty - KeepFullObjectsInMemory always true KeepFullObjectsInMemory *bool `json:"keepFullObjectsInMemory,omitempty"` // JQ filter to filter results from kubernetes objects JqFilter string `json:"jqFilter,omitempty"` AllowFailure *bool `json:"allowFailure,omitempty"` ResynchronizationPeriod string `json:"resynchronizationPeriod,omitempty"` IncludeSnapshotsFrom []string `json:"includeSnapshotsFrom,omitempty"` Queue string `json:"queue,omitempty"` }
type NameSelector ¶
type NameSelector struct {
MatchNames []string `json:"matchNames" yaml:"matchNames"`
}
type NamespaceSelector ¶
type NamespaceSelector struct { NameSelector *NameSelector `json:"nameSelector,omitempty" yaml:"nameSelector,omitempty"` LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty" yaml:"labelSelector,omitempty"` }
type ReadinessConfig ¶
type ScheduleConfig ¶
Click to show internal directories.
Click to hide internal directories.