gcp

package
v0.0.0-...-264ff9f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClient

func CreateClient(gcpProfile *GCPProfile) (*http.Client, error)

func CreateUniqueClusterId

func CreateUniqueClusterId(deploymentName string) string

Types

type GCPCluster

type GCPCluster struct {
	Zone           string
	Name           string
	ClusterId      string
	ClusterVersion string
	GCPProfile     *GCPProfile
	KeyPair        *GCPKeyPairOutput
	NodeInfos      map[int]*NodeInfo
	NodePoolIds    []string
}

GCPCluster stores the data of a google cloud platform backed cluster

func NewGCPCluster

func NewGCPCluster(
	config *viper.Viper,
	deployment *apis.Deployment) *GCPCluster

func (*GCPCluster) GetClusterType

func (gcpCluster *GCPCluster) GetClusterType() string

func (*GCPCluster) GetKeyMaterial

func (gcpCluster *GCPCluster) GetKeyMaterial() string

func (*GCPCluster) KeyName

func (gcpCluster *GCPCluster) KeyName() string

func (*GCPCluster) ReloadKeyPair

func (gcpCluster *GCPCluster) ReloadKeyPair(keyMaterial string) error

ReloadKeyPair reload KeyPair by keyName

func (*GCPCluster) SshConfig

func (gcpCluster *GCPCluster) SshConfig(user string) (*ssh.ClientConfig, error)

type GCPKeyPairOutput

type GCPKeyPairOutput struct {
	KeyName    string
	PrivateKey *rsa.PrivateKey
	Pem        string
	Pub        string
}

func CreateKeypair

func CreateKeypair(keyName string) (*GCPKeyPairOutput, error)

type GCPProfile

type GCPProfile struct {
	UserId              string
	ServiceAccount      string
	ProjectId           string
	AuthJSONFileContent string
}

func (*GCPProfile) GetProjectId

func (gcpProfile *GCPProfile) GetProjectId() (string, error)

type NodeInfo

type NodeInfo struct {
	Instance  *compute.Instance
	PublicIp  string
	PrivateIp string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL