options

package
v0.5.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// SidecarMysql57Image is the image used in sidecar container to serve backups and configure MySQL
	SidecarMysql57Image string
	// SidecarMysql8Image as above but used when cluster uses mysql 8.0 and above
	SidecarMysql8Image string

	// MetricsExporterImage is the image for exporter container
	MetricsExporterImage string

	// ImagePullSecretName is the secret name where are found secrets for pulling images. This is
	// the default value and may be overwrite by the cluster .spec.podSpec.imagePullSecrets field.
	ImagePullSecretName string
	// ImagePullPolicy is the default image pull policy
	ImagePullPolicy corev1.PullPolicy

	// OrchestratorURI represents the URI where the Orchestrator can be reached.
	OrchestratorURI string
	// OrchestratorTopologyPassword is the password that is used by Orchestrator to connect to MySQL
	// nodes. This field is set in cluster secret as well.
	OrchestratorTopologyPassword string
	// OrchestratorTopologyUser is the user that is used by Orchestrator to connect to MySQL
	// nodes. This field is set in cluster secret as well.
	OrchestratorTopologyUser string

	// LeaderElectionNamespace the namespace where the lock resource will be created
	LeaderElectionNamespace string
	// LederElectionID the name of the lock resource
	LeaderElectionID string

	// Namespace where to look after objects. This will limit the operator action range.
	Namespace string

	// MySQLVersionImageOverride define a map between MySQL version and image.
	// This overrides the default versions and has priority.
	MySQLVersionImageOverride map[string]string

	// OrchestratorConcurrentReconciles sets the orchestrator controller workers
	OrchestratorConcurrentReconciles int32

	// FailoverBeforeShutdownEnabled if enabled inserts a pre-stop lifecycle hook into pod
	// to trigger a failover before shutdown
	FailoverBeforeShutdownEnabled bool

	// AllowCrossNamespaceUser allow creating users resources in clusters that are not in the same namespace.
	AllowCrossNamespaceUsers bool

	// AllowCrossNamespaceDatabase allow creating users resources in clusters that are not in the same namespace.
	AllowCrossNamespaceDatabases bool
}

Options is the data structure that contains information about mysql operator configuration

func GetOptions

func GetOptions() *Options

GetOptions returns a singleton that contains all options

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

AddFlags registers all mysql-operator needed flags

func (*Options) Validate

func (o *Options) Validate() error

Validate validate the command line values

Jump to

Keyboard shortcuts

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