Skip to content

Commit

Permalink
Fix kuttl template for tls endpoint match
Browse files Browse the repository at this point in the history
Align with assert-endpoints.yaml to get from the status, not the spec
  • Loading branch information
steveb authored May 15, 2024
1 parent 4234f1b commit 116cf01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/kuttl/tests/deploy_tls/10-assert-deploy-ironic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ kind: TestAssert
commands:
- script: |
set -euxo pipefail
template='{{.spec.endpoints.internal}}{{":"}}{{.spec.endpoints.public}}{{"\n"}}'
template='{{.status.apiEndpoints.ironic.public}}{{":"}}{{.status.apiEndpoints.ironic.internal}}{{"\n"}}'
regex="https:\/\/ironic-internal\.$NAMESPACE\..*:https:\/\/ironic-public\.$NAMESPACE\..*"
apiEndpoints=$(oc get -n $NAMESPACE KeystoneEndpoint ironic -o go-template="$template")
matches=$(echo "$apiEndpoints" | sed -e "s?$regex??")
Expand All @@ -121,7 +121,7 @@ commands:
# TODO(sbaker) switch the regex back to https as part of https://issues.redhat.com/browse/OSPRH-7038
- script: |
set -euxo pipefail
template='{{.spec.endpoints.internal}}{{":"}}{{.spec.endpoints.public}}{{"\n"}}'
template='{{index .status.apiEndpoints "ironic-inspector" "public"}}{{":"}}{{index .status.apiEndpoints "ironic-inspector" "internal"}}{{"\n"}}'
regex="http:\/\/ironic-inspector-internal\.$NAMESPACE\..*:http:\/\/ironic-inspector-public\.$NAMESPACE\..*"
apiEndpoints=$(oc get -n $NAMESPACE KeystoneEndpoint ironic-inspector -o go-template="$template")
matches=$(echo "$apiEndpoints" | sed -e "s?$regex??")
Expand Down

0 comments on commit 116cf01

Please sign in to comment.