Documentation ¶
Overview ¶
Code generated automatically by 'go run codegen/ansible/main.go --src ./templates/ansible --dst ./code.go'; DO NOT EDIT.
Index ¶
- Constants
- Variables
- func GetPrivateKey(platformConfig map[string]interface{}) (string, error)
- type AllInventory
- type AnsibleClient
- type AnsibleHostStat
- type AnsibleStats
- type AnsibleStatsMap
- type AnsibleTask
- type AnsibleTaskItem
- type Children
- type Command
- func (c *Command) Copy(from, to string, forceFiles, backupFiles, sudoFiles bool, ...) error
- func (c *Command) CopyFrom(from, to string, forceFiles, backupFiles, sudoFiles bool, ...) error
- func (c *Command) CopyTo(from, to string, forceFiles, backupFiles, sudoFiles bool, ...) error
- func (c *Command) Exec(command, script string, sudoExec bool) (*ssh.CommandResult, error)
- type Config
- type Configurator
- type Host
- type Hosts
- type Inventory
- type InventoryHost
- type InventoryHosts
- type InventoryVariables
- type KubeCluster
- type PodsPhaseCount
Constants ¶
const ( AnsibleStatusOk = "ok" AnsibleStatusFailed = "failed" )
Ansible status possible values
const ( MaxEmptyTaskRetries = 5 MaxFailedTaskRetries = 10 MaxFailedStatsRetries = 5 SecondsTickTasks = 5 SecondsTickStats = 10 )
Maximum number retries and frecuency to get tasks and status
const ( CheckAnsibleCMD = "test -f /usr/bin/ansible && echo OK || echo NOK" AnsibleVersionCMD = "/usr/bin/ansible --version 2>/dev/null | head -1" InstallAnsibleCMD = "test -f /usr/bin/ansible || ( sudo easy_install pip && sudo pip install ansible Flask )" GetEpochCMD = "date +%s" )
Remote commands to check and install Ansible
const ConfiguratorBaseDir = KubekitBaseDir + "/configurator"
ConfiguratorBaseDir is the home directory to store the configurator files in every node
const ConfiguratorLogDir = "/var/log/kubekit"
ConfiguratorLogDir is the log directory to store the configurator logs in every node
const KubeKitConfiguratorPort = 1080
KubeKitConfiguratorPort is the port used by the KubeKit Ansible callback to expose the Ansible playbook logs
const KubekitBaseDir = "/var/kubekit"
KubekitBaseDir is the kubekit installation directory on every node
const TLSDirectory = "/etc/pki"
TLSDirectory is the directory to upload the CA root certificates at the nodes
const ZeroPadLen = 3
ZeroPadLen is the length for the number following the role of the node. i.e. master001
Variables ¶
var ( Data string AnsibleCfg string Callback string Playbook string Resources map[string]string )
variables containing the Ansible files such as the roles (in zip format), configuration and playbook. These variables values are generated by `codegen/ansible/main.go` using the go generate statement above.
var ValidAddressInventoryFields = map[string]struct{}{
"ansible_host": struct{}{},
"private_ip": struct{}{},
"public_ip": struct{}{},
"private_dns": struct{}{},
"public_dns": struct{}{},
"fqdn": struct{}{},
"hostname": struct{}{},
"hostname_short": struct{}{},
"kubelet_taints": struct{}{},
"kubelet_labels": struct{}{},
}
ValidAddressInventoryFields is a lookup for valid InventoryHost address fields the key names must match the values given in the yaml tag for the InventoryHost fields used for addressing
Functions ¶
func GetPrivateKey ¶
GetPrivateKey return the private key from the cluster platform configuration
Types ¶
type AllInventory ¶
type AllInventory struct { Variables InventoryVariables `json:"vars,omitempty" yaml:"vars" mapstructure:"vars"` Children Children `json:"children,omitempty" yaml:"children" mapstructure:"children"` }
AllInventory contain all the variables and childrens of the Ansible inventory
type AnsibleClient ¶
type AnsibleClient struct { Hostname string Tasks []AnsibleTask Stats *AnsibleStats // contains filtered or unexported fields }
AnsibleClient handle the Ansible connection with the Ansible Callback API
func (*AnsibleClient) PrintLogs ¶
func (a *AnsibleClient) PrintLogs()
PrintLogs prints to a given logger the ansible
type AnsibleHostStat ¶
type AnsibleHostStat struct { Changed int `json:"changed"` Failures int `json:"failures"` Ok int `json:"ok"` Skipped int `json:"skipped"` Unreachable int `json:"unreachable"` }
AnsibleHostStat contain the Ansible stats per host
type AnsibleStats ¶
type AnsibleStats struct { Duration float32 `json:"duration"` Status string `json:"status"` Stats map[string]AnsibleHostStat `json:"stats"` }
AnsibleStats encapsulate all the stats
func (*AnsibleStats) Empty ¶
func (stats *AnsibleStats) Empty() bool
Empty returns true if this stats hasn't been collected
func (*AnsibleStats) Log ¶
func (stats *AnsibleStats) Log(failedTasks []AnsibleTask, logger *log.Logger)
Log print the stats to a logger
func (*AnsibleStats) String ¶
func (stats *AnsibleStats) String() string
type AnsibleStatsMap ¶
type AnsibleStatsMap struct { sync.RWMutex Results map[string]*AnsibleStats }
AnsibleStatsMap is a type safe map wrapped with mutex locks around get/set calls where the keys are the role name and values are references to AnsibleStats
func NewAnsibleStatsMap ¶
func NewAnsibleStatsMap(size int) AnsibleStatsMap
NewAnsibleStatsMap initializes/makes the AnsibleStatsMap map
func (*AnsibleStatsMap) GetSnapshot ¶
func (asm *AnsibleStatsMap) GetSnapshot() map[string]*AnsibleStats
GetSnapshot returns a snapshot of the given AnsibleStatsMap
func (*AnsibleStatsMap) Store ¶
func (asm *AnsibleStatsMap) Store(key string, value *AnsibleStats)
Store updates the value at the given key in the given AnsibleStatsMap
type AnsibleTask ¶
type AnsibleTask struct { Name string `json:"name"` UUID string `json:"uuid"` Status string `json:"status"` Changed bool `json:"changed"` Node string `json:"node"` Items []AnsibleTaskItem `json:"items"` }
AnsibleTask contain the results of a task execution
func (AnsibleTask) Report ¶
func (t AnsibleTask) Report(uI *ui.UI)
Report prints the task to the UI and Logs
func (AnsibleTask) String ¶
func (t AnsibleTask) String() string
type AnsibleTaskItem ¶
type AnsibleTaskItem struct { Name string `json:"name"` Status string `json:"status"` Changed bool `json:"changed"` Node string `json:"node"` }
AnsibleTaskItem contain the results of the items in a tasks (if any)
func (AnsibleTaskItem) Log ¶
func (i AnsibleTaskItem) Log(logger *log.Logger)
Log print the task item to a logger
func (AnsibleTaskItem) String ¶
func (i AnsibleTaskItem) String() string
type Children ¶
type Children struct {
KubeCluster KubeCluster `json:"kube_cluster,omitempty" yaml:"kube_cluster" mapstructure:"kube_cluster"`
}
Children is a children structure in an Ansible inventory
type Command ¶
type Command struct { Hosts Hosts // contains filtered or unexported fields }
Command is a command to execute in a cluster node or to/from it
func NewCommand ¶
NewCommand returns a new command
func (*Command) Copy ¶
func (c *Command) Copy(from, to string, forceFiles, backupFiles, sudoFiles bool, owner, group, mode string) error
Copy copies files from/to the cluster hosts
func (*Command) CopyFrom ¶
func (c *Command) CopyFrom(from, to string, forceFiles, backupFiles, sudoFiles bool, owner, group, mode string) error
CopyFrom copies files from the cluster hosts to localhost
type Config ¶
type Config struct { ShellEditingMode string `json:"shell_editing_mode,omitempty" yaml:"shell_editing_mode,omitempty" mapstructure:"shell_editing_mode,omitempty"` AddressInventoryField string `json:"address_inventory_field" yaml:"address_inventory_field" mapstructure:"address_inventory_field"` EtcdInitialClusterToken string `json:"etcd_initial_cluster_token" yaml:"etcd_initial_cluster_token" mapstructure:"etcd_initial_cluster_token"` KubeletMaxPods int `json:"kubelet_max_pods" yaml:"kubelet_max_pods" mapstructure:"kubelet_max_pods"` KubeletSerializeImagePulls bool `` /* 148-byte string literal not displayed */ KubeProxyMode string `json:"kube_proxy_mode,omitempty" yaml:"kube_proxy_mode,omitempty" mapstructure:"kube_proxy_mode,omitempty"` KubeClusterCidr string `json:"kube_cluster_cidr" yaml:"kube_cluster_cidr" mapstructure:"kube_cluster_cidr"` KubeServicesCidr string `json:"kube_services_cidr" yaml:"kube_services_cidr" mapstructure:"kube_services_cidr"` KubeServiceIP string `json:"kube_service_ip" yaml:"kube_service_ip" mapstructure:"kube_service_ip"` KubeAdvertiseAddress string `json:"kube_advertise_address" yaml:"kube_advertise_address" mapstructure:"kube_advertise_address"` MasterSchedulableEnabled bool `json:"master_schedulable_enabled" yaml:"master_schedulable_enabled" mapstructure:"master_schedulable_enabled"` EtcdLocalProxyEnabled bool `json:"enable_etcd_local_proxy" yaml:"enable_etcd_local_proxy" mapstructure:"enable_etcd_local_proxy"` DockerMaxConcurrentUploads int `` /* 148-byte string literal not displayed */ DockerMaxConcurrentDownloads int `` /* 154-byte string literal not displayed */ DockerLogMaxFiles string `json:"docker_log_max_files,omitempty" yaml:"docker_log_max_files,omitempty" mapstructure:"docker_log_max_files"` // docker config takes it as a string DockerLogMaxSize string `json:"docker_log_max_size,omitempty" yaml:"docker_log_max_size,omitempty" mapstructure:"docker_log_max_size"` DockerRegistryPort int `json:"registry_port" yaml:"registry_port" mapstructure:"registry_port"` DockerRegistryPath string `json:"docker_registry_path" yaml:"docker_registry_path" mapstructure:"docker_registry_path"` DownloadImagesIfMissing bool `json:"download_images_if_missing" yaml:"download_images_if_missing" mapstructure:"download_images_if_missing"` HAProxyClientTimeout string `json:"haproxy_client_timeout,omitempty" yaml:"haproxy_client_timeout,omitempty" mapstructure:"haproxy_client_timeout"` HAProxyServerTimeout string `json:"haproxy_server_timeout,omitempty" yaml:"haproxy_server_timeout,omitempty" mapstructure:"haproxy_server_timeout"` DNSAAAADelayEnabled *bool `json:"dns_aaaa_delay_enabled,omitempty" yaml:"dns_aaaa_delay_enabled,omitempty" mapstructure:"dns_aaaa_delay_enabled"` DNSArgs string `json:"dns_args" yaml:"dns_args" mapstructure:"dns_args"` EtcdDefragCrontabHour string `json:"etcd_defrag_crontab_hour,omitempty" yaml:"etcd_defrag_crontab_hour,omitempty" mapstructure:"etcd_defrag_crontab_hour"` EtcdLogsCrontabHour string `json:"etcd_logs_crontab_hour" yaml:"etcd_logs_crontab_hour" mapstructure:"etcd_logs_crontab_hour"` EtcdLogsCrontabMinute string `json:"etcd_logs_crontab_minute" yaml:"etcd_logs_crontab_minute" mapstructure:"etcd_logs_crontab_minute"` EtcdLogsDaysToKeep int `json:"etcd_logs_days_to_keep" yaml:"etcd_logs_days_to_keep" mapstructure:"etcd_logs_days_to_keep"` EtcdSnapshotsDirectory string `json:"etcd_snapshots_directory,omitempty" yaml:"etcd_snapshots_directory,omitempty" mapstructure:"etcd_snapshots_directory"` UseLocalImages bool `json:"use_local_images" yaml:"use_local_images" mapstructure:"use_local_images"` ClusterIfaceName string `json:"cluster_iface_name" yaml:"cluster_iface_name" mapstructure:"cluster_iface_name"` ClusterIface string `json:"cluster_iface" yaml:"cluster_iface" mapstructure:"cluster_iface"` CniIface string `json:"cni_iface" yaml:"cni_iface" mapstructure:"cni_iface"` KubeAuditLogMaxAge int `json:"kube_audit_log_max_age" yaml:"kube_audit_log_max_age" mapstructure:"kube_audit_log_max_age"` KubeAuditLogMaxBackup int `json:"kube_audit_log_max_backup" yaml:"kube_audit_log_max_backup" mapstructure:"kube_audit_log_max_backup"` KubeAuditLogMaxSize int `json:"kube_audit_log_max_size" yaml:"kube_audit_log_max_size" mapstructure:"kube_audit_log_max_size"` NginxIngressEnabled bool `json:"nginx_ingress_enabled" yaml:"nginx_ingress_enabled" mapstructure:"nginx_ingress_enabled"` NginxIngressControllerProxyBodySize string `` /* 151-byte string literal not displayed */ NginxIngressControllerErrorLogLevel string `` /* 151-byte string literal not displayed */ NginxIngressControllerSslProtocols string `` /* 145-byte string literal not displayed */ NginxIngressControllerProxyReadTimeout string `` /* 160-byte string literal not displayed */ NginxIngressControllerProxySendTimeout string `` /* 160-byte string literal not displayed */ NginxIngressControllerTLSCertLocalPath string `` /* 163-byte string literal not displayed */ NginxIngressControllerTLSKeyLocalPath string `` /* 160-byte string literal not displayed */ NginxIngressControllerBasicAuthUsername string `` /* 163-byte string literal not displayed */ NginxIngressControllerBasicAuthPassword string `` /* 163-byte string literal not displayed */ DefaultIngressHost string `json:"default_ingress_host" yaml:"default_ingress_host" mapstructure:"default_ingress_host"` RookEnabled bool `json:"rook_enabled,omitempty" yaml:"rook_enabled" mapstructure:"rook_enabled"` RookCephStorageDeviceDirectories []string `` /* 128-byte string literal not displayed */ RookCephStorageDeviceFilter string `` /* 134-byte string literal not displayed */ RookDashboardEnabled bool `json:"rook_dashboard_enabled,omitempty" yaml:"rook_dashboard_enabled" mapstructure:"rook_dashboard_enabled"` RookDashboardExternalEnabled bool `` /* 134-byte string literal not displayed */ RookDashboardPort int `json:"rook_dashboard_port,omitempty" yaml:"rook_dashboard_port" mapstructure:"rook_dashboard_port"` RookObjectStoreEnabled bool `json:"rook_object_store_enabled,omitempty" yaml:"rook_object_store_enabled" mapstructure:"rook_object_store_enabled"` RookObjectStoreRadosGatewayEnabled bool `` /* 158-byte string literal not displayed */ RookFileStoreEnabled bool `json:"rook_file_store_enabled,omitempty" yaml:"rook_file_store_enabled" mapstructure:"rook_file_store_enabled"` DefaultStorageclass string `json:"default_storageclass,omitempty" yaml:"default_storageclass" mapstructure:"default_storageclass"` HostTimeZone string `json:"host_timezone,omitempty" yaml:"host_timezone" mapstructure:"host_timezone"` ControlPlaneTimeZone string `json:"controlplane_timezone,omitempty" yaml:"controlplane_timezone" mapstructure:"controlplane_timezone"` CloudProviderEnabled bool `json:"cloud_provider_enabled,omitempty" yaml:"cloud_provider_enabled" mapstructure:"cloud_provider_enabled"` PodEvictionTimeout string `json:"pod_eviction_timeout" yaml:"pod_eviction_timeout" mapstructure:"pod_eviction_timeout"` TerminatedPodGCThreshold int `json:"terminated_pod_gc_threshold" yaml:"terminated_pod_gc_threshold" mapstructure:"terminated_pod_gc_threshold"` WaitForReady int `json:"wait_for_ready" yaml:"wait_for_ready" mapstructure:"wait_for_ready"` SysctlSettings interface{} `json:"sysctl_settings,omitempty" yaml:"sysctl_settings,omitempty" mapstructure:"sysctl_settings"` }
Config are all the settings to configure Kubernetes no matter the platform
func DefaultConfig ¶
DefaultConfig returns the default configuration of the configurator based on the default inventory
func (*Config) LoadNilDefault ¶
func (c *Config) LoadNilDefault()
LoadNilDefault will load assigned defaults when the current value is nil this is usually for dealing with omitted values for backwards compatibility
func (*Config) UpdateHosts ¶
UpdateHosts get the hosts from a Terraform state file TODO: Complete this function
type Configurator ¶
type Configurator struct {
// contains filtered or unexported fields
}
Configurator store all the settings from the cluster related to the Configurator
func New ¶
func New(clusterName, platform, address string, port int, hosts Hosts, stateData map[string]interface{}, platformConfig interface{}, config *Config, res []string, basePath string, ui *ui.UI) (*Configurator, error)
New creates a configurator
func (*Configurator) ApplyResources ¶
func (c *Configurator) ApplyResources(export bool) error
ApplyResources applies the Kubernetes manifests after rendering the templates. It may only export the rendered manifests if `export` is true.
func (*Configurator) Configure ¶
func (c *Configurator) Configure() error
Configure will start the process to configure the hosts to have Kubernetes up and running
func (*Configurator) Inventory ¶
func (c *Configurator) Inventory() (*Inventory, error)
Inventory creates an Ansible inventory from the Configurator information
func (*Configurator) RunPlaybook ¶
func (c *Configurator) RunPlaybook() error
RunPlaybook will execute ansible remotely to configure the host to have Kubernetes up and running.
func (*Configurator) Setup ¶
func (c *Configurator) Setup() error
Setup installs and configures Ansible and upload the Ansible roles and inventory
func (*Configurator) UploadCerts ¶
func (c *Configurator) UploadCerts()
UploadCerts uploads the certificate files located in the 'certificates/' directory in the cluster configuration dir
type Host ¶
type Host struct { PublicIP string `json:"public_ip" yaml:"public_ip" mapstructure:"public_ip"` PrivateIP string `json:"private_ip" yaml:"private_ip" mapstructure:"private_ip"` PublicDNS string `json:"public_dns" yaml:"public_dns" mapstructure:"public_dns"` PrivateDNS string `json:"private_dns" yaml:"private_dns" mapstructure:"private_dns"` RoleName string `json:"role" yaml:"role" mapstructure:"role"` Pool string `json:"pool" yaml:"pool" mapstructure:"pool"` // contains filtered or unexported fields }
Host is the host configuration
type Hosts ¶
type Hosts []Host
Hosts is a slice of Host
func (Hosts) FilterByNode ¶
FilterByNode returns all the hosts that contain an IP or DNS from the given list
func (Hosts) FilterByRole ¶
FilterByRole returns all the hosts with the given roles
type Inventory ¶
type Inventory struct {
All AllInventory `json:"all,omitempty" yaml:"all" mapstructure:"all"`
}
Inventory contain all the variables and childrens of the Ansible inventory
type InventoryHost ¶
type InventoryHost struct { AnsibleHost string `json:"ansible_host,omitempty" yaml:"ansible_host" mapstructure:"ansible_host"` PrivateIP string `json:"private_ip,omitempty" yaml:"private_ip" mapstructure:"private_ip"` PublicIP string `json:"public_ip,omitempty" yaml:"public_ip" mapstructure:"public_ip"` PrivateDNS string `json:"private_dns,omitempty" yaml:"private_dns" mapstructure:"private_dns"` PublicDNS string `json:"public_dns,omitempty" yaml:"public_dns" mapstructure:"public_dns"` FQDN string `json:"fqdn,omitempty" yaml:"fqdn" mapstructure:"fqdn"` Hostname string `json:"hostname,omitempty" yaml:"hostname" mapstructure:"hostname"` HostnameShort string `json:"hostname_short,omitempty" yaml:"hostname_short" mapstructure:"hostname_short"` KubeletTaints []string `json:"kubelet_taints,omitempty" yaml:"kubelet_taints" mapstructure:"kubelet_taints"` KubeletLabels []string `json:"kubelet_labels,omitempty" yaml:"kubelet_labels" mapstructure:"kubelet_labels"` }
InventoryHost is a host structure in an Ansible inventory Note: update var ValidAddressInventoryFields if a new field is added
type InventoryHosts ¶
type InventoryHosts struct {
Hosts map[string]*InventoryHost `json:"hosts,omitempty" yaml:"hosts" mapstructure:"hosts"`
}
InventoryHosts is a hosts structure in an Ansible inventory
type InventoryVariables ¶
type InventoryVariables struct { ShellEditingMode string `json:"shell_editing_mode,omitempty" yaml:"shell_editing_mode,omitempty" mapstructure:"shell_editing_mode,omitempty"` AddressInventoryField string `json:"address_inventory_field" yaml:"address_inventory_field" mapstructure:"address_inventory_field"` AlbDNSName string `json:"alb_dns_name,omitempty" yaml:"alb_dns_name" mapstructure:"alb_dns_name"` // Just for AWS. From provisioner VsphereDatacenter string `json:"vsphere_datacenter,omitempty" yaml:"vsphere_datacenter" mapstructure:"vsphere_datacenter"` // Just for vSphere. From provisioner VsphereFolder string `json:"vsphere_folder,omitempty" yaml:"vsphere_folder" mapstructure:"vsphere_folder"` // Just for vSphere. From provisioner VsphereDatastore string `json:"vsphere_datastore,omitempty" yaml:"vsphere_datastore" mapstructure:"vsphere_datastore"` // Just for vSphere. From provisioner VsphereNet string `json:"vsphere_net" yaml:"vsphere_net" mapstructure:"vsphere_net"` // Just for vSphere. From provisioner VsphereServer string `json:"vsphere_server,omitempty" yaml:"vsphere_server" mapstructure:"vsphere_server"` // Just for vSphere. From environment VsphereResourcePool string `json:"vsphere_resource_pool,omitempty" yaml:"vsphere_resource_pool,omitempty" mapstructure:"vsphere_resource_pool"` ClusterName string `json:"cluster_name,omitempty" yaml:"cluster_name" mapstructure:"cluster_name"` // From top in config file. AnsibleUser string `json:"ansible_user,omitempty" yaml:"ansible_user" mapstructure:"ansible_user"` // Calculated, depend of platform CloudProvider string `json:"cloud_provider,omitempty" yaml:"cloud_provider" mapstructure:"cloud_provider"` // Calculated, depend of platform CloudProviderEnabled bool `json:"cloud_provider_enabled,omitempty" yaml:"cloud_provider_enabled" mapstructure:"cloud_provider_enabled"` // Calculated, depend of platform KubeAPISslPort int `json:"kube_api_ssl_port,omitempty" yaml:"kube_api_ssl_port" mapstructure:"kube_api_ssl_port"` // From provisioner DisableMasterHA bool `json:"disable_master_ha,omitempty" yaml:"disable_master_ha" mapstructure:"disable_master_ha"` // From provisioner KubeVirtualIPApi string `json:"kube_virtual_ip_api,omitempty" yaml:"kube_virtual_ip_api" mapstructure:"kube_virtual_ip_api"` // From provisioner KubeVipAPISslPort int `json:"kube_vip_api_ssl_port,omitempty" yaml:"kube_vip_api_ssl_port" mapstructure:"kube_vip_api_ssl_port"` // From provisioner EtcdLocalProxyEnabled bool `json:"enable_etcd_local_proxy" yaml:"enable_etcd_local_proxy" mapstructure:"enable_etcd_local_proxy"` EtcdInitialClusterToken string `json:"etcd_initial_cluster_token,omitempty" yaml:"etcd_initial_cluster_token" mapstructure:"etcd_initial_cluster_token"` // From configurator in config file. This and the following fields KubeletMaxPods int `json:"kubelet_max_pods,omitempty" yaml:"kubelet_max_pods" mapstructure:"kubelet_max_pods"` KubeletSerializeImagePulls bool `` /* 148-byte string literal not displayed */ KubeProxyMode string `json:"kube_proxy_mode,omitempty" yaml:"kube_proxy_mode,omitempty" mapstructure:"kube_proxy_mode,omitempty"` KubeClusterCidr string `json:"kube_cluster_cidr,omitempty" yaml:"kube_cluster_cidr" mapstructure:"kube_cluster_cidr"` KubeServicesCidr string `json:"kube_services_cidr,omitempty" yaml:"kube_services_cidr" mapstructure:"kube_services_cidr"` KubeServiceIP string `json:"kube_service_ip,omitempty" yaml:"kube_service_ip" mapstructure:"kube_service_ip"` KubeAdvertiseAddress string `json:"kube_advertise_address,omitempty" yaml:"kube_advertise_address" mapstructure:"kube_advertise_address"` MasterSchedulableEnabled bool `json:"master_schedulable_enabled,omitempty" yaml:"master_schedulable_enabled" mapstructure:"master_schedulable_enabled"` DockerMaxConcurrentUploads int `` /* 148-byte string literal not displayed */ DockerMaxConcurrentDownloads int `` /* 154-byte string literal not displayed */ DockerLogMaxFiles string `json:"docker_log_max_files,omitempty" yaml:"docker_log_max_files,omitempty" mapstructure:"docker_log_max_files"` // docker config takes it as a string DockerLogMaxSize string `json:"docker_log_max_size,omitempty" yaml:"docker_log_max_size,omitempty" mapstructure:"docker_log_max_size"` DockerRegistryPath string `json:"docker_registry_path,omitempty" yaml:"docker_registry_path" mapstructure:"docker_registry_path"` DockerRegistryPort int `json:"registry_port" yaml:"registry_port" mapstructure:"registry_port"` DownloadImagesIfMissing bool `json:"download_images_if_missing,omitempty" yaml:"download_images_if_missing" mapstructure:"download_images_if_missing"` HAProxyClientTimeout string `json:"haproxy_client_timeout,omitempty" yaml:"haproxy_client_timeout,omitempty" mapstructure:"haproxy_client_timeout"` HAProxyServerTimeout string `json:"haproxy_server_timeout,omitempty" yaml:"haproxy_server_timeout,omitempty" mapstructure:"haproxy_server_timeout"` DNSAAAADelayEnabled bool `json:"dns_aaaa_delay_enabled,omitempty" yaml:"dns_aaaa_delay_enabled,omitempty" mapstructure:"dns_aaaa_delay_enabled"` DNSArgs string `json:"dns_args,omitempty" yaml:"dns_args" mapstructure:"dns_args"` DNSServers []string `json:"dns_servers,omitempty" yaml:"dns_servers" mapstructure:"dns_servers"` DNSSearch []string `json:"dns_search,omitempty" yaml:"dns_search" mapstructure:"dns_search"` EtcdDefragCrontabHour string `json:"etcd_defrag_crontab_hour,omitempty" yaml:"etcd_defrag_crontab_hour,omitempty" mapstructure:"etcd_defrag_crontab_hour"` EtcdLogsCrontabHour string `json:"etcd_logs_crontab_hour,omitempty" yaml:"etcd_logs_crontab_hour" mapstructure:"etcd_logs_crontab_hour"` EtcdLogsCrontabMinute string `json:"etcd_logs_crontab_minute,omitempty" yaml:"etcd_logs_crontab_minute" mapstructure:"etcd_logs_crontab_minute"` EtcdLogsDaysToKeep int `json:"etcd_logs_days_to_keep,omitempty" yaml:"etcd_logs_days_to_keep" mapstructure:"etcd_logs_days_to_keep"` EtcdSnapshotsDirectory string `json:"etcd_snapshots_directory,omitempty" yaml:"etcd_snapshots_directory,omitempty" mapstructure:"etcd_snapshots_directory"` UseLocalImages bool `json:"use_local_images,omitempty" yaml:"use_local_images" mapstructure:"use_local_images"` ClusterIfaceName string `json:"cluster_iface_name,omitempty" yaml:"cluster_iface_name" mapstructure:"cluster_iface_name"` ClusterIface string `json:"cluster_iface,omitempty" yaml:"cluster_iface" mapstructure:"cluster_iface"` CniIface string `json:"cni_iface,omitempty" yaml:"cni_iface" mapstructure:"cni_iface"` TimeServers []string `json:"time_servers,omitempty" yaml:"time_servers" mapstructure:"time_servers"` KubeAuditLogMaxAge int `json:"kube_audit_log_max_age,omitempty" yaml:"kube_audit_log_max_age" mapstructure:"kube_audit_log_max_age"` KubeAuditLogMaxBackup int `json:"kube_audit_log_max_backup,omitempty" yaml:"kube_audit_log_max_backup" mapstructure:"kube_audit_log_max_backup"` KubeAuditLogMaxSize int `json:"kube_audit_log_max_size,omitempty" yaml:"kube_audit_log_max_size" mapstructure:"kube_audit_log_max_size"` NginxIngressEnabled bool `json:"nginx_ingress_enabled,omitempty" yaml:"nginx_ingress_enabled" mapstructure:"nginx_ingress_enabled"` NginxIngressControllerProxyBodySize string `` /* 161-byte string literal not displayed */ NginxIngressControllerErrorLogLevel string `` /* 161-byte string literal not displayed */ NginxIngressControllerSslProtocols string `` /* 155-byte string literal not displayed */ NginxIngressControllerProxyReadTimeout string `` /* 170-byte string literal not displayed */ NginxIngressControllerProxySendTimeout string `` /* 170-byte string literal not displayed */ NginxIngressControllerTLSCertLocalPath string `` /* 173-byte string literal not displayed */ NginxIngressControllerTLSKeyLocalPath string `` /* 170-byte string literal not displayed */ NginxIngressControllerBasicAuthUsername string `` /* 173-byte string literal not displayed */ NginxIngressControllerBasicAuthPassword string `` /* 173-byte string literal not displayed */ DefaultIngressHost string `json:"default_ingress_host,omitempty" yaml:"default_ingress_host" mapstructure:"default_ingress_host"` RookEnabled bool `json:"rook_enabled,omitempty" yaml:"rook_enabled" mapstructure:"rook_enabled"` RookCephStorageDeviceDirectories []string `` /* 128-byte string literal not displayed */ RookCephStorageDeviceFilter string `` /* 134-byte string literal not displayed */ RookDashboardEnabled bool `json:"rook_dashboard_enabled,omitempty" yaml:"rook_dashboard_enabled" mapstructure:"rook_dashboard_enabled"` RookDashboardExternalEnabled bool `` /* 134-byte string literal not displayed */ RookDashboardPort int `json:"rook_dashboard_port,omitempty" yaml:"rook_dashboard_port" mapstructure:"rook_dashboard_port"` RookObjectStoreEnabled bool `json:"rook_object_store_enabled,omitempty" yaml:"rook_object_store_enabled" mapstructure:"rook_object_store_enabled"` RookObjectStoreRadosGatewayEnabled bool `` /* 158-byte string literal not displayed */ RookFileStoreEnabled bool `json:"rook_file_store_enabled,omitempty" yaml:"rook_file_store_enabled" mapstructure:"rook_file_store_enabled"` DefaultStorageclass string `json:"default_storageclass,omitempty" yaml:"default_storageclass" mapstructure:"default_storageclass"` HostTimeZone string `json:"host_timezone,omitempty" yaml:"host_timezone,omitempty" mapstructure:"host_timezone"` ControlPlaneTimeZone string `json:"controlplane_timezone,omitempty" yaml:"controlplane_timezone,omitempty" mapstructure:"controlplane_timezone"` PodEvictionTimeout string `json:"pod_eviction_timeout,omitempty" yaml:"pod_eviction_timeout" mapstructure:"pod_eviction_timeout"` TerminatedPodGCThreshold int `json:"terminated_pod_gc_threshold,omitempty" yaml:"terminated_pod_gc_threshold" mapstructure:"terminated_pod_gc_threshold"` SysctlSettings interface{} `json:"sysctl_settings,omitempty" yaml:"sysctl_settings,omitempty" mapstructure:"sysctl_settings"` }
InventoryVariables contain all the variables required for the Ansible inventory
func (*InventoryVariables) JSON ¶
func (iv *InventoryVariables) JSON() ([]byte, error)
JSON returns the Inventory Variables structure in JSON format
func (*InventoryVariables) Map ¶
func (iv *InventoryVariables) Map() (map[string]interface{}, error)
Map returns the Inventory Variables structure as a map of strings
type KubeCluster ¶
type KubeCluster struct {
Children map[string]InventoryHosts `json:"children,omitempty" yaml:"children" mapstructure:"children"`
}
KubeCluster is a kube_cluster structure in an Ansible inventory