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

feat: support user_key_file and token_file to the pushover #5886

Merged
merged 21 commits into from Oct 6, 2023

Conversation

dongjiang1989
Copy link
Contributor

@dongjiang1989 dongjiang1989 commented Sep 4, 2023

…config.

Description

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a feature request, be sure to link to that issue.

Add the user_key_file and token_file keys to the pushover config.

fix: #5859

Type of change

What type of changes does your code introduce to the Prometheus operator? Put an x in the box that apply.

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Changelog entry

Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.

Add the user_key_file and token_file keys to the pushover config.

…config.

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
@dongjiang1989 dongjiang1989 requested a review from a team as a code owner September 4, 2023 15:00
Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
@pull-request-size pull-request-size bot added size/L and removed size/M labels Sep 4, 2023
Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

Thanks! This is a very good start. You need also to implement the conversions in pkg/apis/monitoring/v1beta1/conversion_from.go and pkg/apis/monitoring/v1beta1/conversion_to.go. And validations in pkg/alertmanager/validation/*/validation.go.

pkg/alertmanager/amcfg.go Outdated Show resolved Hide resolved
pkg/apis/monitoring/v1alpha1/alertmanager_config_types.go Outdated Show resolved Hide resolved
pkg/apis/monitoring/v1alpha1/alertmanager_config_types.go Outdated Show resolved Hide resolved
pkg/apis/monitoring/v1alpha1/alertmanager_config_types.go Outdated Show resolved Hide resolved
pkg/apis/monitoring/v1alpha1/alertmanager_config_types.go Outdated Show resolved Hide resolved
pkg/apis/monitoring/v1beta1/alertmanager_config_types.go Outdated Show resolved Hide resolved
Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
@dongjiang1989
Copy link
Contributor Author

Thanks! This is a very good start. You need also to implement the conversions in pkg/apis/monitoring/v1beta1/conversion_from.go and pkg/apis/monitoring/v1beta1/conversion_to.go. And validations in pkg/alertmanager/validation/*/validation.go.

Thanks for you review. @simonpasquier Please re-check!

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
Copy link
Member

@ArthurSens ArthurSens left a comment

Choose a reason for hiding this comment

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

Good work so far!

pkg/alertmanager/amcfg.go Show resolved Hide resolved
pkg/alertmanager/amcfg_test.go Outdated Show resolved Hide resolved
pkg/alertmanager/amcfg_test.go Show resolved Hide resolved
pkg/alertmanager/amcfg_test.go Outdated Show resolved Hide resolved
pkg/alertmanager/validation/v1beta1/validation.go Outdated Show resolved Hide resolved
pkg/alertmanager/validation/v1beta1/validation.go Outdated Show resolved Hide resolved
pkg/alertmanager/validation/v1beta1/validation_test.go Outdated Show resolved Hide resolved
dongjiang1989 and others added 4 commits September 18, 2023 10:45
fix misspell

Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
fix misspell

Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
@dongjiang1989
Copy link
Contributor Author

Good work so far!

@ArthurSens thanks for your review.
Please re-check.

@heliochronix
Copy link

Is it possible this will be merged before the next release?

Copy link
Member

@ArthurSens ArthurSens left a comment

Choose a reason for hiding this comment

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

Thanks for continuing working on this! We're almost there, just some test descriptions that aren't clear and a test that could increase coverage if we split them in two

pkg/alertmanager/amcfg_test.go Outdated Show resolved Hide resolved
pkg/alertmanager/amcfg_test.go Outdated Show resolved Hide resolved
pkg/alertmanager/amcfg_test.go Outdated Show resolved Hide resolved
pkg/alertmanager/amcfg_test.go Outdated Show resolved Hide resolved
pkg/alertmanager/amcfg_test.go Outdated Show resolved Hide resolved
pkg/alertmanager/amcfg_test.go Outdated Show resolved Hide resolved
dongjiang1989 and others added 7 commits October 6, 2023 20:33
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
Copy link
Member

@ArthurSens ArthurSens left a comment

Choose a reason for hiding this comment

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

I'm so sorry for the bumpy interactions, I think I missed these in the previous review 😭

pkg/alertmanager/amcfg_test.go Outdated Show resolved Hide resolved
pkg/alertmanager/amcfg_test.go Outdated Show resolved Hide resolved
dongjiang1989 and others added 2 commits October 6, 2023 23:41
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
@dongjiang1989
Copy link
Contributor Author

I'm so sorry for the bumpy interactions, I think I missed these in the previous review 😭

@ArthurSens Thank you for your review.

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
Copy link
Member

@ArthurSens ArthurSens left a comment

Choose a reason for hiding this comment

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

Thank you very much!!

@ArthurSens ArthurSens merged commit e3798b0 into prometheus-operator:main Oct 6, 2023
17 checks passed
@dongjiang1989 dongjiang1989 deleted the add-key-files branch October 19, 2023 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support device, user_key_file and token_file for Pushover integration
4 participants