Documentation ¶
Index ¶
- Constants
- Variables
- func CheckAuth(provider *Provider) (string, *api.Cluster, *api.AuthInfo, error)
- func GetClusterConfig(provider *Provider) (string, *api.Cluster, *api.AuthInfo, error)
- func Login(provider *Provider) (string, *api.Cluster, *api.AuthInfo, error)
- func SaveCloudConfig(config ProviderConfig) error
- func Update(providerConfig ProviderConfig, dsConfig *v1.Config, ...) error
- func UpdateDevSpaceConfig(dsConfig *v1.Config, namespace string)
- func UpdateKubeConfig(contextName, namespace string, cluster *api.Cluster, authInfo *api.AuthInfo, ...) error
- type Provider
- type ProviderConfig
Constants ¶
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
Functions ¶
func CheckAuth ¶
CheckAuth verifies if the user is logged into the devspace cloud and if not logs the user in
func GetClusterConfig ¶
GetClusterConfig retrieves the cluster and authconfig from the devspace cloud
func SaveCloudConfig ¶
func SaveCloudConfig(config ProviderConfig) error
SaveCloudConfig saves the provider configuration to file
func Update ¶
func Update(providerConfig ProviderConfig, dsConfig *v1.Config, useKubeContext, switchKubeContext bool) error
Update updates the cloud provider information if necessary
func UpdateDevSpaceConfig ¶
UpdateDevSpaceConfig updates the devspace config with the newest namespace
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