Documentation ¶
Index ¶
- Constants
- func DefaultCredentialSecret() types.NamespacedName
- func EscapeJSONPatchString(input string) string
- func FetchAWSCluster(m *Handler, meta metav1.Object) (*infrastructurev1alpha2.AWSCluster, error)
- func FetchAWSControlPlane(m *Handler, meta metav1.Object) (*infrastructurev1alpha2.AWSControlPlane, error)
- func FetchCluster(m *Handler, meta metav1.Object) (*capiv1alpha2.Cluster, error)
- func FetchG8sControlPlane(m *Handler, meta metav1.Object) (*infrastructurev1alpha2.G8sControlPlane, error)
- func FetchNewestReleaseVersion(m *Handler) (*semver.Version, error)
- func FetchRelease(m *Handler, version *semver.Version) (*releasev1alpha1.Release, error)
- func GetNavailabilityZones(m *Handler, n int, azs []string) []string
- func GetReleaseComponentLabels(release releasev1alpha1.Release) map[string]string
- func IsCAPIRelease(meta metav1.Object) (bool, error)
- func IsCAPIVersion(releaseVersion *semver.Version) (bool, error)
- func IsGiantSwarmLabel(label string) bool
- func IsHAVersion(releaseVersion *semver.Version) bool
- func IsIntegerGreaterThanZero(v string) bool
- func IsInvalidConfig(err error) bool
- func IsNotAllowed(err error) bool
- func IsNotFound(err error) bool
- func IsOrganizationLabelNotFoundError(err error) bool
- func IsOrganizationNotFoundError(err error) bool
- func IsParsingFailed(err error) bool
- func IsValidMasterReplicas(replicas int) bool
- func IsVersionLabel(label string) bool
- func IsVersionProductionReady(version *semver.Version) bool
- func MaxBatchSizeIsValid(value string) bool
- func MutateLabel(m *Handler, meta metav1.Object, label string, defaultValue string) ([]mutator.PatchOperation, error)
- func MutateLabelFromAWSCluster(m *Handler, meta metav1.Object, awsCluster infrastructurev1alpha2.AWSCluster, ...) ([]mutator.PatchOperation, error)
- func MutateLabelFromCluster(m *Handler, meta metav1.Object, cluster capiv1alpha2.Cluster, label string) ([]mutator.PatchOperation, error)
- func MutateLabelFromRelease(m *Handler, meta metav1.Object, release releasev1alpha1.Release, label string, ...) ([]mutator.PatchOperation, error)
- func PauseTimeIsValid(value string) bool
- func ReleaseVersion(meta metav1.Object, patch []mutator.PatchOperation) (*semver.Version, error)
- func ValidLabelAdmins() []string
- func ValidMasterReplicas() []int
- func ValidateLabelKeys(m *Handler, old metav1.Object, new metav1.Object) error
- func ValidateLabelSet(obj metav1.Object, label string) error
- func ValidateLabelValues(m *Handler, old metav1.Object, new metav1.Object) error
- func ValidateOrganizationLabelContainsExistingOrganization(ctx context.Context, ctrlClient client.Client, obj metav1.Object) error
- func VersionLabels() []string
- type Handler
Constants ¶
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" )
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
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 FetchG8sControlPlane ¶ added in v2.5.0
func FetchG8sControlPlane(m *Handler, meta metav1.Object) (*infrastructurev1alpha2.G8sControlPlane, error)
func FetchNewestReleaseVersion ¶ added in v2.6.0
func FetchRelease ¶ added in v2.3.3
func GetNavailabilityZones ¶ added in v2.3.3
func GetReleaseComponentLabels ¶ added in v2.3.3
func GetReleaseComponentLabels(release releasev1alpha1.Release) map[string]string
func IsCAPIVersion ¶ added in v2.10.0
IsCAPIVersion returns whether a given releaseVersion is using CAPI controllers
func IsGiantSwarmLabel ¶ added in v2.7.0
IsGiantSwarmLabel returns whether a label is considered a giantswarm label
func IsHAVersion ¶
IsHAVersion returns whether a given releaseVersion supports HA Masters
func IsIntegerGreaterThanZero ¶ added in v2.8.0
func IsInvalidConfig ¶ added in v2.3.3
IsInvalidConfig asserts invalidConfigError.
func IsNotAllowed ¶ added in v2.7.0
IsNotAllowed asserts notAllowedError.
func IsOrganizationLabelNotFoundError ¶ added in v2.11.0
IsOrganizationLabelNotFoundError asserts organizationLabelNotFoundError.
func IsOrganizationNotFoundError ¶ added in v2.11.0
IsOrganizationNotFoundError asserts organizationNotFoundError.
func IsParsingFailed ¶ added in v2.3.3
IsParsingFailed asserts parsingFailedError.
func IsValidMasterReplicas ¶
IsValidMasterReplicas returns whether a given number is a valid number of Master node replicas
func IsVersionLabel ¶ added in v2.7.0
IsVersionLabel returns whether a label is considered a version label
func IsVersionProductionReady ¶ added in v2.6.0
IsVersionProductionReady returns whether a given releaseVersion is not a prerelease or test version
func MaxBatchSizeIsValid ¶ added in v2.2.0
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 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
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 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 ValidateLabelSet ¶ added in v2.11.0
func ValidateLabelValues ¶ added in v2.7.0
func ValidateOrganizationLabelContainsExistingOrganization ¶ added in v2.11.0
func VersionLabels ¶ added in v2.7.0
func VersionLabels() []string
VersionLabels are the labels which are considered version labels
Types ¶
Source Files ¶
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. |