provider

package
v2.34.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAppsRepoName = "default-apps-aws"
	ClusterAWSRepoName  = "cluster-aws"
	ModePrivate         = "private"
)
View Source
const (
	DefaultAppsGCPRepoName = "default-apps-gcp"
	ClusterGCPRepoName     = "cluster-gcp"
)

Variables

This section is empty.

Functions

func BuildCapaClusterConfig added in v2.30.0

func BuildCapaClusterConfig(config ClusterConfig) capa.ClusterConfig

func BuildCapgClusterConfig added in v2.30.0

func BuildCapgClusterConfig(config ClusterConfig) capg.ClusterConfig

func BuildCapoClusterConfig added in v2.30.0

func BuildCapoClusterConfig(config ClusterConfig, controlPlaneReplicas int) openstack.ClusterConfig

func GetClusterApp added in v2.34.0

func GetClusterApp(ctx context.Context, client k8sclient.Interface, capiProvider, clusterAppCatalog, clusterAppVersion string) (applicationv1alpha1.App, error)

func GetDefaultApp added in v2.34.0

func GetDefaultApp(ctx context.Context, client k8sclient.Interface, capiProvider, clusterAppCatalog, clusterAppVersion string) (applicationv1alpha1.App, error)

func IsInvalidFlag

func IsInvalidFlag(err error) bool

IsInvalidFlag asserts invalidFlagError.

func TemplateClusterApp added in v2.34.0

func TemplateClusterApp(ctx context.Context, output io.Writer, provider, clusterName, clusterOrganization string, clusterApp applicationv1alpha1.App, clusterAppConfigValues map[string]interface{}) error

templateClusterApp templates the Cluster app

func TemplateDefaultApp added in v2.34.0

func TemplateDefaultApp(ctx context.Context, output io.Writer, provider, clusterName, clusterOrganization string, clusterApp applicationv1alpha1.App, clusterAppConfigValues map[string]interface{}) error

templateClusterApp templates the Cluster app

func ValidateYAML added in v2.34.0

func ValidateYAML(ctx context.Context, logger micrologger.Logger, client k8sclient.Interface, clusterApp applicationv1alpha1.App, yaml map[string]interface{}) error

validateYAML validates the given yaml against the cluster specific app values schema

func WriteAWSTemplate

func WriteAWSTemplate(ctx context.Context, client k8sclient.Interface, out io.Writer, config ClusterConfig) error

func WriteAzureTemplate

func WriteAzureTemplate(ctx context.Context, client k8sclient.Interface, out io.Writer, config ClusterConfig) error

func WriteCAPAEKSTemplate

func WriteCAPAEKSTemplate(ctx context.Context, client k8sclient.Interface, out io.Writer, config ClusterConfig) error

func WriteCAPATemplate

func WriteCAPATemplate(ctx context.Context, client k8sclient.Interface, output io.Writer, config ClusterConfig) error

func WriteGCPTemplate

func WriteGCPTemplate(ctx context.Context, client k8sclient.Interface, output io.Writer, config ClusterConfig) error

func WriteGSAWSTemplate

func WriteGSAWSTemplate(ctx context.Context, client k8sclient.Interface, out io.Writer, config ClusterConfig) error

func WriteGSAzureTemplate

func WriteGSAzureTemplate(ctx context.Context, client k8sclient.Interface, out io.Writer, config ClusterConfig) error

func WriteOpenStackTemplate

func WriteOpenStackTemplate(ctx context.Context, k8sClient k8sclient.Interface, output io.Writer, config ClusterConfig) error

func WriteVSphereTemplate

func WriteVSphereTemplate(ctx context.Context, client k8sclient.Interface, out io.Writer, config ClusterConfig) error

Types

type AWSConfig

type AWSConfig struct {
	EKS                bool
	ExternalSNAT       bool
	ControlPlaneSubnet string

	// for CAPA
	AWSClusterRoleIdentityName string
	MachinePool                AWSMachinePoolConfig
	NetworkAZUsageLimit        int
	NetworkVPCCIDR             string
	ClusterType                string
	HttpProxy                  string
	HttpsProxy                 string
	NoProxy                    string
	APIMode                    string
	VPCMode                    string
	DNSMode                    string
	TopologyMode               string
	PrefixListID               string
	TransitGatewayID           string
}

type AWSMachinePoolConfig

type AWSMachinePoolConfig struct {
	Name             string
	MinSize          int
	MaxSize          int
	AZs              []string
	InstanceType     string
	RootVolumeSizeGB int
	CustomNodeLabels []string
}

type AppConfig

type AppConfig struct {
	ClusterCatalog     string
	ClusterVersion     string
	DefaultAppsCatalog string
	DefaultAppsVersion string
}

type ClusterConfig

type ClusterConfig struct {
	KubernetesVersion string
	FileName          string
	ControlPlaneAZ    []string
	Description       string
	Name              string
	Organization      string
	ReleaseVersion    string
	ReleaseComponents map[string]string
	Labels            map[string]string
	Namespace         string
	PodsCIDR          string
	OIDC              OIDC
	ServicePriority   string

	Region                   string
	BastionInstanceType      string
	BastionReplicas          int
	ControlPlaneInstanceType string

	App       AppConfig
	AWS       AWSConfig
	GCP       GCPConfig
	OpenStack OpenStackConfig
}

type GCPConfig

type GCPConfig struct {
	Project           string
	FailureDomains    []string
	ControlPlane      GCPControlPlane
	MachineDeployment GCPMachineDeployment
}

type GCPControlPlane

type GCPControlPlane struct {
	ServiceAccount ServiceAccount
}

type GCPMachineDeployment

type GCPMachineDeployment struct {
	Name             string
	FailureDomain    string
	InstanceType     string
	Replicas         int
	RootVolumeSizeGB int
	CustomNodeLabels []string
	ServiceAccount   ServiceAccount
}

type MachineConfig

type MachineConfig struct {
	BootFromVolume bool
	DiskSize       int
	Flavor         string
	Image          string
}

type OIDC

type OIDC struct {
	IssuerURL     string
	CAFile        string
	ClientID      string
	UsernameClaim string
	GroupsClaim   string
}

type OpenStackConfig

type OpenStackConfig struct {
	Cloud          string
	CloudConfig    string
	DNSNameservers []string

	ExternalNetworkID string
	NodeCIDR          string
	NetworkName       string
	SubnetName        string

	Bastion      MachineConfig
	ControlPlane MachineConfig
	Worker       MachineConfig

	WorkerFailureDomain string
	WorkerReplicas      int
}

type ServiceAccount

type ServiceAccount struct {
	Email  string
	Scopes []string
}

Directories

Path Synopsis
templates
aws
gcp

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL