operator

package
v1.19.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 102 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultValidators = map[schema.GroupVersionResource]Validator{
		scyllav1.GroupVersion.WithResource("scyllaclusters"): &GenericValidator[*scyllav1.ScyllaCluster]{
			ValidateCreateFunc:      validation.ValidateScyllaCluster,
			ValidateUpdateFunc:      validation.ValidateScyllaClusterUpdate,
			GetWarningsOnCreateFunc: validation.GetWarningsOnScyllaClusterCreate,
			GetWarningsOnUpdateFunc: validation.GetWarningsOnScyllaClusterUpdate,
		},
		scyllav1alpha1.GroupVersion.WithResource("nodeconfigs"): &GenericValidator[*scyllav1alpha1.NodeConfig]{
			ValidateCreateFunc:      validation.ValidateNodeConfig,
			ValidateUpdateFunc:      validation.ValidateNodeConfigUpdate,
			GetWarningsOnCreateFunc: validation.GetWarningsOnNodeConfigCreate,
			GetWarningsOnUpdateFunc: validation.GetWarningsOnNodeConfigUpdate,
		},
		scyllav1alpha1.GroupVersion.WithResource("scyllaoperatorconfigs"): &GenericValidator[*scyllav1alpha1.ScyllaOperatorConfig]{
			ValidateCreateFunc:      validation.ValidateScyllaOperatorConfig,
			ValidateUpdateFunc:      validation.ValidateScyllaOperatorConfigUpdate,
			GetWarningsOnCreateFunc: validation.GetWarningsOnScyllaOperatorConfigCreate,
			GetWarningsOnUpdateFunc: validation.GetWarningsOnScyllaOperatorConfigUpdate,
		},
		scyllav1alpha1.GroupVersion.WithResource("scylladbdatacenters"): &GenericValidator[*scyllav1alpha1.ScyllaDBDatacenter]{
			ValidateCreateFunc:      validation.ValidateScyllaDBDatacenter,
			ValidateUpdateFunc:      validation.ValidateScyllaDBDatacenterUpdate,
			GetWarningsOnCreateFunc: validation.GetWarningsOnScyllaDBDatacenterCreate,
			GetWarningsOnUpdateFunc: validation.GetWarningsOnScyllaDBDatacenterUpdate,
		},
		scyllav1alpha1.GroupVersion.WithResource("scylladbclusters"): &GenericValidator[*scyllav1alpha1.ScyllaDBCluster]{
			ValidateCreateFunc:      validation.ValidateScyllaDBCluster,
			ValidateUpdateFunc:      validation.ValidateScyllaDBClusterUpdate,
			GetWarningsOnCreateFunc: validation.GetWarningsOnScyllaDBClusterCreate,
			GetWarningsOnUpdateFunc: validation.GetWarningsOnScyllaDBClusterUpdate,
		},
		scyllav1alpha1.GroupVersion.WithResource("scylladbmanagerclusterregistrations"): &GenericValidator[*scyllav1alpha1.ScyllaDBManagerClusterRegistration]{
			ValidateCreateFunc:      validation.ValidateScyllaDBManagerClusterRegistration,
			ValidateUpdateFunc:      validation.ValidateScyllaDBManagerClusterRegistrationUpdate,
			GetWarningsOnCreateFunc: validation.GetWarningsOnScyllaDBManagerClusterRegistrationCreate,
			GetWarningsOnUpdateFunc: validation.GetWarningsOnScyllaDBManagerClusterRegistrationUpdate,
		},
		scyllav1alpha1.GroupVersion.WithResource("scylladbmanagertasks"): &GenericValidator[*scyllav1alpha1.ScyllaDBManagerTask]{
			ValidateCreateFunc:      validation.ValidateScyllaDBManagerTask,
			ValidateUpdateFunc:      validation.ValidateScyllaDBManagerTaskUpdate,
			GetWarningsOnCreateFunc: validation.GetWarningsOnScyllaDBManagerTaskCreate,
			GetWarningsOnUpdateFunc: validation.GetWarningsOnScyllaDBManagerTaskUpdate,
		},
		scyllav1alpha1.GroupVersion.WithResource("scylladbmonitorings"): &GenericValidator[*scyllav1alpha1.ScyllaDBMonitoring]{
			ValidateCreateFunc:      validation.ValidateScyllaDBMonitoring,
			ValidateUpdateFunc:      validation.ValidateScyllaDBMonitoringUpdate,
			GetWarningsOnCreateFunc: validation.GetWarningsOnScyllaDBMonitoringCreate,
			GetWarningsOnUpdateFunc: validation.GetWarningsOnScyllaDBMonitoringUpdate,
		},
	}
)

