Documentation
¶
Overview ¶
Package cloudcmd provides executable command for the CLI.
This package focuses on the interaction with the cloud provider. It separates the cloud provider specific code from the rest of the CLI, and provides a common interface for all cloud providers.
Exported functions must not be cloud provider specific, but rather take a cloudprovider.Provider as an argument.
User interaction happens in the cmd package, and should not happen or pass through this package.
The backend to this package is currently provided by the terraform package.
Index ¶
- Variables
- type AWSIAMConfig
- type AzureIAMConfig
- type Creator
- type GCPIAMConfig
- type IAMConfig
- type IAMCreator
- type IAMDestroyer
- type Terminator
- type Upgrader
- func (u *Upgrader) CurrentImage(ctx context.Context) (string, error)
- func (u *Upgrader) CurrentKubernetesVersion(ctx context.Context) (string, error)
- func (u *Upgrader) KubernetesVersion() (string, error)
- func (u *Upgrader) UpgradeHelmServices(ctx context.Context, config *config.Config, timeout time.Duration, ...) error
- func (u *Upgrader) UpgradeNodeVersion(ctx context.Context, conf *config.Config) error
- type Validator
Constants ¶
This section is empty.
Variables ¶
var ErrInProgress = errors.New("upgrade in progress")
ErrInProgress signals that an upgrade is in progress inside the cluster.
Functions ¶
This section is empty.
Types ¶
type AWSIAMConfig ¶ added in v2.3.0
AWSIAMConfig holds the necessary values for AWS IAM configuration.
type AzureIAMConfig ¶ added in v2.3.0
AzureIAMConfig holds the necessary values for Azure IAM configuration.
type Creator ¶
type Creator struct {
// contains filtered or unexported fields
}
Creator creates cloud resources.
type GCPIAMConfig ¶ added in v2.3.0
GCPIAMConfig holds the necessary values for GCP IAM configuration.
type IAMConfig ¶ added in v2.3.0
type IAMConfig struct {
GCP GCPIAMConfig
Azure AzureIAMConfig
AWS AWSIAMConfig
}
IAMConfig holds the necessary values for IAM configuration.
type IAMCreator ¶ added in v2.3.0
type IAMCreator struct {
// contains filtered or unexported fields
}
IAMCreator creates the IAM configuration on the cloud provider.
func NewIAMCreator ¶ added in v2.3.0
func NewIAMCreator(out io.Writer) *IAMCreator
NewIAMCreator creates a new IAM creator.
type IAMDestroyer ¶ added in v2.6.0
type IAMDestroyer struct {
// contains filtered or unexported fields
}
IAMDestroyer destroys an IAM configuration.
func NewIAMDestroyer ¶ added in v2.6.0
func NewIAMDestroyer(ctx context.Context) (*IAMDestroyer, error)
NewIAMDestroyer creates a new IAM Destroyer.
func (*IAMDestroyer) DestroyIAMConfiguration ¶ added in v2.6.0
func (d *IAMDestroyer) DestroyIAMConfiguration(ctx context.Context) error
DestroyIAMConfiguration destroys the previously created IAM configuration and deletes the local IAM terraform files.
func (*IAMDestroyer) GetTfstateServiceAccountKey ¶ added in v2.6.0
func (d *IAMDestroyer) GetTfstateServiceAccountKey(ctx context.Context) (gcpshared.ServiceAccountKey, error)
GetTfstateServiceAccountKey returns the sa_key output from the terraform state.
type Terminator ¶
type Terminator struct {
// contains filtered or unexported fields
}
Terminator deletes cloud provider resources.
type Upgrader ¶
type Upgrader struct {
// contains filtered or unexported fields
}
Upgrader handles upgrading the cluster's components using the CLI.
func NewUpgrader ¶
NewUpgrader returns a new Upgrader.
func (*Upgrader) CurrentImage ¶ added in v2.6.0
CurrentImage returns the currently used image version of the cluster.
func (*Upgrader) CurrentKubernetesVersion ¶ added in v2.6.0
CurrentKubernetesVersion returns the currently used Kubernetes version.
func (*Upgrader) KubernetesVersion ¶ added in v2.3.0
KubernetesVersion returns the version of Kubernetes the Constellation is currently running on.
func (*Upgrader) UpgradeHelmServices ¶ added in v2.4.0
func (u *Upgrader) UpgradeHelmServices(ctx context.Context, config *config.Config, timeout time.Duration, allowDestructive bool) error
UpgradeHelmServices upgrade helm services.
func (*Upgrader) UpgradeNodeVersion ¶ added in v2.6.0
UpgradeNodeVersion upgrades the cluster's NodeVersion object and in turn triggers image & k8s version upgrades. The versions set in the config are validated against the versions running in the cluster.
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator validates Platform Configuration Registers (PCRs).
func NewValidator ¶
func NewValidator(provider cloudprovider.Provider, conf *config.Config, log debugLog) (*Validator, error)
NewValidator creates a new Validator.
func (*Validator) PCRS ¶
func (v *Validator) PCRS() measurements.M
PCRS returns the validator's PCR map.
func (*Validator) UpdateInitPCRs ¶
UpdateInitPCRs sets the owner and cluster PCR values.