Documentation ¶
Index ¶
- Variables
- func GenerateSampleConfig(ctx context.Context, cloudProvider string)
- func InitConfig()
- func ParseConfig(ctx context.Context, configAsString string)
- func RegisterAWSCredentialsFlags(command *cobra.Command)
- func RegisterConfigFilePathFlag(command *cobra.Command)
- func RegisterHetznerCredentialsFlags(command *cobra.Command)
- func ValidateK8sVersion(ctx context.Context, k8sVersion string)
- type AMIConfig
- type AWSConfig
- type AWSCredentials
- type AWSDisasterRecoveryConfig
- type AzureConfig
- type CloudConfig
- type ClusterConfig
- type Config
- type ControlPlaneConfig
- type ForksConfig
- type GitConfig
- type HetznerConfig
- type HetznerCredentials
- type HetznerNodeConfigs
- type MonitoringConfig
- type NodeGroups
- type SSHKeyPairConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AWSAccessKey, AWSSecretKey, AWSSessionToken, AWSRegion string )
View Source
var ConfigFilePath string
View Source
var ( HetznerAPIToken, HetznerRobotUser, HetznerRobotPassword string )
View Source
var ParsedConfig = &Config{}
View Source
var SampleConfigs embed.FS
Functions ¶
func GenerateSampleConfig ¶
func InitConfig ¶
func InitConfig()
Read config file from the given file path. Then, parse and validate it.
func ParseConfig ¶
func ValidateK8sVersion ¶
Checks whether the given string represents a valid and supported Kubernetes version or not. If not, then panics.
Types ¶
type AMIConfig ¶
type AMIConfig struct {
ID string `yaml:"id" validate:"required,notblank"`
}
AWS specific.
type AWSConfig ¶
type AWSConfig struct { Credentials AWSCredentials Region string `yaml:"region"` BastionEnabled bool `yaml:"bastionEnabled" default:"True"` ControlPlane ControlPlaneConfig `yaml:"controlPlane" validate:"required"` NodeGroups []NodeGroups `yaml:"nodeGroups" validate:"required"` SSHKeyName string `yaml:"sshKeyName" validate:"required,notblank"` DisasterRecovery *AWSDisasterRecoveryConfig `yaml:"disasterRecovery"` }
AWS specific.
type AWSCredentials ¶
type AWSCredentials struct { AWSAccessKey string `validate:"required,notblank"` AWSSecretKey string `validate:"required,notblank"` AWSSessionToken string AWSRegion string `validate:"required,notblank"` }
AWS specific.
type AWSDisasterRecoveryConfig ¶
type AWSDisasterRecoveryConfig struct { VeleroBackupsS3BucketName string `yaml:"veleroBackupsS3BucketName" validate:"required,notblank"` SealedSecretsBackupS3BucketName string `yaml:"sealedSecretsBackupS3BucketName" validate:"required,notblank"` }
AWS specific.
type CloudConfig ¶
type CloudConfig struct { AWS *AWSConfig `yaml:"aws"` Hetzner *HetznerConfig `yaml:"hetzner"` Azure *AzureConfig `yaml:"azure"` }
type ClusterConfig ¶
type Config ¶
type Config struct { CustomerID string `yaml:"customerID"` Git GitConfig `yaml:"git" validate:"required"` Cluster ClusterConfig `yaml:"cluster" validate:"required"` Forks ForksConfig `yaml:"forks" validate:"required"` Cloud CloudConfig `yaml:"cloud" validate:"required"` Monitoring MonitoringConfig `yaml:"monitoring"` }
type ControlPlaneConfig ¶
type ControlPlaneConfig struct { Replicas int `yaml:"replicas" validate:"required"` InstanceType string `yaml:"instanceType" validate:"required,notblank"` AMI AMIConfig `yaml:"ami" validate:"required"` }
AWS specific.
type ForksConfig ¶
type HetznerConfig ¶
type HetznerConfig struct { Credentials HetznerCredentials // Robot is Hetzner's administration panel for dedicated root servers, colocation, Storage Boxes, // and domains (via the Domain Registration Robot add-on). RobotSSHKeyPair SSHKeyPairConfig `yaml:"robotSSHKey" validate:"required"` ControlPlaneEndpoint string `yaml:"controlPlaneEndpoint" validate:"required,notblank"` BareMetalNodes map[string]HetznerNodeConfigs `yaml:"bareMetalNodes" validate:"required"` }
Hetzner specific.
type HetznerCredentials ¶
type HetznerCredentials struct { HetznerAPIToken string `validate:"required,notblank"` HetznerRobotUser string `validate:"required,notblank"` HetznerRobotPassword string `validate:"required,notblank"` }
Hetzner specific.
type HetznerNodeConfigs ¶
type HetznerNodeConfigs struct { Name string `yaml:"name" validate:"required,notblank"` WWN []string `yaml:"wwn" validate:"required,notblank"` // World Wide Name, a unique identifier. }
Hetzner specific.
type MonitoringConfig ¶
type NodeGroups ¶
type NodeGroups struct { Name string `yaml:"name" validate:"required,notblank"` Replicas int `yaml:"replicas" validate:"required"` InstanceType string `yaml:"instanceType" validate:"required,notblank"` SSHKeyName string `yaml:"sshKeyName" validate:"required,notblank"` AMI AMIConfig `yaml:"ami" validate:"required"` RootVolumeSize int `yaml:"rootVolumeSize" validate:"required"` Labels map[string]string `yaml:"labels" default:"[]"` Taints []*coreV1.Taint `yaml:"taints" default:"[]"` }
AWS specific.
type SSHKeyPairConfig ¶
Click to show internal directories.
Click to hide internal directories.