provisioner

package
v0.0.0-...-0666c2b Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 65 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrProviderNotSupported is the error returned from porvisioners if
	// they don't support the cluster provider defined.
	ErrProviderNotSupported = errors.New("unsupported provider type")
)

Functions

This section is empty.

Types

type AWSNodePoolProvisioner

type AWSNodePoolProvisioner struct {
	NodePoolTemplateRenderer
	// contains filtered or unexported fields
}

AWSNodePoolProvisioner is a node provisioner able to provision node pools in AWS via cloudformation. TODO: move AWS specific implementation to a separate file/package.

func (*AWSNodePoolProvisioner) Provision

func (p *AWSNodePoolProvisioner) Provision(ctx context.Context, nodePools []*api.NodePool, values map[string]interface{}) error

Provision provisions node pools of the cluster.

func (*AWSNodePoolProvisioner) Reconcile

Reconcile finds all orphaned node pool stacks and decommission the node pools by scaling them down gracefully and deleting the corresponding stacks.

type AZInfo

type AZInfo struct {
	// contains filtered or unexported fields
}

AZInfo tracks information about available AZs based on explicit restrictions or available subnets

func (*AZInfo) AvailabilityZones

func (info *AZInfo) AvailabilityZones() []string

AvailabilityZones returns a list of available AZs

func (*AZInfo) RestrictAZs

func (info *AZInfo) RestrictAZs(availableAZs []string) *AZInfo

RestrictAZs returns a new AZInfo that is restricted to provided AZs

func (*AZInfo) SubnetsByAZ

func (info *AZInfo) SubnetsByAZ() map[string]string

Subnets returns a map of AZ->subnet that also contains an entry for the virtual '*' AZ TODO drop the *

type Applier

type Applier interface {
	Apply(path string) error
}

Applier defines an interface which given a path can apply manifests to a kubernetes cluster.

type FilesRenderer

type FilesRenderer struct {
	// contains filtered or unexported fields
}

func (*FilesRenderer) RenderAndUploadFiles

func (f *FilesRenderer) RenderAndUploadFiles(
	values map[string]interface{},
	bucketName string,
	kmsKey string,
) (string, error)

type HostPort

type HostPort struct {
	Host string
	Port string
}

type KarpenterNodePoolProvisioner

type KarpenterNodePoolProvisioner struct {
	NodePoolTemplateRenderer
	*kubernetes.KubeCTLRunner
	// contains filtered or unexported fields
}

func (*KarpenterNodePoolProvisioner) Provision

func (p *KarpenterNodePoolProvisioner) Provision(ctx context.Context, nodePools []*api.NodePool, values map[string]interface{}) error

func (*KarpenterNodePoolProvisioner) Reconcile

type KeyResponse

type KeyResponse struct {
	Keys []map[string]string `json:"keys"`
}

type NodePoolProvisioner

type NodePoolProvisioner interface {
	Provision(ctx context.Context, nodePools []*api.NodePool, values map[string]interface{}) error
	Reconcile(ctx context.Context, updater updatestrategy.UpdateStrategy) error
}

NodePoolProvisioner is able to provision node pools for a cluster.

type NodePoolTemplateRenderer

type NodePoolTemplateRenderer struct {
	// contains filtered or unexported fields
}

type Options

type Options struct {
	DryRun          bool
	ApplyOnly       bool
	UpdateStrategy  config.UpdateStrategy
	RemoveVolumes   bool
	ManageEtcdStack bool
}

Options is the options that can be passed to a provisioner when initialized.

type PortRange

type PortRange struct {
	FromPort, ToPort int
}

type Provider

type Provider struct {
	Issuer                 string   `json:"issuer"`
	AuthURL                string   `json:"authorization_endpoint"`
	JWKSURL                string   `json:"jwks_uri"`
	SupportedResponseTypes []string `json:"response_types_supported"`
	SupportedSubjectTypes  []string `json:"subject_types_supported"`
	AlgorithmsSupported    []string `json:"id_token_signing_alg_values_supported"`
	SupportedClaims        []string `json:"claims_supported"`
}

Provider contains the subset of the OpenID Connect provider metadata needed to request and verify ID Tokens.

type Provisioner

type Provisioner interface {
	Supports(cluster *api.Cluster) bool
	Provision(ctx context.Context, logger *log.Entry, cluster *api.Cluster, channelConfig channel.Config) error
	Decommission(ctx context.Context, logger *log.Entry, cluster *api.Cluster) error
}

Provisioner is an interface describing how to provision or decommission clusters.

func NewClusterpyProvisioner

func NewClusterpyProvisioner(execManager *command.ExecManager, tokenSource oauth2.TokenSource, secretDecrypter decrypter.Decrypter, assumedRole string, awsConfig *aws.Config, options *Options) Provisioner

NewClusterpyProvisioner returns a new ClusterPy provisioner by passing its location and and IAM role to use.

func NewStdoutProvisioner

func NewStdoutProvisioner() Provisioner

NewStdoutProvisioner creates a new provisioner which prints to stdout instead of doing any actual provsioning.

type SGIngressRange

type SGIngressRange struct {
	CIDR             string
	FromPort, ToPort int
	Protocol         string
}

Jump to

Keyboard shortcuts

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