Skip to content

Commit e213aad

Browse files
eshulman2openshift-merge-bot[bot]
authored andcommitted
[shiftstack] Mount TRex SSH keypair secret into shiftstackclient pod
Add optional support for mounting a Kubernetes Secret containing SSH keys into the shiftstackclient pod. When cifmw_shiftstack_trex_keypair_secret is set, the secret is mounted at /home/cloud-admin/trex-keypair/. This is used by the NFV telco verification job to provide the TRex traffic generator SSH key (created by Terraform) to the shiftstack-qa automation running inside the pod, without relying on file system paths on the hypervisor. Signed-off-by: Ella Shulman <eshulman@redhat.com> Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0b9b031 commit e213aad

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

roles/shiftstack/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,5 @@ cifmw_shiftstack_storage_access_mode:
5151
cifmw_shiftstack_extra_vars: {}
5252
cifmw_shiftstack_extra_vars_configmap_name: "shiftstack-extra-vars"
5353
cifmw_shiftstack_extra_vars_mount_path: "/home/cloud-admin/extra-vars"
54+
# Optional: name of a Kubernetes Secret containing SSH keys to mount into the pod
55+
# cifmw_shiftstack_trex_keypair_secret: "trex-keypair"

roles/shiftstack/templates/shiftstackclient_pod.yml.j2

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ spec:
4747
- name: extra-vars
4848
mountPath: {{ cifmw_shiftstack_extra_vars_mount_path }}
4949
readOnly: true
50+
{% endif %}
51+
{% if cifmw_shiftstack_trex_keypair_secret is defined %}
52+
- name: trex-keypair
53+
mountPath: /home/cloud-admin/trex-keypair
54+
readOnly: true
5055
{% endif %}
5156
dnsPolicy: ClusterFirst
5257
enableServiceLinks: true
@@ -90,3 +95,9 @@ spec:
9095
defaultMode: 420
9196
name: {{ cifmw_shiftstack_extra_vars_configmap_name }}
9297
{% endif %}
98+
{% if cifmw_shiftstack_trex_keypair_secret is defined %}
99+
- name: trex-keypair
100+
secret:
101+
defaultMode: 256
102+
secretName: {{ cifmw_shiftstack_trex_keypair_secret }}
103+
{% endif %}

0 commit comments

Comments
 (0)