legacy

package
v0.0.0-...-17b5b8b Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2018 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is the identifier of the resource.
	Name = "legacyv2"
)

Variables

This section is empty.

Functions

func IsDifferentImageIDs

func IsDifferentImageIDs(err error) bool

IsDifferentImageIDs assert differentImageIDsError.

func IsDifferentInstanceTypes

func IsDifferentInstanceTypes(err error) bool

IsDifferentInstanceTypes asserts differentInstanceTypesError.

func IsExecutionFailedError

func IsExecutionFailedError(err error) bool

IsExecutionFailedError asserts isExecutionFailedError.

func IsIdleTimeoutSecondsOutOfRangeError

func IsIdleTimeoutSecondsOutOfRangeError(err error) bool

IsIdleTimeoutSecondsOutOfRangeError asserts idleTimeoutSecondsOutOfRangeError.

func IsInvalidAvailabilityZone

func IsInvalidAvailabilityZone(err error) bool

IsInvalidAvailabilityZone asserts invalidAvailabilityZoneError.

func IsInvalidCloudconfigExtensionName

func IsInvalidCloudconfigExtensionName(err error) bool

asserts invalidCloudconfigExtensionNameError.

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsInvalidMasterNodeCount

func IsInvalidMasterNodeCount(err error) bool

IsInvalidMasterNodeCount asserts invalidMasterNodeCountError.

func IsInvalidWorkerNodeCount

func IsInvalidWorkerNodeCount(err error) bool

IsInvalidWorkerNodeCount asserts invalidWorkerNodeCountError.

func IsMalformedCloudConfigKey

func IsMalformedCloudConfigKey(err error) bool

IsMalformedCloudConfigKey asserts malformedCloudConfigKeyError.

func IsMissingCloudConfigKey

func IsMissingCloudConfigKey(err error) bool

IsMissingCloudConfigKey asserts missingCloudConfigKeyError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts NotFoundError.

func IsSecretsRetrievalFailed

func IsSecretsRetrievalFailed(err error) bool

IsSecretsRetrievalFailed asserts secretsRetrievalFailedError.

func IsStackNotFound

func IsStackNotFound(err error) bool

IsStackNotFound asserts stack not found error from upstream's API message

FIXME: The validation error returned by the CloudFormation API doesn't make things easy to check, other than looking for the returned string. There's no constant in aws go sdk for defining this string, it comes from the service.

func IsTooManyResults

func IsTooManyResults(err error) bool

IsTooManyResults asserts tooManyResultsError.

func IsWorkersListEmpty

func IsWorkersListEmpty(err error) bool

IsWorkersListEmpty asserts workersListEmptyError.

func IsWrongType

func IsWrongType(err error) bool

IsWrongType asserts wrongTypeError.

Types

type Config

type Config struct {
	// Dependencies.
	CertWatcher *legacy.Service
	CloudConfig *cloudconfig.CloudConfig
	K8sClient   kubernetes.Interface
	KeyWatcher  *randomkeytpr.Service
	Logger      micrologger.Logger

	// Settings.
	AwsConfig        awsutil.Config
	AwsHostConfig    awsutil.Config
	InstallationName string
	PubKeyFile       string
}

Config represents the configuration used to create a legacy service.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig provides a default configuration to create a new legacy resource by best effort.

type LoadBalancerInput

type LoadBalancerInput struct {
	// Name is the ELB name. It must be unique within a region.
	Name string
	// Clients are the AWS clients.
	Clients awsutil.Clients
	// Cluster is the cluster TPO.
	Cluster v1alpha1.AWSConfig
	// IdleTimeoutSeconds is idle time before closing the front-end and back-end connections
	IdleTimeoutSeconds int
	// InstanceIDs are the IDs of the instances that should be registered with the ELB.
	InstanceIDs []string
	// PortsToOpen are the ports the ELB should listen to and forward on.
	PortsToOpen awsresources.PortPairs
	// SecurityGroupID is the ID of the security group that will be assigned to the ELB.
	SecurityGroupID string
	// SubnetID is the ID of the subnet the ELB will be placed in.
	SubnetID string
	// Scheme, internal for non internet-facing ELBs
	Scheme string
}

type MasterServiceInput

type MasterServiceInput struct {
	Clients  awsutil.Clients
	Cluster  v1alpha1.AWSConfig
	MasterID string
}

type Resource

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

Resource implements the legacy resource.

func New

func New(config Config) (*Resource, error)

New creates a new configured resource.

func (*Resource) ApplyCreateChange

func (s *Resource) ApplyCreateChange(ctx context.Context, obj, createChange interface{}) error

func (*Resource) ApplyDeleteChange

func (s *Resource) ApplyDeleteChange(ctx context.Context, obj, deleteChange interface{}) error

func (*Resource) ApplyUpdateChange

func (s *Resource) ApplyUpdateChange(ctx context.Context, obj, updateChange interface{}) error

func (*Resource) EncryptionConfig

func (s *Resource) EncryptionConfig(encryptionKey string) (string, error)

func (*Resource) GetCurrentState

func (s *Resource) GetCurrentState(ctx context.Context, obj interface{}) (interface{}, error)

func (*Resource) GetDesiredState

func (s *Resource) GetDesiredState(ctx context.Context, obj interface{}) (interface{}, error)

func (*Resource) Name

func (s *Resource) Name() string

func (*Resource) NewDeletePatch

func (s *Resource) NewDeletePatch(ctx context.Context, obj, currentState, desiredState interface{}) (*framework.Patch, error)

NewDeletePatch is called upon observed custom object deletion. It deletes the AWS resources for the cluster.

func (*Resource) NewUpdatePatch

func (s *Resource) NewUpdatePatch(ctx context.Context, obj, currentState, desiredState interface{}) (*framework.Patch, error)

NewUpdatePatch is called upon observed custom object change. It creates the AWS resources for the cluster.

func (*Resource) SmallCloudconfig

func (s *Resource) SmallCloudconfig(config SmallCloudconfigConfig) (string, error)

type SmallCloudconfigConfig

type SmallCloudconfigConfig struct {
	MachineType string
	Region      string
	S3URI       string
}

type SubnetInput

type SubnetInput struct {
	CidrBlock  string
	Clients    awsutil.Clients
	Cluster    v1alpha1.AWSConfig
	MakePublic bool
	Name       string
	RouteTable *awsresources.RouteTable
	VpcID      string
}

type TLSassets

type TLSassets struct {
	APIServerCA       []byte
	APIServerKey      []byte
	APIServerCrt      []byte
	WorkerCA          []byte
	WorkerKey         []byte
	WorkerCrt         []byte
	ServiceAccountCA  []byte
	ServiceAccountKey []byte
	ServiceAccountCrt []byte
	CalicoClientCA    []byte
	CalicoClientKey   []byte
	CalicoClientCrt   []byte
	EtcdServerCA      []byte
	EtcdServerKey     []byte
	EtcdServerCrt     []byte
}

Jump to

Keyboard shortcuts

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