Documentation ¶
Index ¶
- Constants
- func Contains(s []string, e string) bool
- func DefaultCredentialSecret() types.NamespacedName
- func EscapeJSONPatchString(input string) string
- func FetchAWSCluster(m *Handler, meta metav1.Object) (*infrastructurev1alpha3.AWSCluster, error)
- func FetchAWSControlPlane(m *Handler, meta metav1.Object) (*infrastructurev1alpha3.AWSControlPlane, error)
- func FetchCluster(m *Handler, meta metav1.Object) (*capiv1alpha3.Cluster, error)
- func FetchG8sControlPlane(m *Handler, meta metav1.Object) (*infrastructurev1alpha3.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 IsOrgNamespaceVersion(releaseVersion *semver.Version) bool
- func IsOrganizationLabelNotFoundError(err error) bool
- func IsOrganizationNotFoundError(err error) bool
- func IsParsingFailed(err error) bool
- func IsProviderTagLabel(label string) bool
- func IsV1Alpha3Ready(releaseVersion *semver.Version) bool
- func IsValidAvailabilityZones(availabilityZones []string, validAvailabilityZones []string) bool
- func IsValidMasterReplicas(replicas int) bool
- func IsVersionLabel(label string) bool
- func IsVersionProductionReady(version *semver.Version) bool
- func MaxBatchSizeIsValid(value string) bool
- func MutateCAPILabel(m *Handler, meta metav1.Object) []mutator.PatchOperation
- func MutateLabel(m *Handler, meta metav1.Object, label string, defaultValue string) ([]mutator.PatchOperation, error)
- func MutateLabelFromAWSCluster(m *Handler, meta metav1.Object, awsCluster infrastructurev1alpha3.AWSCluster, ...) ([]mutator.PatchOperation, error)
- func MutateLabelFromCluster(m *Handler, meta metav1.Object, cluster capiv1alpha3.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 ValidateLabelValues(m *Handler, old metav1.Object, new metav1.Object) error
- func ValidateOperatorVersion(meta metav1.Object) error
- func ValidateOrgNamespace(meta 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-alpha1" // FirstHARelease is the first GS release for AWS that supports HA Masters FirstHARelease = "11.4.0" // FirstV1Alpha3Release is the first GS release for v1alpha3 GiantSwarm AWS CR's FirstV1Alpha3Release = "16.0.0" // FirstOrgNamespaceRelease is the first GS release that creates Clusters in Org Namespaces by default FirstOrgNamespaceRelease = "16.0.0" // GiantSwarmLabelPart is the part of label keys that shows that they are protected giantswarm labels GiantSwarmLabelPart = "giantswarm.io" // GiantSwarmLabelPart is the part of label keys that shows that they are protected giantswarm labels ProviderTagLabelPart = "tag.provider.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 ¶
func DefaultCredentialSecret() types.NamespacedName
DefaultCredentialSecret returns the default credentials for clusters
func EscapeJSONPatchString ¶
Ensure the needed escapes are in place. See https://tools.ietf.org/html/rfc6901#section-3 .
func FetchAWSCluster ¶
func FetchAWSCluster(m *Handler, meta metav1.Object) (*infrastructurev1alpha3.AWSCluster, error)
func FetchAWSControlPlane ¶
func FetchAWSControlPlane(m *Handler, meta metav1.Object) (*infrastructurev1alpha3.AWSControlPlane, error)
func FetchCluster ¶
func FetchG8sControlPlane ¶
func FetchG8sControlPlane(m *Handler, meta metav1.Object) (*infrastructurev1alpha3.G8sControlPlane, error)
func FetchRelease ¶
func FetchRelease(m *Handler, version *semver.Version) (*releasev1alpha1.Release, error)
func GetReleaseComponentLabels ¶
func GetReleaseComponentLabels(release releasev1alpha1.Release) map[string]string
func IsCAPIVersion ¶
IsCAPIVersion returns whether a given releaseVersion is using CAPI controllers
func IsGiantSwarmLabel ¶
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 IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
func IsOrgNamespaceVersion ¶ added in v3.3.0
func IsOrgNamespaceVersion(releaseVersion *semver.Version) bool
IsOrgNamespaceVersion returns whether a given releaseVersion creates clusters in org namespaces by default
func IsOrganizationLabelNotFoundError ¶
IsOrganizationLabelNotFoundError asserts organizationLabelNotFoundError.
func IsOrganizationNotFoundError ¶
IsOrganizationNotFoundError asserts organizationNotFoundError.
func IsParsingFailed ¶
IsParsingFailed asserts parsingFailedError.
func IsProviderTagLabel ¶ added in v3.2.1
IsProviderTagLabel returns whether a label is considered a provider tag label
func IsV1Alpha3Ready ¶
func IsV1Alpha3Ready(releaseVersion *semver.Version) bool
IsV1Alpha3Ready returns whether a given releaseVersion is a valid v1alpha3 release
func IsValidAvailabilityZones ¶ added in v3.2.0
func IsValidMasterReplicas ¶
IsValidMasterReplicas returns whether a given number is a valid number of Master node replicas
func IsVersionLabel ¶
IsVersionLabel returns whether a label is considered a version label
func IsVersionProductionReady ¶
func IsVersionProductionReady(version *semver.Version) bool
IsVersionProductionReady returns whether a given releaseVersion is not a prerelease or test version
func MaxBatchSizeIsValid ¶
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 MutateCAPILabel ¶ added in v3.1.0
func MutateCAPILabel(m *Handler, meta metav1.Object) []mutator.PatchOperation
func MutateLabel ¶
func MutateLabelFromAWSCluster ¶
func MutateLabelFromAWSCluster(m *Handler, meta metav1.Object, awsCluster infrastructurev1alpha3.AWSCluster, label string) ([]mutator.PatchOperation, error)
func MutateLabelFromCluster ¶
func MutateLabelFromCluster(m *Handler, meta metav1.Object, cluster capiv1alpha3.Cluster, label string) ([]mutator.PatchOperation, error)
func MutateLabelFromRelease ¶
func MutateLabelFromRelease(m *Handler, meta metav1.Object, release releasev1alpha1.Release, label string, component string) ([]mutator.PatchOperation, error)
func PauseTimeIsValid ¶
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 ¶
func ReleaseVersion(meta metav1.Object, patch []mutator.PatchOperation) (*semver.Version, error)
func ValidLabelAdmins ¶
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 ¶
func ValidateLabelValues ¶
func ValidateOperatorVersion ¶ added in v3.4.0
func ValidateOrgNamespace ¶ added in v3.3.0
func VersionLabels ¶
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 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. |