8080 TAG=${INPUT_TAG}
8181
8282 EA_VERSION=2.2.0-1166
83+ export EA_VERSION
8384
8485 cat > cluster.yml <<'YAML'
8586 columnar: true
@@ -92,16 +93,37 @@ jobs:
9293 jwt: true
9394 YAML
9495
95- # Substitute shell vars into YAML
96- eval "echo \"$(cat cluster.yml)\"" > cluster.resolved.yml
96+ # Substitute shell vars into YAML (envsubst preserves YAML structure;
97+ # the previous eval+echo approach collapsed newlines and silently
98+ # dropped the load-balancer flag)
99+ envsubst < cluster.yml > cluster.resolved.yml
100+ echo "Resolved cluster definition:" && cat cluster.resolved.yml
97101
98102 CBDINO_CLUSTER_ID=$(cbdinocluster -v alloc --def="$(cat cluster.resolved.yml)")
103+
104+ # Connection string through the load balancer (used by most tests)
99105 CBDINO_CONNSTR=$(cbdinocluster -v connstr --tls --analytics "$CBDINO_CLUSTER_ID")
100106
107+ # Direct-to-node connection string (required for mTLS tests because
108+ # the nginx passive load balancer terminates TLS at L7, so client
109+ # certificates are not forwarded to the analytics service).
110+ # We get the first cluster node IP by listing nodes and filtering
111+ # out non-cluster containers (s3mock, nginx, haproxy).
112+ NODE_IP=$(cbdinocluster -v ps 2>&1 | grep -E 'columnar-node|server-node' | head -1 | grep -oP '\d+\.\d+\.\d+\.\d+' || echo "")
113+ if [ -n "$NODE_IP" ]; then
114+ CBDINO_CONNSTR_DIRECT="https://${NODE_IP}:18095"
115+ else
116+ # No LB or couldn't parse — fall back to the primary connstr
117+ CBDINO_CONNSTR_DIRECT="$CBDINO_CONNSTR"
118+ fi
119+
101120 echo "CBDINO_CLUSTER_ID=$CBDINO_CLUSTER_ID" >> "$GITHUB_ENV"
102121 echo "CBDINO_CONNSTR=$CBDINO_CONNSTR" >> "$GITHUB_ENV"
122+ echo "CBDINO_CONNSTR_DIRECT=$CBDINO_CONNSTR_DIRECT" >> "$GITHUB_ENV"
103123 echo "CBDINO_USER=Administrator" >> "$GITHUB_ENV"
104124 echo "CBDINO_PASS=password" >> "$GITHUB_ENV"
125+ echo "Load balancer connstr: $CBDINO_CONNSTR"
126+ echo "Direct node connstr: $CBDINO_CONNSTR_DIRECT"
105127
106128 - name : Create JWT test user and generate token
107129 run : |
@@ -144,6 +166,7 @@ jobs:
144166 {
145167 "TestSettings": {
146168 "ConnectionString": "${CBDINO_CONNSTR}",
169+ "DirectConnectionString": "${CBDINO_CONNSTR_DIRECT}",
147170 "Username": "${CBDINO_USER}",
148171 "Password": "${CBDINO_PASS}",
149172 "JwtToken": "${CBDINO_JWT}",
0 commit comments