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 `yaml:"matchExpressions" json:"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 `yaml:"name" json:"name"` // APIVersion of objects. "v1" is used if not set. APIVersion string `yaml:"apiVersion,omitempty" json:"apiVersion,omitempty"` // Kind of objects. Kind string `yaml:"kind,omitempty" json:"kind,omitempty"` // NameSelector used to subscribe on object by its name. NameSelector *NameSelector `yaml:"nameSelector,omitempty" json:"nameSelector,omitempty"` // NamespaceSelector used to subscribe on objects in namespaces. NamespaceSelector *NamespaceSelector `yaml:"namespace,omitempty" json:"namespace,omitempty"` // LabelSelector used to subscribe on objects by matching their labels. LabelSelector *metav1.LabelSelector `yaml:"labelSelector,omitempty" 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 `yaml:"fieldSelector,omitempty" 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 `yaml:"executeHookOnEvent,omitempty" json:"executeHookOnEvent,omitempty"` // ExecuteHookOnSynchronization is true by default. Set to false if only snapshot update is needed. // true || false ExecuteHookOnSynchronization *bool `yaml:"executeHookOnSynchronization,omitempty" json:"executeHookOnSynchronization,omitempty"` // WaitForSynchronization is true by default. Set to false if beforeHelm is not required this snapshot on start. // true || false WaitForSynchronization *bool `yaml:"waitForSynchronization,omitempty" json:"waitForSynchronization,omitempty"` // false by default // if JQ filter is empty - KeepFullObjectsInMemory always true KeepFullObjectsInMemory *bool `yaml:"keepFullObjectsInMemory,omitempty" json:"keepFullObjectsInMemory,omitempty"` // JQ filter to filter results from kubernetes objects JqFilter string `yaml:"jqFilter,omitempty" json:"jqFilter,omitempty"` AllowFailure *bool `yaml:"allowFailure,omitempty" json:"allowFailure,omitempty"` ResynchronizationPeriod string `yaml:"resynchronizationPeriod,omitempty" json:"resynchronizationPeriod,omitempty"` IncludeSnapshotsFrom []string `yaml:"includeSnapshotsFrom,omitempty" json:"includeSnapshotsFrom,omitempty"` Queue string `yaml:"queue,omitempty" json:"queue,omitempty"` }
type NameSelector ¶
type NameSelector struct {
MatchNames []string `yaml:"matchNames" json:"matchNames"`
}
type NamespaceSelector ¶
type NamespaceSelector struct { NameSelector *NameSelector `yaml:"nameSelector,omitempty" json:"nameSelector,omitempty"` LabelSelector *metav1.LabelSelector `yaml:"labelSelector,omitempty" json:"labelSelector,omitempty"` }
type ReadinessConfig ¶
type ScheduleConfig ¶
Click to show internal directories.
Click to hide internal directories.