conjurdemos / kubernetes-conjur-demo

Demo application for Conjur Kubernetes integration
11 stars 14 forks source link

Fixes support for running demos on KinD on MacOS #117

Closed diverdane closed 3 years ago

diverdane commented 3 years ago

Summary

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) fails:

++++++++++++++++++++++++++++++++++++++

Validating that the deployments are functioning as expected.

++++++++++++++++++++++++++++++++++++++
Waiting for pods to become available
'check_pods' Retry 1/150 exited 1, retrying in 2 seconds...
'check_pods' Retry 2/150 exited 1, retrying in 2 seconds...
'check_pods' Retry 3/150 exited 1, retrying in 2 seconds...
'check_pods' Retry 4/150 exited 1, retrying in 2 seconds...
'check_pods' Retry 5/150 exited 1, retrying in 2 seconds...
'check_pods' Retry 6/150 exited 1, retrying in 2 seconds...
'check_pods' Retry 7/150 exited 1, retrying in 2 seconds...
'check_pods' Retry 8/150 exited 1, retrying in 2 seconds...
'check_pods' Retry 9/150 exited 1, retrying in 2 seconds...
'check_pods' Retry 10/150 exited 1, retrying in 2 seconds...
Waiting for urls to be ready
curl: (28) Connection timed out after 3005 milliseconds
'check_urls' Retry 1/150 exited 28, retrying in 2 seconds...
curl: (28) Connection timed out after 3005 milliseconds
'check_urls' Retry 2/150 exited 28, retrying in 2 seconds...
curl: (28) Connection timed out after 3005 milliseconds
'check_urls' Retry 3/150 exited 28, retrying in 2 seconds...
curl: (28) Connection timed out after 3005 milliseconds
'check_urls' Retry 4/150 exited 28, retrying in 2 seconds...
curl: (28) Connection timed out after 3003 milliseconds
'check_urls' Retry 5/150 exited 28, retrying in 2 seconds...

And the check_urls function fails after 150 attempts.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Git clone the https://github.com/cyberark/conjur-oss-helm-chart repo:

    git clone https://github.com/cyberark/conjur-oss-helm-chart
    cd conjur-oss-helm-chart
  2. Checkout the 72-add-example-applications branch of the cyberark/conjur-oss-helm-chart repo.

    git checkout 72-add-example-applications
  3. Change dir to examples/kubernetes-in-docker and make a copy of customize.env

cd examples/kubernetes-in-docker
cp customize.env my_customize.env
  1. Edit my_customize.env file to add your DockerHub credentials, i.e. this section:
# CHANGE THE FOLLOWING DOCKER CREDENTIAL ENVIRONMENT VARIABLES!!!
# Docker registry credentials are required since the demo scripts need to
# build and push demo images to a registry so that the images can then be
# pulled by KinD. For example, if you are using your personal DockerHub
# account, your environment settings might look something like this:
#     export DOCKER_REGISTRY_URL="docker.io"
#     export DOCKER_REGISTRY_PATH="firstnamelastname"
#     export DOCKER_USERNAME="firstnamelastname"
#     export DOCKER_PASSWORD="GreatGooglyMoogly"
#     export DOCKER_EMAIL="firstname.lastname@example.com"
#export DOCKER_REGISTRY_URL="docker.io"
#export DOCKER_REGISTRY_PATH="<your-dockerhub-org-or-username>"
#export DOCKER_USERNAME="<your-dockerhub-username>"
#export DOCKER_PASSWORD="<your-dockerhub-password>"
#export DOCKER_EMAIL="<your-dockerhub-email>"
  1. Run the start script using the my_customize.env file:
./start -c my_customize.env
  1. Observe the failure described above.

Expected Results

Demo scripts should pass, access to demo URLs should work.

Actual Results (including error logs, if applicable)

See error listing above.

Reproducible

Version/Tag number

Latest.

Environment setup

Demo scripts on Kubernetes-in-Docker on MacOS.

Additional Information