Functions

func NewCleanupJobCmd added in v1.10.0

func NewCleanupJobCmd(streams genericclioptions.IOStreams) *cobra.Command

func NewIgnitionCmd added in v1.14.0

func NewIgnitionCmd(streams genericclioptions.IOStreams) *cobra.Command

func NewMustGatherCmd added in v1.11.0

func NewMustGatherCmd(streams genericclioptions.IOStreams) *cobra.Command

func NewNodeSetupCmd added in v1.9.0

func NewNodeSetupCmd(streams genericclioptions.IOStreams) *cobra.Command

func NewOperatorCmd

func NewOperatorCmd(streams genericclioptions.IOStreams) *cobra.Command

func NewOperatorCommand added in v1.4.0

func NewOperatorCommand(streams genericclioptions.IOStreams) *cobra.Command

func NewRlimitsJobCmd added in v1.15.0

func NewRlimitsJobCmd(streams genericclioptions.IOStreams) *cobra.Command

func NewWebhookCmd added in v1.4.0

func NewWebhookCmd(streams genericclioptions.IOStreams, validators map[schema.GroupVersionResource]Validator) *cobra.Command

Types

type CleanupJobOptions added in v1.10.0

type CleanupJobOptions struct {
	ManagerAuthConfigPath string
	NodeAddress           string
	// contains filtered or unexported fields
}

func NewCleanupJobOptions added in v1.10.0

func NewCleanupJobOptions(streams genericclioptions.IOStreams) *CleanupJobOptions

func (*CleanupJobOptions) Complete added in v1.10.0

func (o *CleanupJobOptions) Complete() error

func (*CleanupJobOptions) Run added in v1.10.0

func (*CleanupJobOptions) Validate added in v1.10.0

func (o *CleanupJobOptions) Validate() error

type GatherBaseCLIFlags added in v1.19.0

type GatherBaseCLIFlags struct {
	DestDir                   string
	CollectManagedFields      bool
	LogsLimitBytes            int64
	KeepGoing                 bool
	ExcludeResources          []string
	IncludeSensitiveResources bool
}

GatherBaseCLIFlags holds the command-line flags for the gather base options. These are raw values directly from the command line. They need to be validated and processed before use.

func NewGatherBaseCLIFlags added in v1.19.0

func NewGatherBaseCLIFlags() *GatherBaseCLIFlags

NewGatherBaseCLIFlags creates a new GatherBaseCLIFlags with default values.

type GatherBaseOptions added in v1.11.0

type GatherBaseOptions struct {
	GathererName string
	ConfigFlags  *kgenericclioptions.ConfigFlags
	// contains filtered or unexported fields
}

func NewGatherBaseOptions added in v1.11.0

func NewGatherBaseOptions(gathererName string) *GatherBaseOptions

func (*GatherBaseOptions) AddFlags added in v1.11.0

func (o *GatherBaseOptions) AddFlags(flagset *pflag.FlagSet)

func (*GatherBaseOptions) Complete added in v1.11.0

func (o *GatherBaseOptions) Complete() error

func (*GatherBaseOptions) GetPrinters added in v1.11.0

func (*GatherBaseOptions) RunInit added in v1.11.0

func (o *GatherBaseOptions) RunInit(originalStreams genericclioptions.IOStreams, cmd *cobra.Command) error

func (*GatherBaseOptions) Validate added in v1.11.0

func (o *GatherBaseOptions) Validate() error

type GenericValidator added in v1.15.0

type GenericValidator[T ValidatableObject] struct {
	ValidateCreateFunc      func(obj T) field.ErrorList
	ValidateUpdateFunc      func(obj, oldObj T) field.ErrorList
	GetWarningsOnCreateFunc func(obj T) []string
	GetWarningsOnUpdateFunc func(obj, oldObj T) []string
}

func (*GenericValidator[T]) GetGroupKind added in v1.15.0

func (v *GenericValidator[T]) GetGroupKind(obj runtime.Object) schema.GroupKind

func (*GenericValidator[T]) GetName added in v1.15.0

func (v *GenericValidator[T]) GetName(obj runtime.Object) string

func (*GenericValidator[T]) GetWarningsOnCreate added in v1.19.0

func (v *GenericValidator[T]) GetWarningsOnCreate(obj runtime.Object) []string

func (*GenericValidator[T]) GetWarningsOnUpdate added in v1.19.0

func (v *GenericValidator[T]) GetWarningsOnUpdate(obj, oldObj runtime.Object) []string

func (*GenericValidator[T]) ValidateCreate added in v1.15.0

func (v *GenericValidator[T]) ValidateCreate(obj runtime.Object) field.ErrorList

func (*GenericValidator[T]) ValidateUpdate added in v1.15.0

func (v *GenericValidator[T]) ValidateUpdate(obj, oldObj runtime.Object) field.ErrorList

type IgnitionOptions added in v1.14.0

type IgnitionOptions struct {
	genericclioptions.ClientConfig
	genericclioptions.InClusterReflection
	probeserver.ServeProbesOptions

	ServiceName                       string
	NodesBroadcastAddressTypeString   string
	ClientsBroadcastAddressTypeString string
	// contains filtered or unexported fields
}

func NewIgnitionOptions added in v1.14.0

func NewIgnitionOptions(streams genericclioptions.IOStreams) *IgnitionOptions

func (*IgnitionOptions) AddFlags added in v1.14.0

func (o *IgnitionOptions) AddFlags(cmd *cobra.Command)

func (*IgnitionOptions) Complete added in v1.14.0

func (o *IgnitionOptions) Complete(args []string) error

func (*IgnitionOptions) Execute added in v1.14.0

func (o *IgnitionOptions) Execute(cmdCtx context.Context, originalStreams genericclioptions.IOStreams, cmd *cobra.Command) error

func (*IgnitionOptions) Run added in v1.14.0

func (o *IgnitionOptions) Run(originalStreams genericclioptions.IOStreams, cmd *cobra.Command) (returnErr error)

func (*IgnitionOptions) Validate added in v1.14.0

func (o *IgnitionOptions) Validate(args []string) error

type MustGatherOptions added in v1.11.0

type MustGatherOptions struct {
	*GatherBaseOptions

	AllResources bool
}

func NewMustGatherOptions added in v1.11.0

func NewMustGatherOptions(streams genericclioptions.IOStreams) *MustGatherOptions

func (*MustGatherOptions) AddFlags added in v1.11.0

func (o *MustGatherOptions) AddFlags(flagset *pflag.FlagSet)

func (*MustGatherOptions) Complete added in v1.11.0

func (o *MustGatherOptions) Complete() error

func (*MustGatherOptions) Run added in v1.11.0

func (o *MustGatherOptions) Run(originalStreams genericclioptions.IOStreams, cmd *cobra.Command) (returnErr error)

func (*MustGatherOptions) Validate added in v1.11.0

func (o *MustGatherOptions) Validate() error

type NodeSetupDaemonOptions added in v1.9.0

type NodeSetupDaemonOptions struct {
	genericclioptions.ClientConfig
	genericclioptions.InClusterReflection

	PodName        string
	NodeName       string
	NodeConfigName string
	NodeConfigUID  string
	ScyllaImage    string
	OperatorImage  string

	CRIEndpoints                []string
	KubeletPodResourcesEndpoint string
	// contains filtered or unexported fields
}

func NewNodeSetupOptions added in v1.9.0

func NewNodeSetupOptions(streams genericclioptions.IOStreams) *NodeSetupDaemonOptions

func (*NodeSetupDaemonOptions) Complete added in v1.9.0

func (o *NodeSetupDaemonOptions) Complete() error

func (*NodeSetupDaemonOptions) Run added in v1.9.0

func (*NodeSetupDaemonOptions) Validate added in v1.9.0

func (o *NodeSetupDaemonOptions) Validate() error

type OperatorOptions added in v1.4.0

type OperatorOptions struct {
	genericclioptions.ClientConfig
	genericclioptions.InClusterReflection
	genericclioptions.LeaderElection

	ConcurrentSyncs int
	OperatorImage   string
	CQLSIngressPort int

	CryptoKeySize          int
	CryptoKeyBufferSizeMin int
	CryptoKeyBufferSizeMax int
	CryptoKeyBufferDelay   time.Duration
	// contains filtered or unexported fields
}

func NewOperatorOptions added in v1.4.0

func NewOperatorOptions(streams genericclioptions.IOStreams) *OperatorOptions

func (*OperatorOptions) AddFlags added in v1.14.0

func (o *OperatorOptions) AddFlags(cmd *cobra.Command)

func (*OperatorOptions) Complete added in v1.4.0

func (o *OperatorOptions) Complete(cmd *cobra.Command) error

func (*OperatorOptions) Execute added in v1.14.0

func (*OperatorOptions) Run added in v1.4.0

func (*OperatorOptions) Validate added in v1.4.0

func (o *OperatorOptions) Validate() error

type RlimitsJobOptions added in v1.15.0

type RlimitsJobOptions struct {
	PID int
	// contains filtered or unexported fields
}

func NewRlimitsJobOptions added in v1.15.0

func NewRlimitsJobOptions(streams genericclioptions.IOStreams) *RlimitsJobOptions

func (*RlimitsJobOptions) Complete added in v1.15.0

func (o *RlimitsJobOptions) Complete() error

func (*RlimitsJobOptions) Run added in v1.15.0

func (*RlimitsJobOptions) Validate added in v1.15.0

func (o *RlimitsJobOptions) Validate() error

type ValidatableObject added in v1.15.0

type ValidatableObject interface {
	kubeinterfaces.ObjectInterface
	schema.ObjectKind
}

type Validator added in v1.15.0

type Validator interface {
	ValidateCreate(obj runtime.Object) field.ErrorList
	ValidateUpdate(obj, oldObj runtime.Object) field.ErrorList
	GetGroupKind(obj runtime.Object) schema.GroupKind
	GetName(obj runtime.Object) string
	GetWarningsOnCreate(obj runtime.Object) []string
	GetWarningsOnUpdate(obj, oldObj runtime.Object) []string
}

type WebhookOptions added in v1.4.0

type WebhookOptions struct {
	TLSCertFile, TLSKeyFile        string
	Port                           portFlag
	InsecureGenerateLocalhostCerts bool

	Validators map[schema.GroupVersionResource]Validator

	TLSConfig *tls.Config
	// contains filtered or unexported fields
}

func NewWebhookOptions added in v1.4.0

func NewWebhookOptions(streams genericclioptions.IOStreams, validators map[schema.GroupVersionResource]Validator) *WebhookOptions

func (*WebhookOptions) Complete added in v1.4.0

func (o *WebhookOptions) Complete() error

func (*WebhookOptions) Run added in v1.4.0

func (*WebhookOptions) Validate added in v1.4.0

func (o *WebhookOptions) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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