options

package
v0.0.0-...-c2ba8ab Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: Apache-2.0 Imports: 9 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 {
	MySQLServerImage string `yaml:"mysqlServer"`
	MySQLAgentImage  string `yaml:"mysqlAgent"`
}

Images is the configuration of required MySQLOperator images. Remember to configure the appropriate credentials for the target repositories.

type MySQLOperatorServer

type MySQLOperatorServer 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"`
}

MySQLOperatorServer holds the options for the MySQLOperator.

func NewMySQLOperatorServer

func NewMySQLOperatorServer(filePath string) (*MySQLOperatorServer, error)

NewMySQLOperatorServer will create a new MySQLOperatorServer. 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 (*MySQLOperatorServer) AddFlags

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

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

func (*MySQLOperatorServer) EnsureDefaults

func (s *MySQLOperatorServer) 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