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

api/vmalertmanagerconfig: rework config validation #1055

Merged
merged 1 commit into from
Aug 6, 2024
Merged

api/vmalertmanagerconfig: rework config validation #1055

merged 1 commit into from
Aug 6, 2024

Conversation

f41gh7
Copy link
Collaborator

@f41gh7 f41gh7 commented Aug 5, 2024

  • adds more strict validation to VMAlertmanagerConfig
  • skip broken configurations from VMAlertmanager during config build
  • adds new status fields to the VMalertmanager config:
    • lastSyncError - that defines last error occured to the config during config generation
    • status - generic CRD status for health track
    • additional fields for sync error context, like last error timestamp and name of alertmanager
  • adds stack trace only to the panic level errors. It should reduce log noise

#825

@f41gh7 f41gh7 marked this pull request as ready for review August 6, 2024 17:05
AndrewChubatiuk
AndrewChubatiuk previously approved these changes Aug 6, 2024
Copy link
Contributor

@AndrewChubatiuk AndrewChubatiuk left a comment

Choose a reason for hiding this comment

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

LGTM

* adds more strict validation to VMAlertmanagerConfig
* skip broken configurations from VMAlertmanager during config build
* adds new status fields to the VMalertmanager config:
  * lastSyncError - that defines last error occured to the config during config generation
  * status - generic CRD status for health track
  * additional fields for sync error context, like last error timestamp and name of alertmanager
* adds stack trace only to the panic level errors. It should reduce log noise
* improves test coverage for VMAlertmanagerConfig validation webhook
* removes required tlsConfig for email_configs
* adds oauth2 and authorization to the VMAlertmanagerConfig
  `http_config` setting.
* update docs/resources/vmalertmanager.md with proper secret examples
  and reflect last changes
* replaces yaml based convertion for prometheus to vm AlertmanagerConfig
  receivers. It was required since validation tests needed proper yaml
tags and our CRD tags is not compatible with prometheus one

Signed-off-by: f41gh7 <[email protected]>
@f41gh7 f41gh7 merged commit b00759d into master Aug 6, 2024
1 check passed
@f41gh7 f41gh7 deleted the gh-825 branch August 6, 2024 21:58
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.

2 participants