diff --git a/charts/base-cluster/templates/monitoring/kdave/kdave.yaml b/charts/base-cluster/templates/monitoring/kdave/kdave.yaml new file mode 100644 index 000000000..738121d5b --- /dev/null +++ b/charts/base-cluster/templates/monitoring/kdave/kdave.yaml @@ -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 -}} diff --git a/charts/base-cluster/values.schema.json b/charts/base-cluster/values.schema.json index e2efc8860..086d4f9fa 100644 --- a/charts/base-cluster/values.schema.json +++ b/charts/base-cluster/values.schema.json @@ -579,6 +579,15 @@ }, "additionalProperties": false }, + "kdave": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "additionalProperties": false + }, "prometheus": { "type": "object", "properties": { diff --git a/charts/base-cluster/values.yaml b/charts/base-cluster/values.yaml index 47edd7eee..4d2699544 100644 --- a/charts/base-cluster/values.yaml +++ b/charts/base-cluster/values.yaml @@ -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 @@ -235,6 +243,8 @@ monitoring: enabled: false apiKey: "" pingKey: "" + kdave: + enabled: true prometheus: enabled: true replicas: 2