Skip to content

Commit 1d6225d

Browse files
authored
Merge pull request #24 from Randsw/develop
feat(helm): Add prometheus rule. Bump chart version (#23)
2 parents 440936e + 0b8b92f commit 1d6225d

4 files changed

Lines changed: 23 additions & 6 deletions

File tree

helm-chart/kubeinfo-backend/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ type: application
1414
# This is the chart version. This version number should be incremented each time you make changes
1515
# to the chart and its templates, including the app version.
1616
# Versions are expected to follow Semantic Versioning (https://semver.org/)
17-
version: 0.1.6
17+
version: 0.1.7
1818

1919
# This is the version number of the application being deployed. This version number should be
2020
# incremented each time you make changes to the application. Versions are not expected to
2121
# follow Semantic Versioning. They should reflect the version the application is using.
2222
# It is recommended to use it with quotes.
23-
appVersion: "0.1.8"
23+
appVersion: "0.2.2"
2424
maintainers:
2525
- name: Randsw
2626
email: randsw06@gmail.com
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{{- if .Values.metrics.prometheusRule.enabled -}}
2+
apiVersion: monitoring.coreos.com/v1
3+
kind: PrometheusRule
4+
metadata:
5+
name: {{ include "kubeinfo-backend.fullname" . }}
6+
{{- if .Values.metrics.prometheusRule.namespace }}
7+
namespace: {{ .Values.metrics.prometheusRule.namespace | quote }}
8+
{{- end }}
9+
labels:
10+
{{- include "kubeinfo-backend.labels" . | nindent 4 }}
11+
{{- if .Values.metrics.prometheusRule.additionalLabels }}
12+
{{- toYaml .Values.metrics.prometheusRule.additionalLabels | nindent 4 }}
13+
{{- end }}
14+
spec:
15+
{{- if .Values.metrics.prometheusRule.rules }}
16+
groups:
17+
- name: {{ template "kubeinfo-backend.fullname" . }}
18+
rules: {{- toYaml .Values.metrics.prometheusRule.rules | nindent 4 }}
19+
{{- end }}
20+
{{- end }}

helm-chart/kubeinfo-backend/templates/servicemonitor.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ metadata:
88
{{- end }}
99
labels:
1010
{{- include "kubeinfo-backend.labels" . | nindent 4 }}
11-
app.kubernetes.io/component: controller
1211
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
1312
{{- toYaml .Values.metrics.serviceMonitor.additionalLabels | nindent 4 }}
1413
{{- end }}

helm-chart/kubeinfo-backend/values.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ resources: {}
5555
# Probes
5656
livenessProbe:
5757
httpGet:
58-
# should match container.healthCheckPath
5958
path: "/healthz"
6059
port: 8080
6160
scheme: HTTP
@@ -67,7 +66,6 @@ livenessProbe:
6766

6867
readinessProbe:
6968
httpGet:
70-
# should match container.healthCheckPath
7169
path: "/healthz"
7270
port: 8080
7371
scheme: HTTP
@@ -155,7 +153,7 @@ metrics:
155153
prometheusRule:
156154
enabled: false
157155
additionalLabels: {}
158-
# namespace: ""
156+
namespace: ""
159157
rules: []
160158
# # These are just examples rules, please adapt them to your needs
161159
# - alert: NGINXConfigFailed

0 commit comments

Comments
 (0)