cloud

package
v1.1.1-0...-9418116 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DevSpaceCloudNamespace is the namespace to create
	DevSpaceCloudNamespace = "devspace-cloud"

	// DevSpaceServiceAccount is the service account to create
	DevSpaceServiceAccount = "devspace-cloud-user"

	// DevSpaceClusterRoleBinding is the name of the clusterrolebinding to create for the service account
	DevSpaceClusterRoleBinding = "devspace-cloud-user-binding"
)
View Source
const DevSpaceKubeContextName = "devspace"

DevSpaceKubeContextName is the name for the kube config context

View Source
const LoginEndpoint = "/login?cli=true"

LoginEndpoint is the cloud endpoint that will log you in

View Source
const LoginSuccessEndpoint = "/login-success"

LoginSuccessEndpoint is the url redirected to after successful login

View Source
const SettingDefaultClusterEncryptToken = "DEFAULT_CLUSTER_ENCRYPT_TOKEN"

SettingDefaultClusterEncryptToken is the setting name to check if we need an encryption key

View Source
const TokenEndpoint = "/auth/token"

TokenEndpoint is the endpoint where to get a token from

Variables

View Source
var ClusterNameValidationRegEx = regexp.MustCompile("^[a-zA-Z0-9][a-zA-Z0-9-]{1,30}[a-zA-Z0-9]$")

ClusterNameValidationRegEx is the cluster name validation regex

View Source
var SpaceNameValidationRegEx = regexp.MustCompile("^[a-zA-Z0-9][a-zA-Z0-9-]{1,30}[a-zA-Z0-9]$")

SpaceNameValidationRegEx is the sapace name validation regex

Functions

func GetKubeContextNameFromSpace

func GetKubeContextNameFromSpace(spaceName string, providerName string) string

GetKubeContextNameFromSpace returns the kube context name for a space

Types

type ConnectClusterOptions

type ConnectClusterOptions struct {
	DeployAdmissionController bool
	DeployGatekeeper          bool
	DeployGatekeeperRules     bool
	DeployIngressController   bool
	DeployCertManager         bool

	UseHostNetwork *bool

	ClusterName string
	KubeContext string
	Key         string

	OpenUI bool
	Public bool

	UseDomain bool
	Domain    string
}

ConnectClusterOptions holds the options for connecting a cluster

type Provider

type Provider interface {
	GetAndUpdateSpaceCache(spaceID int, forceUpdate bool) (*latest.SpaceCache, bool, error)
	CacheSpace(space *latest.Space, serviceAccount *latest.ServiceAccount) error

	ConnectCluster(options *ConnectClusterOptions) error
	ResetKey(clusterName string) error

	UpdateKubeConfig(contextName string, serviceAccount *latest.ServiceAccount, spaceID int, setActive bool) error
	DeleteKubeContext(space *latest.Space) error

	GetClusterKey(cluster *latest.Cluster) (string, error)

	PrintToken(spaceID int) error
	PrintSpaces(cluster, name string, all bool) error

	Save() error
	Client() client.Client
	GetConfig() latest.Provider
}

Provider interacts with one cloud provider

func GetProvider

func GetProvider(useProviderName string, log log.Logger) (Provider, error)

GetProvider returns the current specified cloud provider

func GetProviderWithOptions

func GetProviderWithOptions(useProviderName, key string, relogin bool, loader config.Loader, log log.Logger) (Provider, error)

GetProviderWithOptions returns a provider by options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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