Skip to content

Commit 43dde9e

Browse files
Set KUBE_SSH_BASTION and KUBE_SSH_KEY_PATH in installer tests
We will start using the bastion to do tunneling to workers via SSH tests in 4.0. Leave all existing variables in place. Fix a few places of config drift from the installer src to e2e tests.
1 parent 7377587 commit 43dde9e

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ objects:
9292
- name: artifacts
9393
mountPath: /tmp/artifacts
9494
env:
95+
- name: ARTIFACT_DIR
96+
value: /tmp/artifacts
9597
- name: HOME
9698
value: /tmp/home
9799
- name: KUBECONFIG
@@ -191,6 +193,9 @@ objects:
191193
# oh god the blood
192194
sleep 180
193195
196+
export KUBE_SSH_BASTION="$( oc get node -l node-role.kubernetes.io/master -o 'jsonpath={.items[0].status.addresses[?(@.type=="ExternalIP")].address}' ):22"
197+
export KUBE_SSH_KEY_PATH=/tmp/cluster/ssh-privatekey
198+
194199
# set up cloud-provider-specific env vars
195200
if [[ "${CLUSTER_TYPE}" == "gcp" ]]; then
196201
export GOOGLE_APPLICATION_CREDENTIALS="/tmp/cluster/gce.json"

ci-operator/templates/openshift/installer/cluster-launch-installer-src.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ objects:
8787
- name: artifacts
8888
mountPath: /tmp/artifacts
8989
env:
90-
- name: INSTANCE_PREFIX
91-
value: ${NAMESPACE}-${JOB_NAME_HASH}
90+
- name: ARTIFACT_DIR
91+
value: /tmp/artifacts
9292
- name: HOME
9393
value: /tmp/home
9494
- name: KUBECONFIG
@@ -104,7 +104,9 @@ objects:
104104
105105
trap 'touch /tmp/shared/exit' EXIT
106106
trap 'kill $(jobs -p); exit 0' TERM
107-
107+
108+
cp "$(which oc)" /tmp/shared/
109+
108110
mkdir -p "${HOME}"
109111
110112
# wait for the router namespace
@@ -127,7 +129,6 @@ objects:
127129
# don't let clients impact the global kubeconfig
128130
cp "${KUBECONFIG}" /tmp/admin.kubeconfig
129131
export KUBECONFIG=/tmp/admin.kubeconfig
130-
export ARTIFACT_DIR=/tmp/artifacts
131132
fi
132133
if ! oc get nodes 2>/dev/null; then
133134
echo "Waiting for API at $(oc whoami --show-server) to respond ..."
@@ -187,6 +188,9 @@ objects:
187188
# oh god the blood
188189
sleep 180
189190
191+
export KUBE_SSH_BASTION="$( oc get node -l node-role.kubernetes.io/master -o 'jsonpath={.items[0].status.addresses[?(@.type=="ExternalIP")].address}' ):22"
192+
export KUBE_SSH_KEY_PATH=/tmp/cluster/ssh-privatekey
193+
190194
# set up cloud-provider-specific env vars
191195
if [[ "${CLUSTER_TYPE}" == "gcp" ]]; then
192196
export GOOGLE_APPLICATION_CREDENTIALS="/tmp/cluster/gce.json"
@@ -205,7 +209,7 @@ objects:
205209
mkdir -p ~/.ssh
206210
cp /tmp/cluster/ssh-privatekey ~/.ssh/kube_openstack_rsa || true
207211
fi
208-
212+
209213
${TEST_COMMAND}
210214
211215
# Runs an install

0 commit comments

Comments
 (0)