Improve config package organization pt.1
This is a series of patches that refactor config.go into several smaller modules, each relating specifically to one component of the configuration structure. This particular patch split auth info and cluster related part in separate modules. Relates-To: #35 Change-Id: Ib2abebc87c80549544a8b7775969df9db55aa8be
This commit is contained in:
@@ -69,27 +69,6 @@ type Config struct {
|
||||
kubeConfig *kubeconfig.Config
|
||||
}
|
||||
|
||||
// ClusterPurpose encapsulates the Cluster Type as an enumeration
|
||||
type ClusterPurpose struct {
|
||||
// Cluster map of referenceable names to cluster configs
|
||||
ClusterTypes map[string]*Cluster `json:"clusterType"`
|
||||
}
|
||||
|
||||
// Cluster contains information about how to communicate with a kubernetes cluster
|
||||
type Cluster struct {
|
||||
// Complex cluster name defined by the using <cluster name>_<cluster type>)
|
||||
NameInKubeconf string `json:"clusterKubeconf"`
|
||||
|
||||
// KubeConfig Cluster Object
|
||||
cluster *kubeconfig.Cluster
|
||||
|
||||
// Management configuration which will be used for all hosts in the cluster
|
||||
ManagementConfiguration string `json:"managementConfiguration"`
|
||||
|
||||
// Bootstrap configuration this clusters ephemeral hosts will rely on
|
||||
Bootstrap string `json:"bootstrapInfo"`
|
||||
}
|
||||
|
||||
// Context is a tuple of references to a cluster (how do I communicate with a kubernetes context),
|
||||
// a user (how do I identify myself), and a namespace (what subset of resources do I want to work with)
|
||||
type Context struct {
|
||||
@@ -104,11 +83,6 @@ type Context struct {
|
||||
context *kubeconfig.Context
|
||||
}
|
||||
|
||||
type AuthInfo struct {
|
||||
// KubeConfig AuthInfo Object
|
||||
authInfo *kubeconfig.AuthInfo
|
||||
}
|
||||
|
||||
// Manifest is a tuple of references to a Manifest (how do Identify, collect ,
|
||||
// find the yaml manifests that airship uses to perform its operations)
|
||||
type Manifest struct {
|
||||
@@ -175,13 +149,6 @@ type RepoCheckout struct {
|
||||
ForceCheckout bool `json:"force"`
|
||||
}
|
||||
|
||||
// ClusterComplexName holds the complex cluster name information
|
||||
// Encapsulates the different operations around using it.
|
||||
type ClusterComplexName struct {
|
||||
Name string
|
||||
Type string
|
||||
}
|
||||
|
||||
// ManagementConfiguration defines configuration data for all remote systems within a context.
|
||||
type ManagementConfiguration struct {
|
||||
// Insecure indicates whether the SSL certificate should be checked on remote management requests.
|
||||
|
||||
Reference in New Issue
Block a user