8d97d5d7ee
* Added --current flag to set-context command to use current-context when context not provided * Added validation to throw error when both context and --current flag * Updated golden files to match the recent change given * Added validation to check if current context is set when --current flag is provided Old Format: airshipctl config set-context default --manifest default --namespace default New Format: airshipctl config set-context --current --manifest default --namespace default Change-Id: I9ffe3a34f33ffd7ff03ca42de7609f91f5386b37
66 lines
2.0 KiB
Go
66 lines
2.0 KiB
Go
package config
|
|
|
|
// OutputFormat denotes the form with which to display tabulated data
|
|
type OutputFormat string
|
|
|
|
// Constants related to the ClusterType type
|
|
const (
|
|
Ephemeral = "ephemeral"
|
|
Target = "target"
|
|
AirshipClusterNameSep = "_"
|
|
AirshipClusterDefaultType = Target
|
|
)
|
|
|
|
// Sorted
|
|
var AllClusterTypes = [2]string{Ephemeral, Target}
|
|
|
|
// Constants defining default values
|
|
const (
|
|
AirshipConfigGroup = "airshipit.org"
|
|
AirshipConfigVersion = "v1alpha1"
|
|
AirshipConfigApiVersion = AirshipConfigGroup + "/" + AirshipConfigVersion
|
|
AirshipConfigKind = "Config"
|
|
|
|
AirshipConfigDir = ".airship"
|
|
AirshipConfig = "config"
|
|
AirshipKubeConfig = "kubeconfig"
|
|
|
|
AirshipConfigEnv = "AIRSHIPCONFIG"
|
|
AirshipKubeConfigEnv = "AIRSHIP_KUBECONFIG"
|
|
|
|
AirshipDefaultContext = "default"
|
|
AirshipDefaultManifest = "default"
|
|
AirshipDefaultManifestRepo = "treasuremap"
|
|
AirshipDefaultManifestRepoLocation = "https://opendev.org/airship/" + AirshipDefaultManifestRepo
|
|
|
|
// Modules
|
|
AirshipDefaultBootstrapImage = "quay.io/airshipit/isogen:latest"
|
|
AirshipDefaultIsoURL = "http://localhost:8099/debian-custom.iso"
|
|
AirshipDefaultRemoteType = "redfish"
|
|
)
|
|
|
|
// Constants defining CLI flags
|
|
const (
|
|
FlagAPIServer = "server"
|
|
FlagAuthInfoName = "user"
|
|
FlagBearerToken = "token"
|
|
FlagCAFile = "certificate-authority"
|
|
FlagCertFile = "client-certificate"
|
|
FlagClusterName = "cluster"
|
|
FlagClusterType = "cluster-type"
|
|
FlagContext = "context"
|
|
FlagCurrentContext = "current-context"
|
|
FlagConfigFilePath = "airshipconf"
|
|
FlagEmbedCerts = "embed-certs"
|
|
FlagImpersonate = "as"
|
|
FlagImpersonateGroup = "as-group"
|
|
FlagInsecure = "insecure-skip-tls-verify"
|
|
FlagKeyFile = "client-key"
|
|
FlagManifest = "manifest"
|
|
FlagNamespace = "namespace"
|
|
FlagPassword = "password"
|
|
FlagTimeout = "request-timeout"
|
|
FlagUsername = "username"
|
|
FlagCurrent = "current"
|
|
)
|