infrastructure

package
v0.0.0-...-d888b32 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package infrastructure contains infrastructure providers setup hooks and ready conditions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSDeployOptions

type AWSDeployOptions struct {
	ControlPlaneMachineType   string
	ControlPlaneIAMProfile    string
	ControlPlaneAMIID         string
	ControlPlaneADDLSecGroups string
	NodeMachineType           string
	NodeIAMProfile            string
	NodeAMIID                 string
	NodeADDLSecGroups         string
	Region                    string
	SSHKeyName                string
	VPCID                     string
	Subnet                    string
	CloudProviderVersion      string
	CalicoVersion             string
	ControlPlaneVolSize       int64
	NodeVolSize               int64
}

AWSDeployOptions defines provider specific settings for cluster deployment.

func NewAWSDeployOptions

func NewAWSDeployOptions() *AWSDeployOptions

NewAWSDeployOptions returns default deploy options for the AWS infra provider.

type AWSProvider

type AWSProvider struct {
	B64EncodedCredentials string
	ProviderVersion       string
	ProviderNS            string
	WatchingNS            string
}

AWSProvider infrastructure provider.

func NewAWSProvider

func NewAWSProvider(version, providerNS, watchingNS string) (*AWSProvider, error)

NewAWSProvider creates new AWS infrastructure provider.

func (*AWSProvider) ClusterVars

func (s *AWSProvider) ClusterVars(opts interface{}) (Variables, error)

ClusterVars returns config overrides for template generation.

func (*AWSProvider) Configure

func (s *AWSProvider) Configure(providerOptions interface{}) error

Configure implements Provider interface.

func (*AWSProvider) GetClusterTemplate

func (s *AWSProvider) GetClusterTemplate(client client.Client, opts client.GetClusterTemplateOptions) (client.Template, error)

GetClusterTemplate implements Provider interface.

func (*AWSProvider) IsInstalled

func (s *AWSProvider) IsInstalled(ctx context.Context, clientset *kubernetes.Clientset) (bool, error)

IsInstalled implements Provider interface.

func (*AWSProvider) Name

func (s *AWSProvider) Name() string

Name implements Provider interface.

func (*AWSProvider) Namespace

func (s *AWSProvider) Namespace() string

Namespace implements Provider interface.

func (*AWSProvider) ProviderVars

func (s *AWSProvider) ProviderVars() (Variables, error)

ProviderVars returns config overrides for the provider installation.

func (*AWSProvider) Version

func (s *AWSProvider) Version() string

Version implements Provider interface.

func (*AWSProvider) WaitReady

func (s *AWSProvider) WaitReady(ctx context.Context, clientset *kubernetes.Clientset) error

WaitReady implements Provider interface.

func (*AWSProvider) WatchingNamespace

func (s *AWSProvider) WatchingNamespace() string

WatchingNamespace implements Provider interface.

type AWSSetupOptions

type AWSSetupOptions struct {
	AWSCredentials       string
	AWSProviderNamespace string
	AWSWatchingNamespace string
}

AWSSetupOptions AWS specific setup options.

func NewAWSSetupOptions

func NewAWSSetupOptions() *AWSSetupOptions

NewAWSSetupOptions creates new AWSSetupOptions.

type Provider

type Provider interface {
	Name() string
	Namespace() string
	Version() string
	WatchingNamespace() string
	Configure(interface{}) error
	ProviderVars() (Variables, error)
	ClusterVars(interface{}) (Variables, error)
	IsInstalled(ctx context.Context, clientset *kubernetes.Clientset) (bool, error)
	GetClusterTemplate(client.Client, client.GetClusterTemplateOptions) (client.Template, error)
	WaitReady(context.Context, *kubernetes.Clientset) error
}

Provider defines an interface for the infrastructure provider.

func NewProvider

func NewProvider(providerType string, opts ...ProviderOption) (Provider, error)

NewProvider creates a new provider from a specified type.

type ProviderOption

type ProviderOption func(*ProviderOptions)

ProviderOption is the functional options func.

func WithProviderNS

func WithProviderNS(ns string) ProviderOption

WithProviderNS sets the namespace to something non-default.

func WithWatchingNS

func WithWatchingNS(ns string) ProviderOption

WithWatchingNS sets the watching namespace to something non-global.

type ProviderOptions

type ProviderOptions struct {
	ProviderNS string
	WatchingNS string
}

ProviderOptions is the functional options struct.

type Variables

type Variables map[string]string

Variables is a map of key value pairs of config parameters.

Jump to

Keyboard shortcuts

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