Fixes test app verify for running with KinD on a MacOS #118
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the Kubernetes Conjur demo scripts are run on a Kubernetes-in-Docker cluster
that is running on MacOS, then the demo script verification that the demo API
endpoints are reachable (check-url function) currently fails:
The problem is that using
Node-IP:NodePort
does not work for KinD on MacOSbecause Docker on MacOS runs Docker containers inside a VM, so there is no
direct way to connect from the MacOS host to Kubernetes containers.
The fix is to add the creation of a
test-curl
pod in the test application namespacethat is capable of running
curl
from within the KinD cluster, and then using thisto verify applications using their internal service address.
This change also replaces the test environment variable
TEST_APP_NODEPORT_SVCS
(defaults to
false
) withTEST_APP_LOADBALANCER_SVCS
(defaults totrue
)because that more accurately reflects what needs to be distinguished
(i.e. if there aren't any load balancers, the test application service type could
be either
NodePort
orclusterIP
, since the test app verification is nowagnostic of
NodePort
vsclusterIP
services.Addresses Issue #117