Documentation
¶
Index ¶
- Constants
- func ChangeAPIEndpoint(clusterName, oldEndpoint, newEndpoint, directory string, ...) error
- func GenerateInventoryFile(inventoryTemplate, outputDirectory string, data interface{}) error
- func GenerateLBBaseFiles(outputDirectory string, lbClustersInfo *LBClustersInfo) error
- type Ansible
- type EnvoyConfigTemplateParams
- type EnvoyTemplateParams
- type LBClusterRolesInfo
- type LBClustersInfo
- type LBInventoryFileParameters
- type LBcluster
- type NodeExporterTemplateParams
- type NodePools
- type ProxyInventoryFileParameters
- type UninstallNginxParams
Constants ¶
const (
// File name for the ansible inventory.
InventoryFileName = "inventory.ini"
)
Variables ¶
This section is empty.
Functions ¶
func ChangeAPIEndpoint ¶
func ChangeAPIEndpoint(clusterName, oldEndpoint, newEndpoint, directory string, spawnProcessLimit *semaphore.Weighted) error
ChangeAPIEndpoint will change the kubeadm configuration. It will set the Api endpoint of the cluster to the public IP of the newly selected ApiEndpoint node.
func GenerateInventoryFile ¶
GenerateInventoryFile generates an Ansible inventory file that defines the hosts and groups of hosts that Ansible can manage.
func GenerateLBBaseFiles ¶
func GenerateLBBaseFiles(outputDirectory string, lbClustersInfo *LBClustersInfo) error
GenerateLBBaseFiles generates the files like Ansible inventory file and SSH keys to be used by Ansible. Returns error if not successful, nil otherwise
Types ¶
type Ansible ¶
type Ansible struct {
RetryCount int
Playbook string
Inventory string
Flags string
Directory string
// SpawnProcessLimit limits the number of spawned ansible processes.
SpawnProcessLimit *semaphore.Weighted
}
func (*Ansible) RunAnsiblePlaybook ¶
RunAnsiblePlaybook executes ansible-playbook with the default forks of defaultAnsibleForks any additional flags like -l <name>, or --extra-vars <vars> include in flags parameter if command unsuccessful, the function will retry it until successful or maxAnsibleRetries reached all commands are executed with ANSIBLE_HOST_KEY_CHECKING set to false
type EnvoyConfigTemplateParams ¶ added in v0.9.11
type EnvoyConfigTemplateParams struct {
LoadBalancer string
Roles []LBClusterRolesInfo
}
type EnvoyTemplateParams ¶ added in v0.9.11
type LBClusterRolesInfo ¶
type LBClustersInfo ¶
type LBClustersInfo struct {
// LbClusters are Load-Balancers that share the targeted k8s cluster.
Lbs []*spec.LBcluster
// TargetK8sNodepool are all nodepools used by the targeted k8s cluster.
TargetK8sNodepool []*spec.NodePool
// ClusterID contains the ClusterName-Hash- prefix of the kubernetes cluster
ClusterID string
}
LBClustersInfo wraps all Load-balancers and Nodepools used for a single K8s cluster.
type NodeExporterTemplateParams ¶ added in v0.9.11
type ProxyInventoryFileParameters ¶ added in v0.9.1
type UninstallNginxParams ¶ added in v0.9.11
type UninstallNginxParams struct {
LoadBalancer string
}