Documentation ¶
Overview ¶
Package gke implements GKE provider for Kubeformation. It can generate Google Deployment Manager template in Jinja format. Only input required is the Spec object.
Google Deployment Manager template supports Python files, Jinja templates as well as plain Yaml files. Kubeformation converts cluster spec into "Spec" as defined below and generate two files, cluster.jinja and cluster.yaml. These files are defined as Go templates in templates.go and are rendered with Spec as context.
Index ¶
Constants ¶
const ( // Default version to be used in case cluster spec did not contain k8sVersion. DefaultK8SVersion = "1.9" // Google compute machine type to be used as default. DefaultMachineType = "n1-standard-1" // Default value for OS image. DefaultImageType = "cos" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodePool ¶
type NodePool struct { // Name of the node pool Name string // Kubernetes labels to be applied to nodes in this pool Labels map[string]string // Number of nodes in this pool Size int64 // Google compute engine machine type to use MachineType string // Image type to use for the nodes ImageType string }
NodePool defines a collection of nodes with similar properties in a Kubernetes cluster.
type Spec ¶
type Spec struct { // Name of the cluster Name string // Kubernetes version to use K8SVersion string // Node pools for the cluster NodePools []NodePool // Persistent disks to be created Volumes []Volume }
Spec defines the context required to render GDM template.
func NewDefaultSpec ¶
func NewDefaultSpec() *Spec
NewDefaultSpec returns a spec object which is complete enough to render a valid GDM template.
func (*Spec) GetType ¶
func (s *Spec) GetType() provider.ProviderType
GetType returns the type of this provider.