cluster

package
v0.0.8-dev Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2017 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KubeDNSAddonResourceName = "rke-kubedns-addon"
	UserAddonResourceName    = "rke-user-addon"
)
View Source
const (
	X509AuthenticationProvider = "x509"
	StateConfigMapName         = "cluster-state"
	UpdateStateTimeout         = 30
	GetStateTimeout            = 30
	KubernetesClientTimeOut    = 30
	AplineImage                = "alpine"
	NginxProxyImage            = "nginx_proxy"
	CertDownloaderImage        = "cert_downloader"
	KubeDNSImage               = "kubedns_image"
	DNSMasqImage               = "dnsmasq_image"
	KubeDNSSidecarImage        = "kubedns_sidecar_image"
	KubeDNSAutoScalerImage     = "kubedns_autoscaler_image"
)
View Source
const (
	DefaultClusterConfig = "cluster.yml"

	DefaultServiceClusterIPRange = "10.233.0.0/18"
	DefaultClusterCIDR           = "10.233.64.0/18"
	DefaultClusterDNSService     = "10.233.0.3"
	DefaultClusterDomain         = "cluster.local"
	DefaultClusterSSHKeyPath     = "~/.ssh/id_rsa"

	DefaultAuthStrategy = "x509"

	DefaultNetworkPlugin = "flannel"

	DefaultInfraContainerImage = "gcr.io/google_containers/pause-amd64:3.0"
	DefaultAplineImage         = "alpine:latest"
	DefaultNginxProxyImage     = "rancher/rke-nginx-proxy:0.1.0"
	DefaultCertDownloaderImage = "rancher/rke-cert-deployer:0.1.0"

	DefaultFlannelImage           = "quay.io/coreos/flannel:v0.9.1"
	DefaultFlannelCNIImage        = "quay.io/coreos/flannel-cni:v0.2.0"
	DefaultCalicoNodeImage        = "quay.io/calico/node:v2.6.2"
	DefaultCalicoCNIImage         = "quay.io/calico/cni:v1.11.0"
	DefaultCalicoControllersImage = "quay.io/calico/kube-controllers:v1.0.0"
	DefaultCanalNodeImage         = "quay.io/calico/node:v2.6.2"
	DefaultCanalCNIImage          = "quay.io/calico/cni:v1.11.0"
	DefaultCanalFlannelImage      = "quay.io/coreos/flannel:v0.9.1"

	DefaultKubeDNSImage           = "gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.5"
	DefaultDNSMasqImage           = "gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64:1.14.5"
	DefaultKubeDNSSidecarImage    = "gcr.io/google_containers/k8s-dns-sidecar-amd64:1.14.5"
	DefaultKubeDNSAutoScalerImage = "gcr.io/google_containers/cluster-proportional-autoscaler-amd64:1.0.0"
)
View Source
const (
	NetworkPluginResourceName = "rke-network-plugin"

	FlannelNetworkPlugin = "flannel"
	FlannelImage         = "flannel_image"
	FlannelCNIImage      = "flannel_cni_image"

	CalicoNetworkPlugin     = "calico"
	CalicoNodeImage         = "calico_node_image"
	CalicoCNIImage          = "calico_cni_image"
	CalicoControllersImages = "calico_controllers_image"

	CanalNetworkPlugin = "canal"
	CanalNodeImage     = "canal_node_image"
	CanalCNIImage      = "canal_cni_image"
	CanalFlannelImage  = "canal_flannel_image"
)

Variables

This section is empty.

Functions

func CheckEtcdHostsChanged

func CheckEtcdHostsChanged(kubeCluster, currentCluster *Cluster) error

func GetK8sVersion

func GetK8sVersion(localConfigPath string) (string, error)

func GetLocalKubeConfig

func GetLocalKubeConfig(configPath string) string

func ReconcileCluster

func ReconcileCluster(kubeCluster, currentCluster *Cluster) error

func SetUpAuthentication

func SetUpAuthentication(kubeCluster, currentCluster *Cluster) error

Types

type Cluster

type Cluster struct {
	v3.RancherKubernetesEngineConfig `yaml:",inline"`
	ConfigPath                       string `yaml:"config_path"`
	LocalKubeConfigPath              string
	EtcdHosts                        []*hosts.Host
	WorkerHosts                      []*hosts.Host
	ControlPlaneHosts                []*hosts.Host
	KubeClient                       *kubernetes.Clientset
	KubernetesServiceIP              net.IP
	Certificates                     map[string]pki.CertificatePKI
	ClusterDomain                    string
	ClusterCIDR                      string
	ClusterDNSServer                 string
}

func ParseConfig

func ParseConfig(clusterFile string) (*Cluster, error)

func (*Cluster) ApplySystemAddonExcuteJob

func (c *Cluster) ApplySystemAddonExcuteJob(addonJob string) error

func (*Cluster) ClusterRemove

func (c *Cluster) ClusterRemove() error

func (*Cluster) DeployClusterPlanes

func (c *Cluster) DeployClusterPlanes() error

func (*Cluster) DeployK8sAddOns

func (c *Cluster) DeployK8sAddOns() error

func (*Cluster) DeployNetworkPlugin

func (c *Cluster) DeployNetworkPlugin() error

func (*Cluster) DeployUserAddOns

func (c *Cluster) DeployUserAddOns() error

func (*Cluster) GetClusterState

func (c *Cluster) GetClusterState() (*Cluster, error)

func (*Cluster) InvertIndexHosts

func (c *Cluster) InvertIndexHosts() error

func (*Cluster) SaveClusterState

func (c *Cluster) SaveClusterState(clusterFile string) error

func (*Cluster) SetUpHosts

func (c *Cluster) SetUpHosts() error

func (*Cluster) StoreAddonConfigMap

func (c *Cluster) StoreAddonConfigMap(addonYaml string, addonName string) error

func (*Cluster) TunnelHosts

func (c *Cluster) TunnelHosts() error

func (*Cluster) ValidateCluster

func (c *Cluster) ValidateCluster() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL