Documentation
¶
Index ¶
- func RegisterStep(stepName string, step Step)
- func RunTemplate(ctx context.Context, tpl *template.Template, r runner.Runner, output io.Writer, ...) error
- type AWSConfig
- type AzureConfig
- type CertificatesConfig
- type Config
- func (c *Config) AddMaster(n *model.Machine)
- func (c *Config) AddNode(n *model.Machine)
- func (c *Config) ConfigChan() chan *Config
- func (c *Config) GetAzureAuthorizer() autorest.Authorizer
- func (c *Config) GetMaster() *model.Machine
- func (c *Config) GetMasters() map[string]*model.Machine
- func (c *Config) GetNode() *model.Machine
- func (c *Config) GetNodes() map[string]*model.Machine
- func (c *Config) KubeStateChan() chan model.KubeState
- func (c *Config) NodeChan() chan model.Machine
- func (c *Config) SetAzureAuthorizer(a autorest.Authorizer)
- func (c *Config) SetConfigChan(configChan chan *Config)
- func (c *Config) SetKubeStateChan(kubeStateChan chan model.KubeState)
- func (c *Config) SetNodeChan(nodeChan chan model.Machine)
- type ConfigMap
- type DOConfig
- type DockerConfig
- type DownloadK8sBinary
- type DrainConfig
- type GCEConfig
- type KubeadmConfig
- type Map
- type NetworkConfig
- type OSConfig
- type PacketConfig
- type PostStartConfig
- type PrometheusConfig
- type ServiceAccount
- type Step
- type TillerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterStep ¶
Types ¶
type AWSConfig ¶
type AWSConfig struct {
KeyID string `json:"access_key"`
Secret string `json:"secret_key"`
Region string `json:"region"`
AvailabilityZone string `json:"availabilityZone"`
KeyPairName string `json:"keyPairName"`
VPCID string `json:"vpcid"`
VPCCIDR string `json:"vpccidr"`
RouteTableID string `json:"routeTableId"`
InternetGatewayID string `json:"internetGatewayId"`
NodesSecurityGroupID string `json:"nodesSecurityGroupID"`
MastersSecurityGroupID string `json:"mastersSecurityGroupID"`
MastersInstanceProfile string `json:"mastersInstanceProfile"`
NodesInstanceProfile string `json:"nodesInstanceProfile"`
VolumeSize string `json:"volumeSize"`
DeviceName string `json:"deviceName"`
EbsOptimized string `json:"ebsOptimized"`
ImageID string `json:"image"`
InstanceType string `json:"size"`
ExternalLoadBalancerName string `json:"externalLoadBalancerName"`
InternalLoadBalancerName string `json:"internalLoadBalancerName"`
// Map of availability zone to subnet
Subnets map[string]string `json:"subnets"`
// Map az to route table association
RouteTableAssociationIDs map[string]string `json:"routeTableAssociationIds"`
}
type AzureConfig ¶
type AzureConfig struct {
ClientID string `json:"clientId"`
ClientSecret string `json:"clientSecret"`
TenantID string `json:"tenantId"`
SubscriptionID string `json:"subscriptionId"`
Location string `json:"location"`
VMSize string `json:"vmSize"`
// TODO: cidr validation?
VNetCIDR string `json:"vNetCIDR"`
}
type CertificatesConfig ¶
type CertificatesConfig struct {
ServicesCIDR string `json:"servicesCIDR"`
PublicIP string `json:"publicIp"`
PrivateIP string `json:"privateIp"`
Provider string `json:"provider"`
MasterHost string `json:"masterHost"`
MasterPort string `json:"masterPort"`
IsMaster bool `json:"isMaster"`
// TODO: this shouldn't be a part of SANs
// https://kubernetes.io/docs/setup/certificates/#all-certificates
KubernetesSvcIP string `json:"kubernetesSvcIp"`
StaticAuth profile.StaticAuth `json:"staticAuth"`
// DEPRECATED: it's a part of staticAuth
Username string
// DEPRECATED: it's a part of staticAuth
Password string
AdminCert string `json:"adminCert"`
AdminKey string `json:"adminKey"`
ParenCert []byte `json:"parenCert"`
CACert string `json:"caCert"`
CAKey string `json:"caKey"`
SAKey string `json:"saKey"`
SAPub string `json:"saPub"`
}
type Config ¶
type Config struct {
Kube model.Kube `json:"kube"`
DryRun bool `json:"dryRun"`
TaskID string
Provider clouds.Name `json:"provider"`
IsMaster bool `json:"isMaster"`
IsBootstrap bool `json:"IsBootstrap"`
BootstrapToken string `json:"bootstrapToken"`
ClusterID string `json:"clusterId"`
ClusterName string `json:"clusterName"`
LogBootstrapPrivateKey bool `json:"logBootstrapPrivateKey"`
DigitalOceanConfig DOConfig `json:"digitalOceanConfig"`
AWSConfig AWSConfig `json:"awsConfig"`
GCEConfig GCEConfig `json:"gceConfig"`
AzureConfig AzureConfig `json:"azureConfig"`
OSConfig OSConfig `json:"osConfig"`
PacketConfig PacketConfig `json:"packetConfig"`
DockerConfig DockerConfig `json:"dockerConfig"`
DownloadK8sBinary DownloadK8sBinary `json:"downloadK8sBinary"`
CertificatesConfig CertificatesConfig `json:"certificatesConfig"`
NetworkConfig NetworkConfig `json:"networkConfig"`
PostStartConfig PostStartConfig `json:"postStartConfig"`
TillerConfig TillerConfig `json:"tillerConfig"`
PrometheusConfig PrometheusConfig `json:"prometheusConfig"`
DrainConfig DrainConfig `json:"drainConfig"`
KubeadmConfig KubeadmConfig `json:"kubeadmConfig"`
ConfigMap ConfigMap `json:"configMap"`
ExternalDNSName string `json:"externalDnsName"`
InternalDNSName string `json:"internalDnsName"`
Node model.Machine `json:"node"`
CloudAccountID string `json:"cloudAccountId" valid:"required, length(1|32)"`
CloudAccountName string `json:"cloudAccountName" valid:"required, length(1|32)"`
Timeout time.Duration `json:"timeout"`
Runner runner.Runner `json:"-"`
Masters Map `json:"masters"`
Nodes Map `json:"nodes"`
// contains filtered or unexported fields
}
func NewConfigFromKube ¶
func (*Config) AddMaster ¶
AddMaster to map of master, map is used because it is reference and can be shared among goroutines that run multiple tasks of cluster deployment
func (*Config) ConfigChan ¶
func (*Config) GetAzureAuthorizer ¶
func (c *Config) GetAzureAuthorizer() autorest.Authorizer
func (*Config) KubeStateChan ¶
func (*Config) SetAzureAuthorizer ¶
func (c *Config) SetAzureAuthorizer(a autorest.Authorizer)
func (*Config) SetConfigChan ¶
func (*Config) SetKubeStateChan ¶
func (*Config) SetNodeChan ¶
type DOConfig ¶
type DOConfig struct {
Name string `json:"name" valid:"required"`
// These come from UI select
Region string `json:"region" valid:"required"`
Size string `json:"size" valid:"required"`
Image string `json:"image" valid:"required"`
// These come from cloud account
Fingerprint string `json:"fingerprint" valid:"required"`
AccessToken string `json:"accessToken" valid:"required"`
ExternalLoadBalancerID string `json:"externalLoadBalancerId"`
InternalLoadBalancerID string `json:"internalLoadBalancerId"`
}
type DockerConfig ¶
type DownloadK8sBinary ¶
type DrainConfig ¶
type DrainConfig struct {
PrivateIP string `json:"privateIp"`
}
type GCEConfig ¶
type GCEConfig struct {
ServiceAccount
// This comes from profile
ImageFamily string `json:"imageFamily"`
Region string `json:"region"`
AvailabilityZone string `json:"availabilityZone"`
Size string `json:"size"`
NetworkName string `json:"networkName"`
NetworkLink string `json:"networkLink"`
SubnetLink string `json:"subnetLink"`
AZs map[string]string `json:"subnets"`
// Mapping AZ -> Instance group
InstanceGroupNames map[string]string `json:"instanceGroupNames"`
InstanceGroupLinks map[string]string `json:"instanceGroupLinks"`
// Target pool acts as a balancer for external traffic https://cloud.google.com/load-balancing/docs/target-pools
TargetPoolName string `json:"targetPoolName"`
TargetPoolLink string `json:"targetPoolLink"`
ExternalAddressName string `json:"externalAddressName"`
InternalAddressName string `json:"internalAddressName"`
ExternalIPAddressLink string `json:"externalIpAddressLink"`
InternalIPAddressLink string `json:"internalIpAddressLink"`
BackendServiceName string `json:"backendServiceName"`
BackendServiceLink string `json:"backendServiceLink"`
HealthCheckName string `json:"healthCheckName"`
ExternalForwardingRuleName string `json:"externalForwardingRuleName"`
InternalForwardingRuleName string `json:"externalForwardingRuleName"`
}
type KubeadmConfig ¶
type KubeadmConfig struct {
K8SVersion string `json:"K8SVersion"`
IsMaster bool `json:"isMaster"`
IsBootstrap bool `json:"IsBootstrap"`
ServiceCIDR string `json:"serviceCIDR"`
CIDR string `json:"cidr"`
Token string `json:"token"`
Provider string `json:"provider"`
NodeIp string `json:"nodeIp"`
InternalDNSName string `json:"internalDNSName"`
ExternalDNSName string `json:"externalDNSName"`
}
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
func (*Map) MarshalJSON ¶
func (*Map) UnmarshalJSON ¶
type NetworkConfig ¶
type PacketConfig ¶
type PacketConfig struct{}
type PostStartConfig ¶
type PrometheusConfig ¶
type ServiceAccount ¶
type ServiceAccount struct {
// NOTE(stgleb): This comes from cloud account
Type string `json:"type"`
ProjectID string `json:"project_id"`
PrivateKeyID string `json:"private_key_id"`
PrivateKey string `json:"private_key"`
ClientEmail string `json:"client_email"`
ClientID string `json:"client_id"`
AuthURI string `json:"auth_uri"`
TokenURI string `json:"token_uri"`
AuthProviderX509CertURL string `json:"auth_provider_x509_cert_url"`
ClientX509CertUrl string `json:"client_x509_cert_url"`
}
Click to show internal directories.
Click to hide internal directories.