Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Commit 833b1ba

Browse files
authored
fix: don't use an SSH key in AWS clusters (nutanix-cloud-native#425)
When `sshKeyName` is nil CAPA will default the instance to using an SSH key-pair named `default`. We don't this behavior by default, so setting it to an empty string and CAPA won't set a key-pair.
1 parent d49bd37 commit 833b1ba

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

charts/capi-runtime-extensions/defaultclusterclasses/aws-cluster-class.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ spec:
107107
spec:
108108
iamInstanceProfile: control-plane.cluster-api-provider-aws.sigs.k8s.io
109109
instanceType: m5.xlarge
110+
sshKeyName: ""
110111
---
111112
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
112113
kind: AWSMachineTemplate
@@ -119,6 +120,7 @@ spec:
119120
spec:
120121
iamInstanceProfile: nodes.cluster-api-provider-aws.sigs.k8s.io
121122
instanceType: m5.2xlarge
123+
sshKeyName: ""
122124
---
123125
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
124126
kind: KubeadmConfigTemplate

hack/examples/bases/aws/kustomization.yaml.tmpl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,22 @@ patches:
121121
- op: "add"
122122
path: "/spec/template/spec/instanceType"
123123
value: "m5.xlarge"
124+
- target:
125+
group: infrastructure.cluster.x-k8s.io
126+
kind: AWSMachineTemplate
127+
name: quick-start-worker-machinetemplate
128+
patch: |-
129+
- op: "add"
130+
path: "/spec/template/spec/sshKeyName"
131+
value: ""
132+
- target:
133+
group: infrastructure.cluster.x-k8s.io
134+
kind: AWSMachineTemplate
135+
name: quick-start-control-plane
136+
patch: |-
137+
- op: "add"
138+
path: "/spec/template/spec/sshKeyName"
139+
value: ""
124140
- target:
125141
kind: ConfigMap
126142
patch: |

0 commit comments

Comments
 (0)