Skip to content

Commit 24603a8

Browse files
committed
Attempt#0 at fixing failures; add clusterIdentityName
Signed-off-by: Parthvi Vala <[email protected]>
1 parent 6ab2448 commit 24603a8

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

examples/clusterclasses/aws/eks/clusterclass-eks-example.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ spec:
5555
description: "EKS cluster name"
5656
type: string
5757
default: ''
58+
- name: awsClusterIdentityName
59+
required: true
60+
schema:
61+
openAPIV3Schema:
62+
description: The AWSClusterStaticIdentity resource name referencing the credentials to create the Cluster.
63+
type: string
64+
default: cluster-identity
5865
patches:
5966
- name: awsManagedControlPlaneTemplate
6067
definitions:
@@ -78,6 +85,10 @@ spec:
7885
path: /spec/template/spec/sshKeyName
7986
valueFrom:
8087
variable: sshKeyName
88+
- op: add
89+
path: /spec/template/spec/identityRef/name
90+
valueFrom:
91+
variable: awsClusterIdentityName
8192
# Builtins
8293
- op: add
8394
path: "/spec/template/spec/version"
@@ -120,6 +131,9 @@ spec:
120131
spec:
121132
region: "replaced_by_patch"
122133
version: "v0.0.0" # To be replaced by patch
134+
identityRef:
135+
kind: AWSClusterStaticIdentity
136+
name: cluster-identity
123137
---
124138
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
125139
kind: AWSMachineTemplate

test/e2e/data/cluster-templates/aws-eks-topology.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
2+
kind: AWSClusterStaticIdentity
3+
metadata:
4+
name: cluster-identity
5+
spec:
6+
secretRef: cluster-identity
7+
allowedNamespaces: {}
8+
---
19
apiVersion: cluster.x-k8s.io/v1beta1
210
kind: Cluster
311
metadata:
@@ -20,6 +28,8 @@ spec:
2028
value: ${AWS_SSH_KEY_NAME}
2129
- name: instanceType
2230
value: t3.xlarge
31+
- name: awsClusterIdentityName
32+
value: cluster-identity
2333
workers:
2434
machineDeployments:
2535
- class: default-worker

test/e2e/suites/import-gitops/import_gitops_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ var _ = FDescribe("[AWS] [EKS] Create and delete CAPI cluster from cluster class
337337
Paths: []string{"examples/clusterclasses/aws/eks"},
338338
ClusterProxy: bootstrapClusterProxy,
339339
TargetNamespace: topologyNamespace,
340-
Branch: "aws-eks-example",
340+
Branch: "aws-eks-example", // TODO: Remove this before merging the PR
341341
},
342342
},
343343
}

0 commit comments

Comments
 (0)