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

Add --wait to helm tests and other improvements to support CD tools #8738

Merged
merged 7 commits into from
Oct 3, 2023

Conversation

davidjumani
Copy link
Contributor

Description

Most CI tools wait until resources are ready to mark a release as successful. Eg. ArgoCD and Flux
We can emulate this by passing the --wait flag to helm rather than individually adding support for every CD tool out there.
This PR adds this flag to the helm tests as well as some tweaks to support ArgoCD

Context

Users ran into this bug doing ... \ Users needed this feature to ...

See slack conversation here

Interesting decisions

We chose to do things this way because ...

Testing steps

I manually verified behavior by ...

Notes for reviewers

Be sure to verify intended behavior by ...

Please proofread comments on ...

This is a complex PR and may require a huddle to discuss ...

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@github-actions github-actions bot added the keep pr updated signals bulldozer to keep pr up to date with base branch label Sep 29, 2023
Copy link
Contributor

@sam-heilbron sam-heilbron left a comment

Choose a reason for hiding this comment

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

This is awesome!

We also have an upgrade suite, which doesn't run on PRs, but will run nightly and is intended to identify regressions with upgrading from an old version of Gloo to a newer one. Do you think it would be valuable to add this functionality to that suite as well? (example: https://github.com/solo-io/gloo/blob/main/test/kube2e/upgrade/upgrade_test.go#L302)

Comment on lines 7 to 12
{{- /* With ArgoCD, there is no concept or installs or upgrades. Everything is a sync. */}}
{{- /* This causes an issue when a hook must run on an install but not an upgrade based on a flag. */}}
{{- /* We address this by creating the job definition for an upgrade only if the flag says so */}}
{{- /* This is done in the next two lines */}}
{{- $shouldJobRunOnUpgrade := and .Release.IsUpgrade .Values.gateway.certGenJob.runOnUpdate }}
{{- if or .Release.IsInstall $shouldJobRunOnUpgrade }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This would not work as argo doesn't template with --is-install or --is-upgrade. This would be a good callout in the docs that if a user is using ArgoCD and global.glooMtls.enabled=true, it will run on every sync irrespective of the value of gateway.certGenJob.runOnUpdate

@github-actions
Copy link

github-actions bot commented Sep 29, 2023

Visit the preview URL for this PR (updated for commit ca5e859):

https://gloo-edge--pr8738-helm-wait-u96iay90.web.app

(expires Tue, 10 Oct 2023 16:13:44 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 77c2b86e287749579b7ff9cadb81e099042ef677

Comment on lines +16 to +17
{{- /* With ArgoCD, there is no concept or installs or upgrades. Everything is a sync. */}}
{{- /* Due to this behavour of ArgoCD, the value of `gateway.certGenJob.runOnUpdate` can not be respected and will run on every sync. */}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This would need to be called out in the docs

Copy link
Contributor

Choose a reason for hiding this comment

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

Is that something you plan on doing as part of this work?

Copy link
Contributor Author

@davidjumani davidjumani Oct 3, 2023

Choose a reason for hiding this comment

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

I've added a reference to this in #8724
There might be other instances which might need to be called out because of the way Argo works
Once I've addressed the issues mentioned in https://github.com/solo-io/solo-projects/issues/5293 we'll have confirmed what works and what doesn't in Argo (or have workarounds available) and can start with the docs

sam-heilbron
sam-heilbron previously approved these changes Oct 3, 2023
Copy link
Contributor

@sam-heilbron sam-heilbron left a comment

Choose a reason for hiding this comment

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

Love the comments!

Comment on lines +16 to +17
{{- /* With ArgoCD, there is no concept or installs or upgrades. Everything is a sync. */}}
{{- /* Due to this behavour of ArgoCD, the value of `gateway.certGenJob.runOnUpdate` can not be respected and will run on every sync. */}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is that something you plan on doing as part of this work?

@soloio-bulldozer soloio-bulldozer bot merged commit 55ad3e9 into main Oct 3, 2023
14 checks passed
@soloio-bulldozer soloio-bulldozer bot deleted the helm-wait branch October 3, 2023 17:33
davidjumani added a commit that referenced this pull request Oct 3, 2023
…8738)

* Add --wait to helm tests and other improvements to support CD tools

* Adding changelog

* Adding upgrade tests

* Adding changelog file to new location

* Deleting changelog file from old location

---------

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: changelog-bot <changelog-bot>
davidjumani added a commit that referenced this pull request Oct 3, 2023
…8738)

* Add --wait to helm tests and other improvements to support CD tools

* Adding changelog

* Adding upgrade tests

* Adding changelog file to new location

* Deleting changelog file from old location

---------

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: changelog-bot <changelog-bot>
davidjumani added a commit that referenced this pull request Oct 3, 2023
…8738)

* Add --wait to helm tests and other improvements to support CD tools

* Adding changelog

* Adding upgrade tests

* Adding changelog file to new location

* Deleting changelog file from old location

---------

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: changelog-bot <changelog-bot>
soloio-bulldozer bot added a commit that referenced this pull request Oct 4, 2023
…tools (#8742)

* Add --wait to helm tests and other improvements to support CD tools (#8738)

* Add --wait to helm tests and other improvements to support CD tools

* Adding changelog

* Adding upgrade tests

* Adding changelog file to new location

* Deleting changelog file from old location

---------

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: changelog-bot <changelog-bot>

* Move changelog

---------

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
soloio-bulldozer bot added a commit that referenced this pull request Oct 4, 2023
…tools (#8743)

* Add --wait to helm tests and other improvements to support CD tools (#8738)

* Add --wait to helm tests and other improvements to support CD tools

* Adding changelog

* Adding upgrade tests

* Adding changelog file to new location

* Deleting changelog file from old location

---------

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: changelog-bot <changelog-bot>

* Moving changelog

---------

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
soloio-bulldozer bot added a commit that referenced this pull request Oct 4, 2023
…tools (#8744)

* Add --wait to helm tests and other improvements to support CD tools (#8738)

* Add --wait to helm tests and other improvements to support CD tools

* Adding changelog

* Adding upgrade tests

* Adding changelog file to new location

* Deleting changelog file from old location

---------

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: changelog-bot <changelog-bot>

* Moving changelog

---------

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep pr updated signals bulldozer to keep pr up to date with base branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants