Documentation ¶
Index ¶
- Constants
- Variables
- type ClusterAccessDefinition
- type ClusterAccessDefinitions
- type ClusterConfig
- func (c ClusterConfig) ConfigurePath(term ioutils.Terminal, clusterConfigName, component string) (string, error)
- func (c ClusterConfig) GetNamespaceParam() string
- func (c ClusterConfig) GetServerParam() string
- func (c ClusterConfig) InstallPath(term ioutils.Terminal, clusterConfigName, component string) (string, error)
- func (c ClusterConfig) Path(term ioutils.Terminal, clusterConfigName, section, component string) (string, error)
- type ClusterDefinition
- type ClusterNamespaces
- type ClusterType
- type KsctlConfig
Constants ¶
const HostName = "host"
Variables ¶
var ( ConfigFileFlag string Verbose bool )
var ClusterTypes = []ClusterType{Host, Member}
Functions ¶
This section is empty.
Types ¶
type ClusterAccessDefinition ¶
type ClusterAccessDefinition struct { ClusterDefinition `yaml:",inline"` Token string `yaml:"token"` }
func LoadClusterAccessDefinition ¶
func LoadClusterAccessDefinition(term ioutils.Terminal, clusterName string) (ClusterAccessDefinition, error)
LoadClusterAccessDefinition loads ClusterAccessDefinition object from the config file and checks that all required parameters are set
type ClusterAccessDefinitions ¶
type ClusterAccessDefinitions map[string]ClusterAccessDefinition
type ClusterConfig ¶
type ClusterConfig struct { ClusterAccessDefinition AllClusterNames []string ClusterName string Token string OperatorNamespace string // namespace where either the host-operator or the member-operator is deployed (depends on the cluster context) }
ClusterConfig contains all parameters of a cluster loaded from KsctlConfig plus all cluster names defined in the KsctlConfig
func LoadClusterConfig ¶
func LoadClusterConfig(term ioutils.Terminal, clusterName string) (ClusterConfig, error)
LoadClusterConfig loads ClusterConfig object from the config file and checks that all required parameters are set as well as the token for the given name
func (ClusterConfig) ConfigurePath ¶
func (c ClusterConfig) ConfigurePath(term ioutils.Terminal, clusterConfigName, component string) (string, error)
ConfigurePath returns the path to the 'configure' directory, using the clusterConfigName arg if it's not empty, or the Host cluster's server name (even if the current config applies to a Member cluster)
func (ClusterConfig) GetNamespaceParam ¶
func (c ClusterConfig) GetNamespaceParam() string
GetNamespaceParam returns the `--namespace=` param along with its actual value
func (ClusterConfig) GetServerParam ¶
func (c ClusterConfig) GetServerParam() string
GetServerParam returns the `--server=` param along with its actual value
func (ClusterConfig) InstallPath ¶
func (c ClusterConfig) InstallPath(term ioutils.Terminal, clusterConfigName, component string) (string, error)
InstallPath returns the path to the 'install' directory, using the clusterConfigName arg if it's not empty, or the Host cluster's server name (even if the current config applies to a Member cluster)
func (ClusterConfig) Path ¶
func (c ClusterConfig) Path(term ioutils.Terminal, clusterConfigName, section, component string) (string, error)
Path returns the path to the directory for the given action, using the clusterConfigName arg if it's not empty, or the Host cluster's server name (even if the current config applies to a Member cluster)
type ClusterDefinition ¶
type ClusterDefinition struct { ClusterType ClusterType `yaml:"clusterType"` ServerAPI string `yaml:"serverAPI"` ServerName string `yaml:"serverName"` }
type ClusterNamespaces ¶
type ClusterType ¶
type ClusterType string
var Host ClusterType = "host"
var Member ClusterType = "member"
func (ClusterType) AsSuffix ¶
func (cluster ClusterType) AsSuffix(prefix string) string
func (ClusterType) String ¶
func (cluster ClusterType) String() string
func (ClusterType) TheOtherType ¶
func (cluster ClusterType) TheOtherType() ClusterType
type KsctlConfig ¶
type KsctlConfig struct { ClusterAccessDefinitions `yaml:",inline"` Name string `yaml:"name"` }