operator

package
v0.0.0-...-e07045a Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: BSD-3-Clause, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Images

type Images struct {
	MySQLAgentImage         string `yaml:"mysqlAgent"`
	DefaultMySQLServerImage string `yaml:"defaultMysqlServer"`
}

Images is the configuration of required MySQLOperator images. Remember to configure the appropriate credentials for the target repositories. The DefaultMySQLServerImage can be overridden on a per-cluster basis by setting the Repository field.

type MySQLOperatorOpts

type MySQLOperatorOpts struct {
	// KubeConfig is the path to a kubeconfig file, specifying how to connect to
	// the API server.
	KubeConfig string `yaml:"kubeconfig"`

	// Master is the address of the Kubernetes API server (overrides any value
	// in kubeconfig).
	Master string `yaml:"master"`

	// Namespace is the (optional) namespace in which the MySQL operator will
	// manage MySQL Clusters. Defaults to metav1.NamespaceAll.
	Namespace string `yaml:"namespace"`

	// Hostname of the pod the operator is running in.
	Hostname string `yaml:"hostname"`

	// Images defines the 'mysql-server' and 'mysql-agent' images to use.
	Images Images `yaml:"images"`

	// minResyncPeriod is the resync period in reflectors; will be random
	// between minResyncPeriod and 2*minResyncPeriod.
	MinResyncPeriod metav1.Duration `yaml:"minResyncPeriod"`
}

MySQLOperatorOpts holds the options for the MySQLOperator.

func NewMySQLOperatorOpts

func NewMySQLOperatorOpts(filePath string) (*MySQLOperatorOpts, error)

NewMySQLOperatorOpts will create a new MySQLOperatorOpts. If a valid config file is specified and exists, it will be used to initialise the server. Otherwise, a default server will be created.

The values specified by either default may later be customised and overidden by user specified commandline parameters.

func (*MySQLOperatorOpts) AddFlags

func (s *MySQLOperatorOpts) AddFlags(fs *pflag.FlagSet) *pflag.FlagSet

AddFlags adds the mysql-operator flags to a given FlagSet.

func (*MySQLOperatorOpts) EnsureDefaults

func (s *MySQLOperatorOpts) EnsureDefaults()

EnsureDefaults provides a default configuration when required values have not been set.

Jump to

Keyboard shortcuts

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