aws

package
v2.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultClusterDescription is the default name for a cluster
	DefaultClusterDescription = "Unnamed cluster"

	// DefaultMasterReplicas is the default number of master node replicas
	DefaultMasterReplicas = 3

	// DefaultNodePoolAZs is the default number of AZs used in a nodepool
	DefaultNodePoolAZs = 1

	// DefaultMasterInstanceType is the default master instance type
	DefaultMasterInstanceType = "m5.xlarge"

	// FirstCAPIRelease is the first GS release that runs on CAPI controllers
	FirstCAPIRelease = "20.0.0-v1alpha3"

	// FirstHARelease is the first GS release for AWS that supports HA Masters
	FirstHARelease = "11.4.0"

	// GiantSwarmLabelPart is the part of label keys that shows that they are protected giantswarm labels
	GiantSwarmLabelPart = "giantswarm.io"
)
View Source
const (
	// annotations should  taken from https://github.com/giantswarm/apiextensions/blob/master/pkg/annotation/aws.go
	// once the service is migrate to apiextensions v3
	AnnotationUpdateMaxBatchSize = "alpha.aws.giantswarm.io/update-max-batch-size"
	AnnotationUpdatePauseTime    = "alpha.aws.giantswarm.io/update-pause-time"

	AnnotationAlphaNodeTerminateUnhealthy = "alpha.node.giantswarm.io/terminate-unhealthy"
)

Variables

This section is empty.

Functions

func DefaultCredentialSecret added in v2.2.2

func DefaultCredentialSecret() types.NamespacedName

DefaultCredentialSecret returns the default credentials for clusters

func EscapeJSONPatchString added in v2.3.3

func EscapeJSONPatchString(input string) string

Ensure the needed escapes are in place. See https://tools.ietf.org/html/rfc6901#section-3 .

func FetchAWSCluster added in v2.3.3

func FetchAWSCluster(m *Handler, meta metav1.Object) (*infrastructurev1alpha2.AWSCluster, error)

func FetchAWSControlPlane added in v2.5.0

func FetchAWSControlPlane(m *Handler, meta metav1.Object) (*infrastructurev1alpha2.AWSControlPlane, error)

func FetchCluster added in v2.3.3

func FetchCluster(m *Handler, meta metav1.Object) (*capiv1alpha2.Cluster, error)

func FetchG8sControlPlane added in v2.5.0

func FetchG8sControlPlane(m *Handler, meta metav1.Object) (*infrastructurev1alpha2.G8sControlPlane, error)

func FetchNewestReleaseVersion added in v2.6.0

func FetchNewestReleaseVersion(m *Handler) (*semver.Version, error)

func FetchRelease added in v2.3.3

func FetchRelease(m *Handler, version *semver.Version) (*releasev1alpha1.Release, error)

func GetNavailabilityZones added in v2.3.3

func GetNavailabilityZones(m *Handler, n int, azs []string) []string

func GetReleaseComponentLabels added in v2.3.3

func GetReleaseComponentLabels(release releasev1alpha1.Release) map[string]string

func IsCAPIRelease added in v2.10.0

func IsCAPIRelease(meta metav1.Object) (bool, error)

func IsCAPIVersion added in v2.10.0

func IsCAPIVersion(releaseVersion *semver.Version) (bool, error)

IsCAPIVersion returns whether a given releaseVersion is using CAPI controllers

func IsGiantSwarmLabel added in v2.7.0

func IsGiantSwarmLabel(label string) bool

IsGiantSwarmLabel returns whether a label is considered a giantswarm label

func IsHAVersion

func IsHAVersion(releaseVersion *semver.Version) bool

IsHAVersion returns whether a given releaseVersion supports HA Masters

func IsIntegerGreaterThanZero added in v2.8.0

func IsIntegerGreaterThanZero(v string) bool

func IsInvalidConfig added in v2.3.3

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsNotAllowed added in v2.7.0

func IsNotAllowed(err error) bool

IsNotAllowed asserts notAllowedError.

func IsNotFound added in v2.3.3

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

func IsOrganizationLabelNotFoundError added in v2.11.0

func IsOrganizationLabelNotFoundError(err error) bool

