Documentation ¶
Index ¶
- Constants
- Variables
- type AWSNodePoolProvisioner
- type AZInfo
- type Applier
- type CreationHook
- type EKSClusterDetails
- type FilesRenderer
- type HookResponse
- type HostPort
- type KarpenterNodePoolProvisioner
- type KeyResponse
- type NodePoolProvisioner
- type NodePoolTemplateRenderer
- type Options
- type PortRange
- type Provider
- type Provisioner
- type SGIngressRange
- type SubnetInfo
- type ZalandoAWSProvisioner
- func (z *ZalandoAWSProvisioner) Decommission(ctx context.Context, logger *log.Entry, cluster *api.Cluster) error
- func (p *ZalandoAWSProvisioner) Deletions(ctx context.Context, logger *log.Entry, tokenSource oauth2.TokenSource, ...) error
- func (z *ZalandoAWSProvisioner) Provision(ctx context.Context, logger *log.Entry, cluster *api.Cluster, ...) error
- func (z *ZalandoAWSProvisioner) Supports(cluster *api.Cluster) bool
- type ZalandoEKSCreationHook
- type ZalandoEKSProvisioner
- func (z *ZalandoEKSProvisioner) Decommission(ctx context.Context, logger *log.Entry, cluster *api.Cluster) error
- func (p *ZalandoEKSProvisioner) Deletions(ctx context.Context, logger *log.Entry, tokenSource oauth2.TokenSource, ...) error
- func (z *ZalandoEKSProvisioner) Provision(ctx context.Context, logger *log.Entry, cluster *api.Cluster, ...) error
- func (z *ZalandoEKSProvisioner) Supports(cluster *api.Cluster) bool
Constants ¶
const ( KeyEKSEndpoint = "eks_endpoint" KeyEKSCAData = "eks_certificate_authority_data" KeyEKSOIDCIssuerURL = "eks_oidc_issuer_url" )
Variables ¶
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 ¶
func (p *AWSNodePoolProvisioner) Reconcile(ctx context.Context, updater updatestrategy.UpdateStrategy) error
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 ¶
AvailabilityZones returns a list of available AZs
func (*AZInfo) RestrictAZs ¶
RestrictAZs returns a new AZInfo that is restricted to provided AZs
func (*AZInfo) SubnetIPv6CIDRs ¶
SubnetIPv6CIDRs returns a list of available subnet IPV6 CIDRs.
func (*AZInfo) SubnetsByAZ ¶
Subnets returns a map of AZ->subnet that also contains an entry for the virtual '*' AZ TODO drop the *
type Applier ¶
Applier defines an interface which given a path can apply manifests to a kubernetes cluster.
type CreationHook ¶
type CreationHook interface { // Execute performs updates used by a provisioner during cluster // creation. Execute( adapter awsInterface, cluster *api.Cluster, ) ( *HookResponse, error, ) }
CreationHook is an interface that provisioners can use while provisioning a cluster.
This is useful for example to pass additional configuration only known at a later stage of provisioning. For example, when provisioning an EKS cluster, the provisioner only knows what is the API Server URL after applying the initial CloudFormation.
func NewZalandoEKSCreationHook ¶
func NewZalandoEKSCreationHook( clusterRegistry registry.Registry, ) CreationHook
NewZalandoEKSCreationHook returns a new hook for EKS cluster provisioning, configured to use the given cluster registry.
type EKSClusterDetails ¶
type EKSClusterDetails struct { Endpoint string CertificateAuthority string OIDCIssuerURL string ServiceCIDR string }
EKSClusterDetails contains details of an EKS cluster that are only available after creation.
type FilesRenderer ¶
type FilesRenderer struct {
// contains filtered or unexported fields
}
func (*FilesRenderer) RenderAndUploadFiles ¶
type HookResponse ¶
HookResponse contain configuration parameters that a provisioner can use at a later stage.
type KarpenterNodePoolProvisioner ¶
type KarpenterNodePoolProvisioner struct { NodePoolTemplateRenderer *kubernetes.KubeCTLRunner // contains filtered or unexported fields }
func NewKarpenterNodePoolProvisioner ¶
func NewKarpenterNodePoolProvisioner( n NodePoolTemplateRenderer, e *command.ExecManager, ts oauth2.TokenSource, options *HookResponse, ) (*KarpenterNodePoolProvisioner, error)
func (*KarpenterNodePoolProvisioner) Reconcile ¶
func (p *KarpenterNodePoolProvisioner) Reconcile(ctx context.Context, updater updatestrategy.UpdateStrategy) error
type KeyResponse ¶
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 Hook CreationHook }
Options is the options that can be passed to a provisioner when initialized.
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 NewStdoutProvisioner ¶
func NewStdoutProvisioner() Provisioner
NewStdoutProvisioner creates a new provisioner which prints to stdout instead of doing any actual provsioning.
func NewZalandoAWSProvisioner ¶
func NewZalandoAWSProvisioner( execManager *command.ExecManager, tokenSource oauth2.TokenSource, secretDecrypter decrypter.Decrypter, assumedRole string, awsConfig *aws.Config, options *Options, ) Provisioner
NewZalandoAWSProvisioner returns a new provisioner by passing its location and and IAM role to use.
func NewZalandoEKSProvisioner ¶
func NewZalandoEKSProvisioner( execManager *command.ExecManager, secretDecrypter decrypter.Decrypter, assumedRole string, awsConfig *aws.Config, options *Options, ) Provisioner
NewZalandoEKSProvisioner returns a new provisioner capable of provisioning EKS clusters by passing its location and and IAM role to use.
type SGIngressRange ¶
type SubnetInfo ¶
SubnetInfo has information about a subnet.
type ZalandoAWSProvisioner ¶
type ZalandoAWSProvisioner struct {
// contains filtered or unexported fields
}
func (*ZalandoAWSProvisioner) Decommission ¶
func (z *ZalandoAWSProvisioner) Decommission( ctx context.Context, logger *log.Entry, cluster *api.Cluster, ) error
Decommission decommissions a cluster provisioned in AWS.
func (*ZalandoAWSProvisioner) Deletions ¶
func (p *ZalandoAWSProvisioner) Deletions( ctx context.Context, logger *log.Entry, tokenSource oauth2.TokenSource, cluster *api.Cluster, deletions []*kubernetes.Resource, options *HookResponse, ) error
Deletions deletes the provided kubernetes resources from the cluster.
type ZalandoEKSCreationHook ¶
type ZalandoEKSCreationHook struct {
// contains filtered or unexported fields
}
ZalandoEKSCreationHook is a hook specific for EKS cluster provisioning.
func (*ZalandoEKSCreationHook) Execute ¶
func (z *ZalandoEKSCreationHook) Execute( adapter awsInterface, cluster *api.Cluster, ) (*HookResponse, error)
Execute updates the configuration only known after deploying the first CloudFormation stack.
The method returns the API server URL, the Certificate Authority data, and the subnets. Additionally Execute updates the configured cluster registry with the EKS API Server URL and the Certificate Authority data.
type ZalandoEKSProvisioner ¶
type ZalandoEKSProvisioner struct {
// contains filtered or unexported fields
}
func (*ZalandoEKSProvisioner) Decommission ¶
func (*ZalandoEKSProvisioner) Deletions ¶
func (p *ZalandoEKSProvisioner) Deletions( ctx context.Context, logger *log.Entry, tokenSource oauth2.TokenSource, cluster *api.Cluster, deletions []*kubernetes.Resource, options *HookResponse, ) error
Deletions deletes the provided kubernetes resources from the cluster.