bastion

package
v1.46.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: Apache-2.0, MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SSHPort is the default SSH port.
	SSHPort = 22
	// InstanceStateShuttingDown is the AWS status code for an EC2 instance that
	// is currently shutting down.
	InstanceStateShuttingDown = 32
	// InstanceStateTerminated is the AWS status code for an EC2 instance that
	// has been terminated.
	InstanceStateTerminated = 48
)

Variables

View Source
var (
	// DefaultAddOptions are the default AddOptions for AddToManager.
	DefaultAddOptions = AddOptions{}
)

Functions

func AddToManager

func AddToManager(_ context.Context, mgr manager.Manager) error

AddToManager adds a controller with the default Options.

func AddToManagerWithOptions

func AddToManagerWithOptions(mgr manager.Manager, opts AddOptions) error

AddToManagerWithOptions adds a controller with the given Options to the given manager. The opts.Reconciler is being set with a newly instantiated actuator.

func IngressReady

func IngressReady(ingress *corev1.LoadBalancerIngress) bool

IngressReady returns true if either an IP or a hostname or both are set.

Types

type AddOptions

type AddOptions struct {
	// Controller are the controller.Options.
	Controller controller.Options
	// IgnoreOperationAnnotation specifies whether to ignore the operation annotation or not.
	IgnoreOperationAnnotation bool
}

AddOptions are options to apply when adding the AWS bastion controller to the manager.

type Options

type Options struct {
	Shoot                    *gardencorev1beta1.Shoot
	SubnetID                 string
	VPCID                    string
	BastionSecurityGroupName string
	WorkerSecurityGroupName  string
	WorkerSecurityGroupID    string
	InstanceName             string
	InstanceType             string
	ImageID                  string

	// set later during reconciling phase
	BastionSecurityGroupID string
}

Options contains provider-related information required for setting up a bastion instance. This struct combines precomputed values like the bastion instance name with the IDs of pre-existing cloud provider resources, like the VPC ID, subnet ID etc.

func DetermineOptions

func DetermineOptions(ctx context.Context, bastion *extensionsv1alpha1.Bastion, cluster *controller.Cluster, awsClient *awsclient.Client) (*Options, error)

DetermineOptions determines the required information like VPC ID and instance type that are required to reconcile a Bastion on AWS. This function does not create any IaaS resources.

Jump to

Keyboard shortcuts

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