Documentation
¶
Index ¶
- Variables
- func GenerateSampleConfig(ctx context.Context, cloudProvider, flavor string)
- func NewAWSCloudProvider() cloud.CloudProvider
- func NewAzureCloudProvider() cloud.CloudProvider
- func NewHetznerCloudProvider() cloud.CloudProvider
- func ParseConfigFiles(ctx context.Context, configsDirectory string)
- func RegisterAWSCredentialsFlags(command *cobra.Command)
- func RegisterAzureCredentialsFlags(command *cobra.Command)
- func RegisterConfigsDirectoryFlag(command *cobra.Command)
- func RegisterHetznerCredentialsFlags(command *cobra.Command)
- func ValidateK8sVersion(ctx context.Context, k8sVersion string)
- type AADApplication
- type AMIConfig
- type APIServerConfig
- type AWSConfig
- type AWSControlPlane
- type AWSCredentials
- type AWSNodeGroup
- type AzureConfig
- type AzureControlPlane
- type AzureCredentials
- type AzureNodeGroup
- type CloudConfig
- type ClusterConfig
- type DisasterRecoveryConfig
- type FileConfig
- type ForksConfig
- type GeneralConfig
- type GitConfig
- type GitCredentials
- type HCloudControlPlaneLoadBalancer
- type HCloudNodeGroup
- type HetznerConfig
- type HetznerControlPlane
- type HetznerCredentials
- type HetznerNodeGroups
- type HostPathMountConfig
- type LocalConfig
- type MonitoringConfig
- type NodeGroup
- type SSHKeyPairConfig
- type SecretsConfig
- type UserConfig
- type WorkloadIdentity
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GeneralConfigFileContents []byte ParsedGeneralConfig = &GeneralConfig{} ParsedSecretsConfig = &SecretsConfig{} )
View Source
var AWSAccessKeyID, AWSSecretAccessKey, AWSSessionToken string
View Source
var AzureClientSecret string
View Source
var ConfigsDirectory string
View Source
var HetznerAPIToken, HetznerRobotUsername, HetznerRobotPassword string
View Source
var SampleConfigs embed.FS
Functions ¶
func GenerateSampleConfig ¶
func NewAWSCloudProvider ¶
func NewAWSCloudProvider() cloud.CloudProvider
func NewAzureCloudProvider ¶
func NewAzureCloudProvider() cloud.CloudProvider
func NewHetznerCloudProvider ¶ added in v0.11.0
func NewHetznerCloudProvider() cloud.CloudProvider
func ParseConfigFiles ¶ added in v0.7.2
func RegisterConfigsDirectoryFlag ¶ added in v0.7.2
func ValidateK8sVersion ¶
Checks whether the given string represents a valid and supported Kubernetes version or not. If not, then panics.
Types ¶
type AADApplication ¶
type AADApplication struct {
Name string `yaml:"name" validate:"notblank"`
ObjectID string `yaml:"objectID" validate:"notblank"`
ServicePrincipalID string `yaml:"servicePrincipalID" validate:"notblank"`
}
Azure specific.
type APIServerConfig ¶
type APIServerConfig struct {
ExtraArgs map[string]string `yaml:"extraArgs" default:"{}"`
ExtraVolumes []HostPathMountConfig `yaml:"extraVolumes" default:"[]"`
Files []FileConfig `yaml:"files" default:"[]"`
}
NOTE : Generally, refer to the KubeadmControlPlane CRD instead of the corresponding GoLang
source types linked below. There are some configuration options which appear in the corresponding GoLang source type, but not in the CRD. If you set those fields, then they get removed by the Kubeadm control-plane provider. This causes the capi-cluster ArgoCD App to always be in an OutOfSync state, resulting to the KubeAid Bootstrap Script not making any progress!
type AWSConfig ¶
type AWSConfig struct {
Region string `yaml:"region" validate:"notblank"`
SSHKeyName string `yaml:"sshKeyName" validate:"notblank"`
VPCID *string `yaml:"vpcID"`
BastionEnabled bool `yaml:"bastionEnabled" default:"True"`
ControlPlane AWSControlPlane `yaml:"controlPlane" validate:"required"`
NodeGroups []AWSNodeGroup `yaml:"nodeGroups" validate:"required"`
}
AWS specific.
type AWSControlPlane ¶
type AWSControlPlane struct {
LoadBalancerScheme string `yaml:"loadBalancerScheme" default:"internet-facing" validate:"notblank"`
Replicas uint32 `yaml:"replicas" validate:"required"`
InstanceType string `yaml:"instanceType" validate:"notblank"`
AMI AMIConfig `yaml:"ami" validate:"required"`
}
AWS specific.
type AWSCredentials ¶
type AWSNodeGroup ¶
type AWSNodeGroup struct {
NodeGroup `yaml:",inline"`
AMI AMIConfig `yaml:"ami" validate:"required"`
InstanceType string `yaml:"instanceType" validate:"notblank"`
RootVolumeSize uint32 `yaml:"rootVolumeSize" validate:"required"`
SSHKeyName string `yaml:"sshKeyName" validate:"notblank"`
}
AWS specific.
type AzureConfig ¶
type AzureConfig struct {
TenantID string `yaml:"tenantID" validate:"notblank"`
SubscriptionID string `yaml:"subscriptionID" validate:"notblank"`
AADApplication AADApplication `yaml:"aadApplication" validate:"required"`
Location string `yaml:"location" validate:"notblank"`
StorageAccount string `yaml:"storageAccount" validate:"notblank"`
WorkloadIdentity WorkloadIdentity `yaml:"workloadIdentity" validate:"required"`
SSHPublicKey string `yaml:"sshPublicKey" validate:"notblank"`
ImageID *string `yaml:"imageID"`
ControlPlane AzureControlPlane `yaml:"controlPlane" validate:"required"`
NodeGroups []AzureNodeGroup `yaml:"nodeGroups" validate:"required,gt=0"`
}
Azure specific.
type AzureControlPlane ¶
type AzureControlPlane struct {
LoadBalancerType string `yaml:"loadBalancerType" validate:"notblank" default:"Public"`
DiskSizeGB uint32 `yaml:"diskSizeGB" validate:"required,gt=100"`
VMSize string `yaml:"vmSize" validate:"notblank"`
Replicas uint32 `yaml:"replicas" validate:"required,gt=0"`
}
Azure specific.
type AzureCredentials ¶ added in v0.7.2
type AzureNodeGroup ¶
type AzureNodeGroup struct {
NodeGroup `yaml:",inline"`
VMSize string `yaml:"vmSize" validate:"notblank"`
DiskSizeGB uint32 `yaml:"diskSizeGB" validate:"required"`
}
Azure specific.
type CloudConfig ¶
type CloudConfig struct {
AWS *AWSConfig `yaml:"aws"`
Hetzner *HetznerConfig `yaml:"hetzner"`
Azure *AzureConfig `yaml:"azure"`
Local *LocalConfig `yaml:"local"`
DisasterRecovery *DisasterRecoveryConfig `yaml:"disasterRecovery"`
}
type ClusterConfig ¶
type ClusterConfig struct {
Name string `yaml:"name" validate:"notblank"`
K8sVersion string `yaml:"k8sVersion" validate:"notblank"`
KubeaidVersion string `yaml:"kubeaidVersion" validate:"notblank"`
EnableAuditLogging bool `yaml:"enableAuditLogging" default:"True"`
APIServer APIServerConfig `yaml:"apiServer"`
AdditionalUsers []UserConfig `yaml:"additionalUsers"`
}
type DisasterRecoveryConfig ¶ added in v0.9.0
type FileConfig ¶
type FileConfig struct {
Path string `yaml:"path" validate:"notblank"`
Content string `yaml:"content" validate:"notblank"`
}
REFER : "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1".File
type ForksConfig ¶
type GeneralConfig ¶ added in v0.7.2
type GeneralConfig struct {
CustomerID string `yaml:"customerID"`
Git GitConfig `yaml:"git"`
Cluster ClusterConfig `yaml:"cluster" validate:"required"`
Forks ForksConfig `yaml:"forkURLs" validate:"required"`
Cloud CloudConfig `yaml:"cloud" validate:"required"`
Monitoring MonitoringConfig `yaml:"monitoring"`
}
type GitCredentials ¶ added in v0.7.2
type HCloudControlPlaneLoadBalancer ¶ added in v0.11.0
type HCloudControlPlaneLoadBalancer struct {
Enabled bool `yaml:"enabled" validate:"required"`
Region string `yaml:"region" validate:"notblank"`
}
Hetzner specific.
type HCloudNodeGroup ¶
type HCloudNodeGroup struct {
NodeGroup `yaml:",inline"`
MachineType string `yaml:"machineType" validate:"notblank"`
RootVolumeSize uint32 ` validate:"required"`
}
Hetzner specific.
type HetznerConfig ¶
type HetznerConfig struct {
Mode string `yaml:"mode" default:"hcloud" validate:"notblank,oneof=bare-metal hcloud hybrid"`
Zone string `yaml:"zone" validate:"notblank"`
Region string `yaml:"region" validate:"notblank"`
HCloudSSHKeyPairName string `yaml:"hcloudSSHKeyPairName" validate:"notblank"`
NetworkEnabled bool `yaml:"networkEnabled" default:"True" validate:"required"`
ImageName string `yaml:"imageName" default:"ubuntu-24.04" validate:"notblank"`
ControlPlane HetznerControlPlane `yaml:"controlPlane" validate:"required"`
NodeGroups HetznerNodeGroups `yaml:"nodeGroups" validate:"required"`
}
Hetzner specific.
type HetznerControlPlane ¶ added in v0.11.0
type HetznerControlPlane struct {
MachineType string `yaml:"machineType" validate:"notblank"`
Replicas uint `yaml:"replicas" validate:"required"`
Regions []string `yaml:"regions" validate:"required,gt=0"`
LoadBalancer HCloudControlPlaneLoadBalancer `yaml:"loadBalancer"`
}
Hetzner specific.
type HetznerCredentials ¶
type HetznerCredentials struct {
APIToken string `yaml:"apiToken" validate:"notblank"`
}
type HetznerNodeGroups ¶ added in v0.11.0
type HetznerNodeGroups struct {
HCloud []HCloudNodeGroup `yaml:"hcloud"`
}
Hetzner specific.
type HostPathMountConfig ¶
type HostPathMountConfig struct {
Name string `yaml:"name" validate:"notblank"`
HostPath string `yaml:"hostPath" validate:"notblank"`
MountPath string `yaml:"mountPath" validate:"notblank"`
PathType coreV1.HostPathType `yaml:"pathType" validate:"required"`
/*
Whether the mount should be read-only or not.
Defaults to true.
NOTE : If you want the mount to be read-only, then set this true.
Otherwise, omit setting this field. It gets removed by the Kubeadm control-plane
provider component, which results to the capi-cluster ArgoCD App always being in
OutOfSync state.
*/
ReadOnly bool `yaml:"readOnly,omitempty"`
}
REFER : "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1".HostPathMount
type MonitoringConfig ¶
type NodeGroup ¶
type NodeGroup struct {
Name string `yaml:"name" validate:"notblank"`
CPU uint32 `validate:"required"`
Memory uint32 `validate:"required"`
MinSize uint `yaml:"minSize" validate:"required"`
Maxsize uint `yaml:"maxSize" validate:"required"`
Labels map[string]string `yaml:"labels" default:"[]"`
Taints []*coreV1.Taint `yaml:"taints" default:"[]"`
}
type SSHKeyPairConfig ¶
type SecretsConfig ¶ added in v0.7.2
type SecretsConfig struct {
Git GitCredentials `yaml:"git"`
AWS *AWSCredentials `yaml:"aws"`
Azure *AzureCredentials `yaml:"azure"`
Hetzner *HetznerCredentials `yaml:"hetzner"`
}
type UserConfig ¶
type WorkloadIdentity ¶
type WorkloadIdentity struct {
OpenIDProviderSSHKeyPair SSHKeyPairConfig `yaml:"openIDProviderSSHKeyPair" validate:"notblank"`
}
Azure specific.
Click to show internal directories.
Click to hide internal directories.