Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 111: option to remove use of waitforit image #137

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

plumdog
Copy link
Contributor

@plumdog plumdog commented May 30, 2023

Fixes #111.

  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have bumped the version number in /charts/flagsmith/Chart.yaml in the section version or I'm merging to a
    release branch

Changes

Add option to use the waitfordb command from the application Docker image, rather than pulling in a separate image for this purpose.

How did you test this code?

# Default behaviour
$ helm -n flagsmith get values flagsmith-test -o json | jq .api.dbWaiter.useExternalImage
null
# Still uses wait-for-it image
$ kubectl -n flagsmith get deployments.apps -o json | jq -r '[(.items[] | (.spec.template.spec.initContainers // []) | .[].image)] | unique | .[]' 
flagsmith/flagsmith-api:2.42.1
willwill/wait-for-it:latest
...
# With new flag set
$ helm -n flagsmith get values flagsmith-test -o json | jq .api.dbWaiter.useExternalImage
false
# No just the flagsmith API image used
$ kubectl -n flagsmith get deployments.apps -o json | jq -r '[(.items[] | (.spec.template.spec.initContainers // []) | .[].image)] | unique | .[]' 
flagsmith/flagsmith-api:2.42.1

Some considerations:

  • default behaviour remains the same
    • this is so users of Flagsmith that do not have waitfordb (believe this is <2.42.0) but using the new chart don't get an error
  • still has a wait-for-db init container, rather than relying on the use of waitfordb in run-docker.sh for migrate and serve
    • this is so the value of api.dbWaiter.timeoutSeconds can be supplied to the command

Copy link
Contributor

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've aded one comment for discussion and I think we should also consider adding this behaviour to the task processor template?

@matthewelwell
Copy link
Contributor

@plumdog do you want to resolve the conflict and we can merge?

@plumdog plumdog force-pushed the issue-111-option-to-remove-use-of-waitforit branch from f8ea178 to 1336d5e Compare August 2, 2023 10:15
@plumdog
Copy link
Contributor Author

plumdog commented Aug 2, 2023

@matthewelwell done

@matthewelwell matthewelwell merged commit 1dad947 into main Aug 2, 2023
1 check passed
@matthewelwell matthewelwell deleted the issue-111-option-to-remove-use-of-waitforit branch August 2, 2023 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wait for it image not compatible with OpenShift
2 participants