Documentation ¶
Index ¶
- Constants
- Variables
- func CheckAuth(provider *Provider, devSpaceID, target string, log log.Logger) (string, string, *api.Cluster, *api.AuthInfo, error)
- func GetClusterConfig(provider *Provider, devSpaceID, target string, log log.Logger) (string, string, *api.Cluster, *api.AuthInfo, error)
- func Login(provider *Provider, namespace, target string, log log.Logger) (string, string, *api.Cluster, *api.AuthInfo, error)
- func SaveCloudConfig(config ProviderConfig) error
- func Update(providerConfig ProviderConfig, options *UpdateOptions, log log.Logger) error
- func UpdateKubeConfig(contextName, namespace string, cluster *api.Cluster, authInfo *api.AuthInfo, ...) error
- type Provider
- type ProviderConfig
- type UpdateOptions
Constants ¶
const DefaultDeployTarget = "production"
DefaultDeployTarget is the default deployment target that is written to the config.yaml during the init process
const DevSpaceCloudConfigPath = ".devspace/clouds.yaml"
DevSpaceCloudConfigPath holds the path to the cloud config file
const DevSpaceCloudProviderName = "devspace-cloud"
DevSpaceCloudProviderName is the name of the default devspace-cloud provider
const DevSpaceKubeContextName = "devspace"
DevSpaceKubeContextName is the name for the kube config context
const GetClusterConfigEndpoint = "/clusterConfig"
GetClusterConfigEndpoint is the endpoint where to get the kubernetes context data
const LoginEndpoint = "/login"
LoginEndpoint is the cloud endpoint that will log you in
const LoginSuccessEndpoint = "/loginSuccess"
LoginSuccessEndpoint is the url redirected to after successful login
Variables ¶
var DevSpaceCloudProviderConfig = &Provider{ Name: DevSpaceCloudProviderName, Host: "http://cli.devspace-cloud.com", }
DevSpaceCloudProviderConfig holds the information for the devspace-cloud
var DevSpaceURL = ""
DevSpaceURL holds the domain name of the connected devspace TODO: Change this
var UseDeployTarget = false
UseDeployTarget uses the config deploy target TODO: Refactor this
Functions ¶
func CheckAuth ¶
func CheckAuth(provider *Provider, devSpaceID, target string, log log.Logger) (string, string, *api.Cluster, *api.AuthInfo, error)
CheckAuth verifies if the user is logged into the devspace cloud and if not logs the user in
func GetClusterConfig ¶
func GetClusterConfig(provider *Provider, devSpaceID, target string, log log.Logger) (string, string, *api.Cluster, *api.AuthInfo, error)
GetClusterConfig retrieves the cluster and authconfig from the devspace cloud
func Login ¶
func Login(provider *Provider, namespace, target string, log log.Logger) (string, string, *api.Cluster, *api.AuthInfo, error)
Login logs the user into the devspace cloud
func SaveCloudConfig ¶
func SaveCloudConfig(config ProviderConfig) error
SaveCloudConfig saves the provider configuration to file
func Update ¶
func Update(providerConfig ProviderConfig, options *UpdateOptions, log log.Logger) error
Update updates the cloud provider information if necessary
Types ¶
type Provider ¶
type Provider struct { Name string `yaml:"name,omitempty"` Host string `yaml:"host,omitempty"` Token string `yaml:"token,omitempty"` }
Provider describes the struct to hold the cloud configuration
type ProviderConfig ¶
ProviderConfig holds all the different providers and their configuration
func ParseCloudConfig ¶
func ParseCloudConfig() (ProviderConfig, error)
ParseCloudConfig parses the cloud configuration and returns a map containing the configurations
type UpdateOptions ¶
UpdateOptions specifies the possible options for the update command