Skip to content

Commit

Permalink
feat(base-cluster): add kdave for deprecated CRD metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
cwrau committed Jul 2, 2024
1 parent 2f8a414 commit a637638
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
52 changes: 52 additions & 0 deletions charts/base-cluster/templates/monitoring/kdave/kdave.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{{- if and .Values.monitoring.prometheus.enabled .Values.monitoring.kdave.enabled -}}
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: kdave
namespace: monitoring
labels: {{- include "common.labels.standard" $ | nindent 4 }}
app.kubernetes.io/component: kdave
app.kubernetes.io/part-of: monitoring
spec:
chart:
spec: {{- include "base-cluster.helm.chartSpec" (dict "repo" "kdave" "chart" "kdave" "context" $ "reconcileStrategy" "ChartVersion") | nindent 6 }}
interval: 1h
driftDetection:
mode: enabled
install:
timeout: 10m0s
upgrade:
timeout: 10m0s
dependsOn:
- name: kube-prometheus-stack
namespace: monitoring
values:
helmBinary: helm3
image:
repository: {{ printf "%s/aelbakry/kdave-server" ($.Values.global.imageRegistry | default (include "base-cluster.defaultRegistry" (dict))) }}
tag: 1.0.4
rbac:
pspEnabled: false
apiVersionsInspector:
enabled: false
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: kdave
namespace: monitoring
labels: {{- include "common.labels.standard" $ | nindent 4 }}{{- toYaml .Values.monitoring.labels | nindent 4 }}
app.kubernetes.io/component: kdave
app.kubernetes.io/part-of: monitoring
spec:
endpoints:
- port: metrics
namespaceSelector:
matchNames:
- monitoring
selector:
matchLabels:
app: kdave
project: kdave
release: kdave
{{- end -}}
9 changes: 9 additions & 0 deletions charts/base-cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,15 @@
},
"additionalProperties": false
},
"kdave": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
},
"additionalProperties": false
},
"prometheus": {
"type": "object",
"properties": {
Expand Down
10 changes: 10 additions & 0 deletions charts/base-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,14 @@ global:
tag: 23.7.0
type: git
condition: '{{ dig "kube-janitor" "enabled" false .Values.AsMap }}'
kdave:
url: https://github.com/amelbakry/kdave-chart
charts:
kdave:
commit: 47a46848222969d60bae87b4650614a9b7a85d00
path: .
type: git
condition: "{{ and .Values.monitoring.kdave.enabled .Values.monitoring.prometheus.enabled }}"
authentication:
grafana:
authenticationPath: /protocol/openid-connect/auth
Expand Down Expand Up @@ -235,6 +243,8 @@ monitoring:
enabled: false
apiKey: ""
pingKey: ""
kdave:
enabled: true
prometheus:
enabled: true
replicas: 2
Expand Down

0 comments on commit a637638

Please sign in to comment.