Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ jobs:
- {"provider": "Docker", "kubernetesMinor": "v1.32", "kubernetesVersion": "v1.32.8"}
- {"provider": "Docker", "kubernetesMinor": "v1.33", "kubernetesVersion": "v1.33.4"}
- {"provider": "Docker", "kubernetesMinor": "v1.34", "kubernetesVersion": "v1.34.0"}
# CAPA does not support AL2023 which is required starting with Kubernetes v1.33.
- {"provider": "EKS", "kubernetesMinor": "v1.32", "kubernetesVersion": "v1.32.9"}
# Uncomment below once we have the ability to run e2e tests on other providers from GHA.
# - {"provider": "AWS", "kubernetesMinor": "v1.29", "kubernetesVersion": "v1.29.6"}
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion hack/examples/sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ kustomize build --load-restrictor LoadRestrictionsNone \

kustomize build --load-restrictor LoadRestrictionsNone \
./hack/examples/overlays/clusters/eks \
>"${EXAMPLE_CLUSTERS_DIR}/eks-cluster.yaml"
>"${EXAMPLE_CLUSTERS_DIR}/eks-cluster-cilium-helm-addon.yaml"

# TODO Remove once kustomize supports retaining quotes in what will be numeric values.
#shellcheck disable=SC2016
Expand Down
17 changes: 17 additions & 0 deletions test/e2e/config/caren.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,23 @@ providers:
- old: --metrics-addr=127.0.0.1:8080
new: --metrics-addr=:8080

- name: eks
type: InfrastructureProvider
versions:
- name: "${CAPA_VERSION}"
value: "https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/${CAPA_VERSION}/infrastructure-components.yaml"
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/v1beta1-capa/metadata.yaml"
- sourcePath: "../../../charts/cluster-api-runtime-extensions-nutanix/defaultclusterclasses/eks-cluster-class.yaml"
targetName: clusterclass-eks-quick-start.yaml
- sourcePath: "../../../examples/capi-quick-start/eks-cluster-cilium-helm-addon.yaml"
targetName: cluster-template-topology-cilium-helm-addon.yaml
replacements:
- old: --metrics-addr=127.0.0.1:8080
new: --metrics-addr=:8080

- name: docker
type: InfrastructureProvider
versions:
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func loadE2EConfig(configPath string) *clusterctl.E2EConfig {

config.Providers = slices.DeleteFunc(config.Providers, func(p clusterctl.ProviderConfig) bool {
switch p.Name {
case "aws":
case "aws", "eks":
_, found := os.LookupEnv("AWS_B64ENCODED_CREDENTIALS")
return !found
default:
Expand Down
36 changes: 36 additions & 0 deletions test/e2e/ownerreference_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ const (
awsClusterTemplateKind = "AWSClusterTemplate"
awsClusterControllerIdentityKind = "AWSClusterControllerIdentity"

awsManagedClusterKind = "AWSManagedCluster"
awsManagedClusterTemplateKind = "AWSManagedClusterTemplate"
awsManagedControlPlaneKind = "AWSManagedControlPlane"
awsManagedControlPlaneTemplateKind = "AWSManagedControlPlaneTemplate"
eksConfigKind = "EKSConfig"
eksConfigTemplateKind = "EKSConfigTemplate"

nutanixMachineKind = "NutanixMachine"
nutanixMachineTemplateKind = "NutanixMachineTemplate"
nutanixClusterKind = "NutanixCluster"
Expand Down Expand Up @@ -161,6 +168,35 @@ var (
},
}

// EKSInfraOwnerReferenceAssertions maps EKS Infrastructure types to functions which return an error if the passed
// OwnerReferences aren't as expected.
EKSInfraOwnerReferenceAssertions = map[string]func(types.NamespacedName, []metav1.OwnerReference) error{
awsManagedClusterKind: func(_ types.NamespacedName, owners []metav1.OwnerReference) error {
// AWSManagedCluster must be owned and controlled by a Cluster.
return framework.HasExactOwners(owners, clusterController)
},
awsManagedClusterTemplateKind: func(_ types.NamespacedName, owners []metav1.OwnerReference) error {
// AWSManagedClusterTemplate must be owned by a ClusterClass.
return framework.HasExactOwners(owners, clusterClassOwner)
},
awsManagedControlPlaneKind: func(_ types.NamespacedName, owners []metav1.OwnerReference) error {
// AWSManagedControlPlane must be owned and controlled by a Cluster.
return framework.HasExactOwners(owners, clusterController)
},
awsManagedControlPlaneTemplateKind: func(_ types.NamespacedName, owners []metav1.OwnerReference) error {
// AWSManagedControlPlaneTemplate must be owned by a ClusterClass.
return framework.HasExactOwners(owners, clusterClassOwner)
},
eksConfigKind: func(_ types.NamespacedName, owners []metav1.OwnerReference) error {
// EKSConfig must be owned and controlled by a Machine.
return framework.HasExactOwners(owners, machineController)
},
eksConfigTemplateKind: func(_ types.NamespacedName, owners []metav1.OwnerReference) error {
// EKSConfigTemplate must be owned by a ClusterClass.
return framework.HasExactOwners(owners, clusterClassOwner)
},
}

// NutanixInfraOwnerReferenceAssertions maps Nutanix Infrastructure types to functions which return an error
// if the passed OwnerReferences aren't as expected.
NutanixInfraOwnerReferenceAssertions = map[string]func(types.NamespacedName, []metav1.OwnerReference) error{
Expand Down
Loading
Loading