Documentation ¶
Index ¶
- type ClusterMember
- type Etcd
- type Kubernetes
- type Service
- type ServiceDependencies
- type ServiceFlags
- func (flags *ServiceFlags) GetClusterMembers(log *logging.Logger) ([]ClusterMember, error)
- func (flags *ServiceFlags) HasRole(role string) bool
- func (flags *ServiceFlags) PrivateHostIP(log *logging.Logger) (string, error)
- func (flags *ServiceFlags) ReadClusterID() (string, error)
- func (flags *ServiceFlags) Save(log *logging.Logger) (bool, error)
- func (flags *ServiceFlags) SetupDefaults(log *logging.Logger) error
- type Vault
- type Weave
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterMember ¶
type Etcd ¶
type Etcd struct { ClusterState string UseVaultCA bool // If set, use vault to create peer (and optional client) TLS certificates SecureClients bool // If set, force clients to connect over TLS ClientPort int }
ETCD
func (*Etcd) CreateEndpoint ¶
CreateEndpoint returns the client URL to reach an ETCD server at the given cluster IP.
type Kubernetes ¶
type Kubernetes struct { Enabled bool KubernetesMasterImage string APIServerPort int ServiceClusterIPRange string ClusterDNS string // IP address of DNS server ClusterDomain string // Name of culster domain APIDNSName string Metadata string }
K8s config
func (*Kubernetes) IsEnabled ¶
func (flags *Kubernetes) IsEnabled() bool
IsEnabled returns true if kubernetes should be installed on the cluster.
type Service ¶
type Service interface { Name() string Setup(deps ServiceDependencies, flags *ServiceFlags) error }
type ServiceDependencies ¶
type ServiceDependencies struct { Systemd *systemd.SystemdClient Logger *logging.Logger }
type ServiceFlags ¶
type ServiceFlags struct { Force bool // Start/reload even if nothing has changed // gluon GluonImage string VaultMonkeyImage string Roles []string // Docker Docker struct { DockerIP string DockerSubnet string PrivateRegistryUrl string PrivateRegistryUserName string PrivateRegistryPassword string } // Rkt Rkt struct { RktSubnet string } // Network Network struct { PrivateClusterDevice string ClusterSubnet string // 'a.b.c.d/x' ClusterIP string // IP address of member used for internal cluster traffic (e.g. etcd) } // ETCD Etcd Etcd // Kubernetes config Kubernetes Kubernetes // Vault config Vault Vault // Weave Weave Weave // contains filtered or unexported fields }
func (*ServiceFlags) GetClusterMembers ¶
func (flags *ServiceFlags) GetClusterMembers(log *logging.Logger) ([]ClusterMember, error)
GetClusterMembers returns a list of the private IP addresses of all the cluster members
func (*ServiceFlags) HasRole ¶
func (flags *ServiceFlags) HasRole(role string) bool
HasRole returns true if the given role is found in flags.Roles.
func (*ServiceFlags) PrivateHostIP ¶
func (flags *ServiceFlags) PrivateHostIP(log *logging.Logger) (string, error)
PrivateHostIP returns the private IPv4 address of the host.
func (*ServiceFlags) ReadClusterID ¶
func (flags *ServiceFlags) ReadClusterID() (string, error)
ReadClusterID reads the cluster ID from /etc/pulcy/cluster-id
func (*ServiceFlags) Save ¶
func (flags *ServiceFlags) Save(log *logging.Logger) (bool, error)
Save applicable flags to their respective files Returns true if anything has changed, false otherwise
func (*ServiceFlags) SetupDefaults ¶
func (flags *ServiceFlags) SetupDefaults(log *logging.Logger) error
SetupDefaults fills given flags with default value
type Weave ¶
type Weave struct { Seed string Hostname string // Weave DNS of exposed host IPRange string // Value to `--ipalloc-range` (e.g. 10.32.0.0/16) IPInit string // Value for `--ipalloc-init` (default empty) RktSubnet string // Subnet used by rkt (e.g. 10.22.0.0/16) RktGateway string // Gateway used by rkt (e.g. 10.22.0.1) }
Weave config
Click to show internal directories.
Click to hide internal directories.