Skip to content

Commit 8223a0a

Browse files
oswcabgbenhaim
andauthored
Configure separate SSH key for Windows instances in staging (#9592)
- Add aws-win-ssh-key ExternalSecret in staging-downstream/external-secrets.yaml - Set ssh-secret: "aws-win-ssh-key" in archDefaults.windows-amd64 for staging - Update host-config template to use archDefaults for Windows ssh-secret This allows Windows instances to use a dedicated SSH key (aws-win-ssh-key) instead of the default Linux SSH key (aws-ssh-key) in staging environment. The idea is to avoid the error: "Error allocating host: failed to launch EC2 instance for podman-desktop-on-pull-request-lppsx-build-windows-native: operation error EC2: RunInstances, https response error StatusCode: 400, RequestID: 077f7a6e-a980-454b-80dd-78bc28f4ac71, api error Unsupported: ED25519 key pairs are not supported with Windows AMIs. Choose a different key pair type and try again." Co-authored-by: Gal Ben Haim <[email protected]>
1 parent 6cc85a9 commit 8223a0a

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

components/multi-platform-controller/base/host-config-chart/templates/host-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ data:
11281128
dynamic.windows-4xlarge-amd64.instance-tag: {{ (index $config "instance-tag") | default (printf "%s-amd64-4xlarge" $environment) | quote }}
11291129
dynamic.windows-4xlarge-amd64.key-name: {{ default (index $windows "key-name") ((index $config "key-name")) | quote }}
11301130
dynamic.windows-4xlarge-amd64.aws-secret: {{ (index $config "aws-secret") | default "aws-account" | quote }}
1131-
dynamic.windows-4xlarge-amd64.ssh-secret: {{ (index $config "ssh-secret") | default "aws-ssh-key" | quote }}
1131+
dynamic.windows-4xlarge-amd64.ssh-secret: {{ default (index $windows "ssh-secret") ((index $config "ssh-secret")) | default "aws-ssh-key" | quote }}
11321132
dynamic.windows-4xlarge-amd64.security-group-id: {{ default (index $windows "security-group-id") ((index $config "security-group-id")) | quote }}
11331133
dynamic.windows-4xlarge-amd64.max-instances: {{ (index $config "max-instances") | default "5" | quote }}
11341134
dynamic.windows-4xlarge-amd64.subnet-id: {{ default (index $windows "subnet-id") ((index $config "subnet-id")) | quote }}

components/multi-platform-controller/staging-downstream/external-secrets.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,29 @@ spec:
4444
deletionPolicy: Delete
4545
name: aws-ssh-key
4646
---
47+
apiVersion: external-secrets.io/v1
48+
kind: ExternalSecret
49+
metadata:
50+
name: aws-win-ssh-key
51+
namespace: multi-platform-controller
52+
labels:
53+
build.appstudio.redhat.com/multi-platform-secret: "true"
54+
annotations:
55+
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
56+
argocd.argoproj.io/sync-wave: "-1"
57+
spec:
58+
dataFrom:
59+
- extract:
60+
key: staging/infrastructure/multi-platform-controller/stone-stage-p01/aws-win-ssh-key
61+
refreshInterval: 1h
62+
secretStoreRef:
63+
kind: ClusterSecretStore
64+
name: appsre-stonesoup-vault
65+
target:
66+
creationPolicy: Owner
67+
deletionPolicy: Delete
68+
name: aws-win-ssh-key
69+
---
4770
apiVersion: external-secrets.io/v1beta1
4871
kind: ExternalSecret
4972
metadata:

components/multi-platform-controller/staging-downstream/host-values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ archDefaults:
2727
key-name: "konflux-stage-int-mab01"
2828
security-group-id: "sg-0482e8ccae008b240"
2929
subnet-id: "subnet-07597d1edafa2b9d3"
30+
ssh-secret: "aws-win-ssh-key"
3031

3132
dynamicConfigs:
3233
linux-arm64:

0 commit comments

Comments
 (0)