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

Big Bang Extension: Allow for customizing wait time on helmreleases #1780

Closed
mjnagel opened this issue Jun 2, 2023 · 0 comments · Fixed by #1782
Closed

Big Bang Extension: Allow for customizing wait time on helmreleases #1780

mjnagel opened this issue Jun 2, 2023 · 0 comments · Fixed by #1782
Labels
enhancement ✨ New feature or request

Comments

@mjnagel
Copy link
Contributor

mjnagel commented Jun 2, 2023

Is your feature request related to a problem? Please describe.

Currently when deploying a zarf package using the BB extension a series of wait actions are automatically injected to onDeploy.after to wait 10 minutes for each package inside of Big Bang (in order). However this is currently hardcoded with a timeout of 10 minutes - https://github.com/defenseunicorns/zarf/blob/main/src/extensions/bigbang/bigbang.go#L149 . While Big Bang does use a default 10 minute timeout on each package this is customizable, and if I raised it to 15 minutes in Big Bang I would like to also edit it in zarf to match. There are also cases where the 10 minute time period does not line up with Flux's 10 minutes due to dependencies, etc.

Describe the solution you'd like

Allow for customizing the timeout, with a default of 10 minutes. One possibility to implement this:

    extensions:
      bigbang:
        wait_timeout: 900s

Describe alternatives you've considered

Remove the automatic waits from the extension (or allow them to be toggled off) so that I can build my own custom waits. This would also be acceptable, but would be more work for the end user to rebuild the functionality in a clean way.

Additional context

As an aside - the waits as-is are not very functional across upgrades due to timing of flux's reconciliation loop. Zarf will hit the wait functions before flux has actually triggered the upgrade across the packages, meaning that everything is in a ready state (pre-upgrade) and a deploy will almost always succeed quickly, without waiting. Having these type of waits in the extension may lead users to a false sense of security about the deployment, unless they are more robust.

@mjnagel mjnagel added the enhancement ✨ New feature or request label Jun 2, 2023
@Noxsios Noxsios linked a pull request Jun 2, 2023 that will close this issue
5 tasks
Racer159 pushed a commit that referenced this issue Jun 3, 2023
## Description

This PR makes it so that the Big Bang extension respects and uses the
`onDeploy.defaults.maxTotalSeconds` field during its `onSuccess` actions
to wait for HelmReleases to be ready.

The default time is still ten minutes (600s), but if a default is
specified _and is greater than 600_, it will use that instead.

```yaml
components:
  - name: bigbang
    extensions:
      bigbang:
        version: 2.0.0
        valuesFiles:
          - config/disable-all.yaml
    actions:
      onDeploy:
        defaults:
          maxTotalSeconds: 1200 # 20 minutes in seconds
 ```

## Related Issue

Fixes #1780 

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [ ] Test, docs, adr added or updated as needed
- [x] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed

---------

Signed-off-by: razzle <harry@razzle.cloud>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant