Documentation ¶
Index ¶
- Constants
- func ConfigureMickok8sNetworking() error
- func PortForward(podName, namespace string, port int) func()
- func TemplateFuncs() template.FuncMap
- type AmazonClusterConfig
- type Cluster
- func (c *Cluster) Activate() error
- func (c *Cluster) ConfigureKubectl() error
- func (c *Cluster) CreateStack(name string, templateName string) (*Stack, error)
- func (c *Cluster) GetDefaultNamespace() string
- func (c *Cluster) GetStack(name string) (*Stack, error)
- func (c *Cluster) GetStackState(name string) (*StackState, error)
- func (c *Cluster) GetStackStateFast(name string) (*StackState, error)
- func (c *Cluster) GetStackStates() (StackStateMap, error)
- func (c *Cluster) GetStackTemplate(templateName string) (*StackTemplate, error)
- func (c *Cluster) GetStackTemplateForStackName(name string) (*StackTemplate, error)
- func (c *Cluster) GetStackTemplates() []*StackTemplate
- func (c *Cluster) SaveStackState(stackState *StackState) error
- type ClusterCert
- type ClusterConfig
- func (c ClusterConfig) GetKubeconfigPath() string
- func (e *ClusterConfig) GetValueSetCollection() values.ValueSetCollection
- func (f *ClusterConfig) MarshalYAML() (interface{}, error)
- func (c *ClusterConfig) SetFromPath(fp string)
- func (f *ClusterConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
- type ClusterConfigs
- func (k ClusterConfigs) GetCluster(name string, ctx command.ExecutionContext) (*Cluster, error)
- func (k ClusterConfigs) GetClusterConfig(name string) (*ClusterConfig, error)
- func (k ClusterConfigs) GetClusterConfigByBrn(brn brns.StackBrn) (*ClusterConfig, error)
- func (k ClusterConfigs) GetPossiblyUnconfiguredCluster(name string, ctx command.ExecutionContext) (*Cluster, error)
- func (k ClusterConfigs) Headers() []string
- func (k ClusterConfigs) Rows() [][]string
- type ClusterRoleGetter
- type ConfigureCertsAction
- type ConfigureContextAction
- type ConfigureNamespacesAction
- type ConfigurePullSecretsAction
- type ConfigureRequest
- type ExternalClusterConfig
- type Kubectl
- type Microk8sConfig
- type MinikubeConfig
- type NamespaceConfig
- type NamespaceConfigs
- type OracleClusterConfig
- type PullSecret
- type RancherClusterConfig
- type Stack
- func (k Stack) ConfigureCerts() error
- func (k Stack) ConfigureNamespaces() error
- func (k Stack) ConfigurePullSecrets() error
- func (c *Stack) Destroy() error
- func (c *Stack) GetAppValueSetCollectionProvider(appName string) values.ValueSetCollectionProvider
- func (k *Stack) GetNamespace(role core.NamespaceRole) (NamespaceConfig, error)
- func (c *Stack) GetState(refresh bool) (*StackState, error)
- func (c *Stack) GetStoryID() string
- func (e *Stack) GetValueSetCollection() values.ValueSetCollection
- func (k *Stack) Initialize() error
- func (s Stack) IsAppDisabled(name string) bool
- func (c *Stack) IsInitialized() bool
- func (c *Stack) Save() error
- func (c *Stack) SetStoryID(id string)
- func (c *Stack) UpdateApp(updates ...StackApp) error
- type StackApp
- type StackState
- type StackStateMap
- type StackTemplate
Constants ¶
View Source
const DefaultRole core.ClusterRole = "default"
View Source
const (
DefaultStackName = "default"
)
View Source
const (
LabelNamespaceRole = "naveego.com/namespace-role"
)
View Source
const (
StackLabel = "bosun.aunalytics.com/stack"
)
Variables ¶
This section is empty.
Functions ¶
func ConfigureMickok8sNetworking ¶
func ConfigureMickok8sNetworking() error
func PortForward ¶
PortForward creates a long running port forward command that runs until you call the return function. It will keep trying to re open the port indefinitely.
func TemplateFuncs ¶
Types ¶
type AmazonClusterConfig ¶
type AmazonClusterConfig struct {
Region string `yaml:"region"`
}
type Cluster ¶
type Cluster struct { ClusterConfig Kubectl Kubectl Client *kubernetes.Clientset // contains filtered or unexported fields }
func NewCluster ¶
func NewCluster(config ClusterConfig, ctx command.ExecutionContext, allowIncomplete bool) (*Cluster, error)
func (*Cluster) ConfigureKubectl ¶
func (*Cluster) CreateStack ¶
func (*Cluster) GetDefaultNamespace ¶
func (*Cluster) GetStackState ¶
func (c *Cluster) GetStackState(name string) (*StackState, error)
func (*Cluster) GetStackStateFast ¶
func (c *Cluster) GetStackStateFast(name string) (*StackState, error)
func (*Cluster) GetStackStates ¶
func (c *Cluster) GetStackStates() (StackStateMap, error)
func (*Cluster) GetStackTemplate ¶
func (c *Cluster) GetStackTemplate(templateName string) (*StackTemplate, error)
func (*Cluster) GetStackTemplateForStackName ¶
func (c *Cluster) GetStackTemplateForStackName(name string) (*StackTemplate, error)
func (*Cluster) GetStackTemplates ¶
func (c *Cluster) GetStackTemplates() []*StackTemplate
func (*Cluster) SaveStackState ¶
func (c *Cluster) SaveStackState(stackState *StackState) error
type ClusterCert ¶
type ClusterConfig ¶
type ClusterConfig struct { StackTemplate `yaml:",inline"` KubeconfigPath string `yaml:"kubeconfigPath,omitempty"` Provider string `yaml:"-"` EnvironmentAlias string `yaml:"environmentAlias,omitempty"` Environment string `yaml:"environment,omitempty"` DefaultNamespace string `yaml:"defaultNamespace,omitempty"` Roles core.ClusterRoles `yaml:"roles,flow"` Protected bool `yaml:"protected"` Oracle *OracleClusterConfig `yaml:"oracle,omitempty"` Minikube *MinikubeConfig `yaml:"minikube,omitempty"` Microk8s *Microk8sConfig `yaml:"microk8s,omitempty"` Amazon *AmazonClusterConfig `yaml:"amazon,omitempty"` Rancher *RancherClusterConfig `yaml:"rancher,omitempty"` ExternalCluster *ExternalClusterConfig `yaml:"externalCluster,omitempty"` StackTemplates []*StackTemplate `yaml:"stackTemplates,omitempty"` IsDefaultCluster bool `yaml:"isDefaultCluster"` Aliases []string `yaml:"aliases,omitempty"` // Set by the environment during load PullSecrets []PullSecret `yaml:"-"` Brn brns.StackBrn `yaml:"-"` }
func (ClusterConfig) GetKubeconfigPath ¶
func (c ClusterConfig) GetKubeconfigPath() string
func (*ClusterConfig) GetValueSetCollection ¶
func (e *ClusterConfig) GetValueSetCollection() values.ValueSetCollection
func (*ClusterConfig) MarshalYAML ¶
func (f *ClusterConfig) MarshalYAML() (interface{}, error)
func (*ClusterConfig) SetFromPath ¶
func (c *ClusterConfig) SetFromPath(fp string)
func (*ClusterConfig) UnmarshalYAML ¶
func (f *ClusterConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type ClusterConfigs ¶
type ClusterConfigs []*ClusterConfig
func (ClusterConfigs) GetCluster ¶
func (k ClusterConfigs) GetCluster(name string, ctx command.ExecutionContext) (*Cluster, error)
func (ClusterConfigs) GetClusterConfig ¶
func (k ClusterConfigs) GetClusterConfig(name string) (*ClusterConfig, error)
func (ClusterConfigs) GetClusterConfigByBrn ¶
func (k ClusterConfigs) GetClusterConfigByBrn(brn brns.StackBrn) (*ClusterConfig, error)
func (ClusterConfigs) GetPossiblyUnconfiguredCluster ¶
func (k ClusterConfigs) GetPossiblyUnconfiguredCluster(name string, ctx command.ExecutionContext) (*Cluster, error)
func (ClusterConfigs) Headers ¶
func (k ClusterConfigs) Headers() []string
func (ClusterConfigs) Rows ¶
func (k ClusterConfigs) Rows() [][]string
type ClusterRoleGetter ¶
type ClusterRoleGetter interface {
GetClusterRole() core.ClusterRole
}
type ConfigureCertsAction ¶
type ConfigureCertsAction struct{}
type ConfigureContextAction ¶
type ConfigureContextAction struct{}
type ConfigureNamespacesAction ¶
type ConfigureNamespacesAction struct{}
type ConfigurePullSecretsAction ¶
type ConfigurePullSecretsAction struct{}
type ConfigureRequest ¶
type ExternalClusterConfig ¶
type ExternalClusterConfig struct { }
ExternalClusterConfig represents a cluster we do not control. When using this we will not create things like storage classes etc.
type Microk8sConfig ¶
type MinikubeConfig ¶
type NamespaceConfig ¶
type NamespaceConfig struct { Name string `yaml:"name"` }
type NamespaceConfigs ¶
type NamespaceConfigs map[core.NamespaceRole]NamespaceConfig
func (NamespaceConfigs) ToStringMap ¶
func (n NamespaceConfigs) ToStringMap() map[string]NamespaceConfig
func (NamespaceConfigs) UniqueNames ¶
func (n NamespaceConfigs) UniqueNames() []string
type OracleClusterConfig ¶
type PullSecret ¶
type RancherClusterConfig ¶
type RancherClusterConfig struct { }
type Stack ¶
type Stack struct { StackTemplate Brn brns.StackBrn Cluster *Cluster // Set to true if we have reason to think that this stack has been defined and deployed BelievedToExist bool // contains filtered or unexported fields }
func NewStackFromState ¶
func NewStackFromState(cluster *Cluster, state *StackState) (*Stack, error)
func (Stack) ConfigureCerts ¶
func (Stack) ConfigureNamespaces ¶
func (Stack) ConfigurePullSecrets ¶
func (*Stack) GetAppValueSetCollectionProvider ¶
func (c *Stack) GetAppValueSetCollectionProvider(appName string) values.ValueSetCollectionProvider
func (*Stack) GetNamespace ¶
func (k *Stack) GetNamespace(role core.NamespaceRole) (NamespaceConfig, error)
func (*Stack) GetStoryID ¶
func (*Stack) GetValueSetCollection ¶
func (e *Stack) GetValueSetCollection() values.ValueSetCollection
func (*Stack) Initialize ¶
func (Stack) IsAppDisabled ¶
func (*Stack) IsInitialized ¶
func (*Stack) SetStoryID ¶
type StackApp ¶
type StackApp struct { Name string `yaml:"name"` Version string `yaml:"version"` Release string `yaml:"release"` Provider string `yaml:"provider"` Repo string `yaml:"repo"` Branch string `yaml:"branch"` Commit string `yaml:"commit"` DeployedAt time.Time `yaml:"deployedAt"` DevopsBranch string `yaml:"devopsBranch"` StoryKey string `yaml:"storyKey"` Details string `yaml:"details"` }
type StackState ¶
type StackState struct { Name string `yaml:"name"` TemplateName string `yaml:"templateName"` StoryID string `yaml:"storyId"` Uninitialized bool DeployedApps map[string]StackApp `yaml:"apps"` }
func (StackState) Headers ¶
func (s StackState) Headers() []string
func (StackState) Rows ¶
func (s StackState) Rows() [][]string
type StackStateMap ¶
type StackStateMap map[string]*StackState
func (StackStateMap) Headers ¶
func (s StackStateMap) Headers() []string
func (StackStateMap) Rows ¶
func (s StackStateMap) Rows() [][]string
type StackTemplate ¶
type StackTemplate struct { NamePattern string `yaml:"namePattern"` Variables []*environmentvariables.Variable `yaml:"variables,omitempty"` Namespaces NamespaceConfigs `yaml:"namespaces"` Apps map[string]values.ValueSetCollection `yaml:"apps"` Certs []ClusterCert `yaml:"certs"` ValueOverrides *values.ValueSetCollection `yaml:"valueOverrides,omitempty"` }
func (*StackTemplate) Render ¶
func (e *StackTemplate) Render(name string) (*StackTemplate, error)
func (*StackTemplate) SetFromPath ¶
func (e *StackTemplate) SetFromPath(path string)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.