Documentation ¶
Index ¶
- Constants
- Variables
- type AddOnInfo
- type ManagerFlavor
- func (s ManagerFlavor) Drain(flavorProperties *types.Any, inst instance.Description) error
- func (s ManagerFlavor) Get(path types.Path) (*types.Any, error)
- func (s ManagerFlavor) Healthy(flavorProperties *types.Any, inst instance.Description) (flavor.Health, error)
- func (s ManagerFlavor) List(path types.Path) ([]string, error)
- func (s *ManagerFlavor) Prepare(flavorProperties *types.Any, instanceSpec instance.Spec, ...) (instance.Spec, error)
- func (s *ManagerFlavor) Validate(flavorProperties *types.Any, allocation group_types.AllocationMethod) error
- type Options
- type Spec
- type WorkerFlavor
- func (s WorkerFlavor) Drain(flavorProperties *types.Any, inst instance.Description) error
- func (s WorkerFlavor) Get(path types.Path) (*types.Any, error)
- func (s WorkerFlavor) Healthy(flavorProperties *types.Any, inst instance.Description) (flavor.Health, error)
- func (s WorkerFlavor) List(path types.Path) ([]string, error)
- func (s *WorkerFlavor) Prepare(flavorProperties *types.Any, instanceSpec instance.Spec, ...) (instance.Spec, error)
- func (s *WorkerFlavor) Validate(flavorProperties *types.Any, allocation group_types.AllocationMethod) error
Constants ¶
const ( // DefaultManagerInitScriptTemplate is the default template for the init script which // the flavor injects into the user data of the instance to configure Docker Swarm Managers DefaultManagerInitScriptTemplate = `` /* 601-byte string literal not displayed */ // DefaultWorkerInitScriptTemplate is the default template for the init script which // the flavor injects into the user data of the instance to configure Docker Swarm. DefaultWorkerInitScriptTemplate = `` /* 137-byte string literal not displayed */ )
const ( // AllInstances as a special logical ID for use in the Attachments map AllInstances = instance.LogicalID("*") )
Variables ¶
var ( // DefaultTemplateOptions contains the default values to use for templates DefaultTemplateOptions = template.Options{MultiPass: true} )
Functions ¶
This section is empty.
Types ¶
type AddOnInfo ¶
AddOnInfo is info mation of kubernetes add on information. Type is add on type network and visualise. See https://kubernetes.io/docs/concepts/cluster-administration/addons/
type ManagerFlavor ¶
type ManagerFlavor struct {
// contains filtered or unexported fields
}
ManagerFlavor is the flavor for kube managers
func NewManagerFlavor ¶
func NewManagerFlavor(plugins func() discovery.Plugins, options Options, stop <-chan struct{}) (*ManagerFlavor, error)
NewManagerFlavor creates a flavor.Plugin that creates manager and worker nodes connected in a kubernetes.
func (ManagerFlavor) Drain ¶
func (s ManagerFlavor) Drain(flavorProperties *types.Any, inst instance.Description) error
TODO - call kubectl drain and then delete node
func (ManagerFlavor) Healthy ¶
func (s ManagerFlavor) Healthy(flavorProperties *types.Any, inst instance.Description) (flavor.Health, error)
Healthy determines whether an instance is healthy.
func (*ManagerFlavor) Prepare ¶
func (s *ManagerFlavor) Prepare(flavorProperties *types.Any, instanceSpec instance.Spec, allocation group_types.AllocationMethod, index group_types.Index) (instance.Spec, error)
Prepare sets up the provisioner / instance plugin's spec based on information about the kubernetes to join.
func (*ManagerFlavor) Validate ¶
func (s *ManagerFlavor) Validate(flavorProperties *types.Any, allocation group_types.AllocationMethod) error
Validate checks whether the helper can support a configuration.
type Options ¶
type Options struct { // ConfigDir is the location where the plugin uses to store some state like join token ConfigDir string // DefaultManagerInitScriptTemplate is the URL for the default control plane template url. // It's overridden by the init script template url specified in the properties. DefaultManagerInitScriptTemplate types.URL // DefaultWorkerInitScriptTemplate is the URL for the default data plane (workers) template url. // This is overridden by the template specified in the properties DefaultWorkerInitScriptTemplate types.URL // MultiMaster specifies if the control plane supports multi master MultiMaster bool }
Options capture static plugin-related settings
type Spec ¶
type Spec struct { // Attachments indicate the devices that are to be attached to the instance. // If the logical ID is '*' (the AllInstances const) then the attachment applies to all instances. Attachments map[instance.LogicalID][]instance.Attachment // InitScriptTemplateURL overrides the template specified when the plugin started up. InitScriptTemplateURL string // KubeJoinIP is the IP for managers and workers to join KubeJoinIP string // KubeBindPort is the IP for managers and workers to join KubeBindPort int // KubeAddOns is the networking and network policy provider KubeAddOns []AddOnInfo // KubeClusterID is the ID of Kubernetes Cluster you will deploy. KubeClusterID string // SkipManagerValidation is skip to check manager for worker SkipManagerValidation bool // ControlPlane are the nodes that make up the Kube control plane. This is a list of logical IDs // that correspond to the manager group of nodes. For a single master setup, this slice should // contain a single element of the IP address or some identifier for the master node. ControlPlane []instance.LogicalID }
Spec is the value passed in the `Properties` field of configs
type WorkerFlavor ¶
type WorkerFlavor struct {
// contains filtered or unexported fields
}
WorkerFlavor is the flavor for kubernetes workers
func NewWorkerFlavor ¶
func NewWorkerFlavor(plugins func() discovery.Plugins, options Options, stop <-chan struct{}) (*WorkerFlavor, error)
NewWorkerFlavor creates a flavor.Plugin that creates manager and worker nodes connected in a kubernetes.
func (WorkerFlavor) Drain ¶
func (s WorkerFlavor) Drain(flavorProperties *types.Any, inst instance.Description) error
TODO - call kubectl drain and then delete node
func (WorkerFlavor) Healthy ¶
func (s WorkerFlavor) Healthy(flavorProperties *types.Any, inst instance.Description) (flavor.Health, error)
Healthy determines whether an instance is healthy.
func (*WorkerFlavor) Prepare ¶
func (s *WorkerFlavor) Prepare(flavorProperties *types.Any, instanceSpec instance.Spec, allocation group_types.AllocationMethod, index group_types.Index) (instance.Spec, error)
Prepare sets up the provisioner / instance plugin's spec based on information about the kubernetes to join.
func (*WorkerFlavor) Validate ¶
func (s *WorkerFlavor) Validate(flavorProperties *types.Any, allocation group_types.AllocationMethod) error
Validate checks whether the helper can support a configuration.