Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Allow sending notifications only after a period #342

Open
eddycharly opened this issue Sep 30, 2021 · 1 comment
Open

Allow sending notifications only after a period #342

eddycharly opened this issue Sep 30, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@eddycharly
Copy link

eddycharly commented Sep 30, 2021

For example, an helm repository might be unavailable for a few minutes, it would be nice to send a notification to alert the app is in an unknown state only if it is in this state for 10 minutes for example.

Maybe we can already do it though, the best i could come up with is this:

    - description: Application status is 'Unknown'
      when: app.status.sync.status == 'Unknown' and time.Now().Sub(time.Parse(app.status.conditions[0].lastTransitionTime)).Minutes() >= 10
      send:
        - app-sync-status-unknown

Not sure if accessing the conditions array item at index 0 is safe though.

@eddycharly eddycharly added the enhancement New feature or request label Sep 30, 2021
@GregdTd
Copy link

GregdTd commented Jan 12, 2022

Any news on the subject ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants