cyberark / kubernetes-conjur-deploy

Scripts for deploying DAP followers to Kubernetes and OpenShift given an existing DAP master cluster
Apache License 2.0
14 stars 15 forks source link

Fix for running with local environment #177

Closed szh closed 2 years ago

szh commented 2 years ago

Desired Outcome

Developers should be able to spin up a dev environment on their local machines. Currently this doesn't work because the ImagePullPolicy is set to 'Never' in dev mode, which will cause the script to fail when trying to create a postgres instance because the script doesn't pull the postgres image beforehand.

To reproduce issue: Clone the secrets-provider-for-k8s repo and run ./bin/start --dev --oss. The script will clone the kubernetes-conjur-deploy repository and attempt to deploy a local cluster, but will timeout when it tries to deploy conjur-postgres. Checking the kubernetes logs, you'll see "Container image "postgres:10" is not present with pull policy of Never". You can confirm the fix by editing the git clone git@github.com:cyberark/kubernetes-conjur-deploy line to add -b localbuild which will use this branch instead of master.

Implemented Changes

Connected Issue/Story

N/A

Definition of Done

Changelog

Test coverage

Documentation

Behavior

Security

szh commented 2 years ago

Note: CI is failing step "OpenShift Oldest 4.x" but this is unrelated and is broken in master as well.

imheresamir commented 2 years ago

@szh I think the scripts may have assumed that postgres:10 is present in your local registry. Changing the pullPolicy does resolve this , but we don't really want to be automatically searching dockerhub for images if a tag and push step fails during this flow. I think updating 2_prepare_docker_images.sh with a tag and push step for the postgres image is the way to go, wdyt?

szh commented 2 years ago

@imheresamir Thanks for the suggestion. I updated and re-committed.