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 template for HttpCheck alert configuration #499

Closed
wants to merge 13 commits into from

Conversation

martini-source
Copy link
Contributor

What this PR does / why we need it:

  • Adds a helm template to configure the 'for' key of stardog HttpCheck alerts.

Checklist

  • Chart Version bumped
  • I have run make docs
  • Variables are documented in the values.yaml using the format required by Helm-Docs.
  • PR contains the label that identifies the chart, e.g. chart/<chart-name>
  • PR contains the label that identifies the type of change, which is one of
    [ bug, enhancement, documentation, change, breaking, dependency ]

@martini-source martini-source added enhancement New feature or request chart/stardog labels Jan 18, 2024
@martini-source martini-source requested a review from a team as a code owner January 18, 2024 14:11
@@ -48,7 +48,7 @@ spec:
{{- if .Values.ingress.enabled }}
- alert: HttpCheck
expr: probe_success{instance="https://{{ .Values.ingress.host }}/admin/healthcheck"} != 1
for: 1m
for: "{{ "{{ if (((.Values.alerts).httpCheck).for) }}" }}{{ .Values.alerts.httpCheck.for }}{{ "{{ else }}" }}1m{{ "{{ end }}" }}"
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure but wouldn't something simpler like this work?

{{ default "1m" .Values.alerts.httpCheck.for | quote }}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did try this at first see bc991ee, but the tests kept failing with a parse error for "1m", written with and without quotes as well as with pipe to quotes and without.

Copy link
Member

Choose a reason for hiding this comment

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

Hmmm I think you should try the way I've proposed (I've used that for rocketchat-deploy therefore I'm pretty sure it works). I'm not convinced that the way you tried does the same thing.

@@ -92,7 +92,9 @@ metrics:
repository: sscaling/jmx-prometheus-exporter
tag: 0.12.0
pullPolicy: IfNotPresent

alerts:
Copy link
Member

Choose a reason for hiding this comment

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

This will apply the "30m" value to all environments that use this helm chart. I don't think this is what we want?

This value should only be set in the repo which invokes this chart.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's true, done.

@davidgubler
Copy link
Member

Merging all the commits into one would also be nice.

@martini-source
Copy link
Contributor Author

I figured I would squash all into one when actually merging.

@martini-source martini-source deleted the enhancement/stardog-alerts branch April 16, 2024 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chart/stardog enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants