Documentation ¶
Index ¶
- Variables
- func IsStateFinal(state v1.StepState) bool
- func IsStateLE(lhs, rhs v1.StepState) bool
- func TypesFromString(s string) (map[Type]struct{}, error)
- type AKSAddonPreflightStep
- type AKSPoolStep
- type AddonStep
- type DestroyStep
- type ID
- type InfraStep
- type InfraValues
- type Meta
- type MetaUpdateFn
- type Metaa
- type Step
- type Type
- type Updater
Constants ¶
This section is empty.
Variables ¶
var ClusterTypes = []Type{TypeAKSPool, TypeAKSAddonPreflight, TypeAddons}
ClusterTypes is an enumeration of cluster specific types.
var InfraTypes = []Type{TypeInfra, TypeDestroy}
InfraTypes is an enumeration of types that apply to all clusters.
var Types = append(InfraTypes, ClusterTypes...)
Types is an enumeration of all types.
Functions ¶
func IsStateFinal ¶
IsStateFinal returns true is state is a final state. A step in final state has stopped executing.
func IsStateLE ¶
IsStateLE returns true if lhs is less or equal to rhs assuming the ordering; "", Running, Ready | Error
func TypesFromString ¶
TypeFromString converts a comma separated list of type names to a set of Type. On empty input an nil set is returned.
Types ¶
type AKSAddonPreflightStep ¶
type AKSAddonPreflightStep struct { Metaa /* Parameters */ // KCPath is the path of the kube config file. KCPath string // Kubectl is the kubectl implementation to use. Kubectl kubectl.Kubectrler }
AKSAddonPreflightStep waits until all AKS specific preflight checks have been met.
type AKSPoolStep ¶
type AKSPoolStep struct { Metaa // ResourceGroup that contains Cluster. ResourceGroup string // Cluster is the name of the AKS cluster to upgrade the node pool(s) of. // NB. This is the AKS name (which is the short name with a prefix). Cluster string // Version is the Kubernetes version to upgrade the node pool(s) to. Version string // Azure is the azure cli implementation to use. Azure azure.AZer }
AKSPoolStep can upgrade AKS node pools to the desired Kubernetes version.
type AddonStep ¶
type AddonStep struct { Metaa Addon addon.Addonr // KCPath is the path of the kube config file. KCPath string // MasterVaultPath is the path to a directory containing the config of the Vault to use. MasterVaultPath string // SourcePath is the path to the directory containing the k8s resources. SourcePath string // JobPaths is collection of paths (relative to SourcePath) to job files. // kubectl-tmplt is run for each element in the collection. JobPaths []string // Values are passed with -set flag to kubectl-tmplt. Values map[string]string // The number of resources created, modified and deleted. Added, Changed, Deleted int }
AddonStep performs a kubectl-tmplt apply.
type DestroyStep ¶
type DestroyStep struct { Metaa // Values to use for terraform input variables. Values InfraValues // SourcePath is the path to the directory containing terraform code. SourcePath string // Cloud provides generic cloud functionality. Cloud cloud.Cloud // Terraform is the terraform implementation to use. Terraform terraform.Terraformer // Azure is the azure cli implementation to use. Azure azure.AZer // The number of objects added, changed and deleted (destroyed) on terraform destroy completion. Added, Changed, Deleted int }
DestroyStep performs a terraform destroy.
type ID ¶
type ID struct { // Type is the type of step, for example; Infra, Destroy, Addons. Type Type // Namespace Name identifies the plan to which the step belongs. Namespace, Name string // ClusterName (optional) is the name of the target cluster. ClusterName string }
ID uniquely identifies a Step.
type InfraStep ¶
type InfraStep struct { Metaa // Values to use for terraform input variables. Values InfraValues // SourcePath is the path to the directory containing terraform code. SourcePath string // Cloud provides generic cloud functionality. Cloud cloud.Cloud // Azure provides Azure resource manager functionality. // (prefer to use Cloud instead of Azure) Azure azure.AZer // Terraform provides terraform functionality. Terraform terraform.Terraformer // Client is used to access the cluster envop is running in. Client cluster.Client // Kubectl is the kubectl implementation to use to access external clusters. Kubectl kubectl.Kubectrler // KubeconfigPathFn is a function that takes a cluster name and returns the path to the cluster kubeconfig file. KubeconfigPathFn func(string) (string, error) // Added, Changed, Deleted are then number of infrastructure objects affected. Added, Changed, Deleted int }
InfraStep performs a terraform init, plan, apply and creates cluster credentials.
type InfraValues ¶
type InfraValues struct { Infra v1.InfraSpec Clusters []v1.ClusterSpec }
InfraValues hold the Specs that are needed during template expansion.
type Meta ¶
type Meta interface { GetID() ID GetHash() string GetState() v1.StepState GetMsg() string GetLastUpdate() time.Time GetLastError() error SetOnUpdate(fn MetaUpdateFn) }
Meta is behaviour that all steps have in common.
type MetaUpdateFn ¶
type MetaUpdateFn func(Meta)
type Metaa ¶
type Metaa struct { // ID uniquely identifies a step. ID ID // Hash is unique for the config/parameters applied by a step. Hash string // State indicates if a step is running, ready or is in error. State v1.StepState // Msg helps explaining the state. Mandatory for StepStateError. Msg string // LastUpdate is the time of the last state change. LastUpdate time.Time // contains filtered or unexported fields }
Metaa is the data that all steps have in common. (it is embedded in all Steps types)
func (*Metaa) GetLastError ¶
func (*Metaa) GetLastUpdate ¶
func (*Metaa) SetOnUpdate ¶
func (m *Metaa) SetOnUpdate(fn MetaUpdateFn)