Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API interface { Create(ctx context.Context, clusterConfig Cluster) error Delete(ctx context.Context, name string, zoneID string) error }
API provides a mockable interface for the GCP api. Find the implementation of the GCP wrapped API in wrapped.go
type APIWrapper ¶
type APIWrapper struct { ProjectID string ZoneID string ClusterService *container.ProjectsZonesClustersService }
APIWrapper wraps the GCP api
func NewGKEClient ¶
func NewGKEClient(ctx context.Context, projectID string) (*APIWrapper, error)
func (*APIWrapper) Create ¶
func (caw *APIWrapper) Create(ctx context.Context, clusterConfig Cluster) error
Create calls the wrapped GCP api to create a cluster
type Autoscaling ¶
type Autoscaling struct { Enabled bool `yaml:"enabled"` MinNodeCount int64 `yaml:"minNodeCount"` MaxNodeCount int64 `yaml:"maxNodeCount"` }
Autoscaling features for cluster
type Client ¶
type Client struct { Option // contains filtered or unexported fields }
Client wrapper for KMS and GCS secret storage
type Cluster ¶
type Cluster struct { Name string `yaml:"name"` Location string `yaml:"location"` Description string `yaml:"description,omitempty"` Labels map[string]string `yaml:"labels,omitempty"` Pools []Pool `yaml:"pools"` InitialClusterVersion string `yaml:"kubernetesVersion,omitempty"` K8sClient *kubernetes.Clientset KubectlWrapper *kubectl.Wrapper Populator *k8s.Populator }
type NodeConfig ¶
type Option ¶
type Option struct { Prefix string // global prefix ProjectID string // GCP project ID ServiceAccount string // filename of the serviceaccount to use }
func (Option) WithProjectID ¶
WithProjectID modifies option to have a project id
func (Option) WithServiceAccount ¶
WithServiceAccount modifies option to have a service account
type Pool ¶
type Pool struct { Name string `yaml:"name"` Size int64 `yaml:"initialSize,omitempty"` Autoscaling Autoscaling `yaml:"autoscaling,omitempty"` NodeConfig NodeConfig `yaml:"config,omitempty"` }
node pool settings
Click to show internal directories.
Click to hide internal directories.