Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChildCR ¶
type ChildCR interface {
client.Object
GetFlatSpec() *supersetv1alpha1.FlatComponentSpec
GetConfig() string
GetConfigChecksum() string
GetService() *supersetv1alpha1.ComponentServiceSpec
GetAutoscaling() *supersetv1alpha1.AutoscalingSpec
GetPDB() *supersetv1alpha1.PDBSpec
GetComponentStatus() *supersetv1alpha1.ChildComponentStatus
}
ChildCR is implemented by all child CRD types for generic reconciliation.
type ChildControllerDef ¶
type ChildControllerDef struct {
Name string
// contains filtered or unexported fields
}
ChildControllerDef defines the data needed to register a child controller.
func ChildControllerDefs ¶
func ChildControllerDefs() []ChildControllerDef
ChildControllerDefs returns the definitions for all child controllers.
type ChildReconciler ¶
type ChildReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder events.EventRecorder
Config childReconcilerConfig
NewObj func() ChildCR
}
ChildReconciler is a generic reconciler for all child CRDs.
func NewChildReconciler ¶
func NewChildReconciler(c client.Client, s *runtime.Scheme, r events.EventRecorder, def ChildControllerDef) *ChildReconciler
NewChildReconciler creates a ChildReconciler from a ChildControllerDef.
func (*ChildReconciler) SetupWithManager ¶
func (r *ChildReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager registers the controller with the manager.
type DeploymentConfig ¶
type DeploymentConfig struct {
// ContainerName is the name of the main container (e.g. "superset-web-server").
ContainerName string
// DefaultCommand is used when the spec Command is empty.
DefaultCommand []string
// DefaultArgs is used when the spec Args is empty.
DefaultArgs []string
// DefaultPorts are the container ports when none are specified on the spec.
DefaultPorts []corev1.ContainerPort
// ForceReplicas, when non-nil, overrides the spec replicas (used for singletons like beat).
ForceReplicas *int32
}
DeploymentConfig holds the component-specific defaults needed to build a Deployment for any Superset child component.
type SupersetLifecycleTaskReconciler ¶
type SupersetLifecycleTaskReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder events.EventRecorder
}
SupersetLifecycleTaskReconciler reconciles a SupersetLifecycleTask object. It manages the initialization lifecycle (database migrations, init commands) by running bare Pods instead of Deployments.
func (*SupersetLifecycleTaskReconciler) SetupWithManager ¶
func (r *SupersetLifecycleTaskReconciler) SetupWithManager(mgr ctrl.Manager) error
type SupersetReconciler ¶
type SupersetReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder events.EventRecorder
}
SupersetReconciler reconciles a Superset object.
func (*SupersetReconciler) SetupWithManager ¶
func (r *SupersetReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type VersionDirection ¶
type VersionDirection string
VersionDirection represents the relationship between two image versions.
const ( DirectionUpgrade VersionDirection = "Upgrade" DirectionDowngrade VersionDirection = "Downgrade" DirectionRebuild VersionDirection = "Rebuild" DirectionUnknown VersionDirection = "Unknown" )
func CompareVersions ¶
func CompareVersions(oldTag, newTag string) VersionDirection
CompareVersions determines the direction between two image tags. Returns Upgrade if newTag > oldTag, Downgrade if newTag < oldTag, Rebuild if equal, or Unknown if either tag is not valid semver.