Documentation ¶
Index ¶
- Constants
- type Client
- type ClusterClient
- func (c *ClusterClient) CreateCluster(name string, spec computev1alpha1.GKEClusterSpec) (*container.Cluster, error)
- func (c *ClusterClient) DefaultKubernetesVersion(zone string) (string, error)
- func (c *ClusterClient) DeleteCluster(zone, name string) error
- func (c *ClusterClient) GetCluster(zone, name string) (*container.Cluster, error)
Constants ¶
View Source
const (
// DefaultScope used by the GKE API.
DefaultScope = container.CloudPlatformScope
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { CreateCluster(string, computev1alpha1.GKEClusterSpec) (*container.Cluster, error) GetCluster(zone, name string) (*container.Cluster, error) DeleteCluster(zone, name string) error }
Client interface to perform cluster operations
type ClusterClient ¶
type ClusterClient struct {
// contains filtered or unexported fields
}
ClusterClient implementation
func NewClusterClient ¶
func NewClusterClient(creds *google.Credentials) (*ClusterClient, error)
NewClusterClient return new instance of the Client based on credentials
func (*ClusterClient) CreateCluster ¶
func (c *ClusterClient) CreateCluster(name string, spec computev1alpha1.GKEClusterSpec) (*container.Cluster, error)
CreateCluster creates a new GKE cluster.
func (*ClusterClient) DefaultKubernetesVersion ¶
func (c *ClusterClient) DefaultKubernetesVersion(zone string) (string, error)
DefaultKubernetesVersion is the default Kubernetes Cluster version supported by GKE for given project/zone
func (*ClusterClient) DeleteCluster ¶
func (c *ClusterClient) DeleteCluster(zone, name string) error
DeleteCluster in the given zone with the given name
func (*ClusterClient) GetCluster ¶
func (c *ClusterClient) GetCluster(zone, name string) (*container.Cluster, error)
GetCluster retrieve GKE Cluster based on provided zone and name
Click to show internal directories.
Click to hide internal directories.