Documentation
¶
Index ¶
- Constants
- func GetFullState(client *rancher.Client) (state *cluster.FullState, err error)
- func NewClusterFile(state *cluster.FullState, dirName string, config *Config) (clusterFilePath string, err error)
- func NewRKEConfigs(client *rancher.Client) (stateFilePath, clusterFilePath string, err error)
- func NewStateFile(state *cluster.FullState, dirName string) (stateFilePath string, err error)
- func ReadClusterFromStateFile(stateFilePath string) (*v3.RancherKubernetesEngineConfig, error)
- func Up(clusterFilePath string, args ...string) error
- func UpdateKubernetesVersion(kubernetesVersion, clusterFilePath string) error
- type Config
Constants ¶
const ConfigurationFileKey = "rke"
Variables ¶
This section is empty.
Functions ¶
func GetFullState ¶
GetFullState is a function that gets RKE full state from "full-cluster-state" secret. And returns the cluster full state.
func NewClusterFile ¶
func NewClusterFile(state *cluster.FullState, dirName string, config *Config) (clusterFilePath string, err error)
NewClusterFile is a function that generates new cluster.yml file from the full state. Returns the generated file's path.
func NewRKEConfigs ¶
NewRKEConfigs creates a new dir. In that dir, it generates state and cluster files from the state configmap. Returns generated state and cluster files' paths.
func NewStateFile ¶
NewStateFile is a function that generates new cluster.rkestate file from the full state. Returns the generated file's path.
func ReadClusterFromStateFile ¶
func ReadClusterFromStateFile(stateFilePath string) (*v3.RancherKubernetesEngineConfig, error)
ReadClusterFromStateFile is a function that reads the RKE config from the given state file path. Returns RKE config.
func Up ¶
Up uses RKE CLI up command. Cluster file path arg points to the cluster.yml file, args appended to the command.
func UpdateKubernetesVersion ¶
UpdateKubernetesVersion is a function that updates kubernetes version value in cluster.yml file.