IsOrganizationLabelNotFoundError asserts organizationLabelNotFoundError.

func IsOrganizationNotFoundError added in v2.11.0

func IsOrganizationNotFoundError(err error) bool

IsOrganizationNotFoundError asserts organizationNotFoundError.

func IsParsingFailed added in v2.3.3

func IsParsingFailed(err error) bool

IsParsingFailed asserts parsingFailedError.

func IsValidMasterReplicas

func IsValidMasterReplicas(replicas int) bool

IsValidMasterReplicas returns whether a given number is a valid number of Master node replicas

func IsVersionLabel added in v2.7.0

func IsVersionLabel(label string) bool

IsVersionLabel returns whether a label is considered a version label

func IsVersionProductionReady added in v2.6.0

func IsVersionProductionReady(version *semver.Version) bool

IsVersionProductionReady returns whether a given releaseVersion is not a prerelease or test version

func MaxBatchSizeIsValid added in v2.2.0

func MaxBatchSizeIsValid(value string) bool

MaxBatchSizeIsValid will validate the value into valid maxBatchSize valid values can be either: an integer bigger than 0 a float between 0 < x <= 1 float value is used as ratio of a total worker count

func MutateLabel added in v2.11.0

func MutateLabel(m *Handler, meta metav1.Object, label string, defaultValue string) ([]mutator.PatchOperation, error)

func MutateLabelFromAWSCluster added in v2.3.3

func MutateLabelFromAWSCluster(m *Handler, meta metav1.Object, awsCluster infrastructurev1alpha2.AWSCluster, label string) ([]mutator.PatchOperation, error)

func MutateLabelFromCluster added in v2.3.3

func MutateLabelFromCluster(m *Handler, meta metav1.Object, cluster capiv1alpha2.Cluster, label string) ([]mutator.PatchOperation, error)

func MutateLabelFromRelease added in v2.3.3

func MutateLabelFromRelease(m *Handler, meta metav1.Object, release releasev1alpha1.Release, label string, component string) ([]mutator.PatchOperation, error)

func PauseTimeIsValid added in v2.2.0

func PauseTimeIsValid(value string) bool

PauseTimeIsValid checks if the value is in proper ISO 8601 duration format and ensure the duration is not bigger than 1 Hour (AWS limitation)

func ReleaseVersion added in v2.3.3

func ReleaseVersion(meta metav1.Object, patch []mutator.PatchOperation) (*semver.Version, error)

func ValidLabelAdmins added in v2.7.0

func ValidLabelAdmins() []string

ValidLabelAdmins returns the list of accounts used to manipulate labels

func ValidMasterReplicas

func ValidMasterReplicas() []int

ValidMasterReplicas are the allowed number of master node replicas

func ValidateLabelKeys added in v2.7.0

func ValidateLabelKeys(m *Handler, old metav1.Object, new metav1.Object) error

func ValidateLabelSet added in v2.11.0

func ValidateLabelSet(obj metav1.Object, label string) error

func ValidateLabelValues added in v2.7.0

func ValidateLabelValues(m *Handler, old metav1.Object, new metav1.Object) error

func ValidateOrganizationLabelContainsExistingOrganization added in v2.11.0

func ValidateOrganizationLabelContainsExistingOrganization(ctx context.Context, ctrlClient client.Client, obj metav1.Object) error

func VersionLabels added in v2.7.0

func VersionLabels() []string

VersionLabels are the labels which are considered version labels

Types

type Handler added in v2.5.0

type Handler struct {
	K8sClient k8sclient.Interface
	Logger    micrologger.Logger
}

Directories

Path Synopsis
Package awsmachinedeployment intercepts write activity to AWSMachineDeployment objects.
Package awsmachinedeployment intercepts write activity to AWSMachineDeployment objects.
Package awsmachinedeployment intercepts write activity to AWSMachineDeployment objects.
Package awsmachinedeployment intercepts write activity to AWSMachineDeployment objects.
Package cluster intercepts write activity to Cluster objects.
Package cluster intercepts write activity to Cluster objects.
Package machinedeployment intercepts write activity to MachineDeployment objects.
Package machinedeployment intercepts write activity to MachineDeployment objects.

Jump to

Keyboard shortcuts

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