k8s
k8s copied to clipboard
helm: make it possible to override `-prefix=nats` for the exporter
-prefix=nats is hard codded here:
https://github.com/nats-io/k8s/blob/88dcf6eefbc6a7cd41fe1ba4374f977a52e05cc5/helm/charts/nats/templates/statefulset.yaml#L542
but it seems that gnatsd is normally the default and used in public dashboards:
https://github.com/nats-io/prometheus-nats-exporter/blob/9468d46771d476bb896f8be95d3101558fa9f466/walkthrough/grafana-nats-dash.json#L246-L249
https://github.com/kubenav/deploy/blob/ed66ab3bf470fe7a43c6990e39d158b249f5ff7c/dashboards/nats-dashboard.yaml#L23
meanwhile I'm using this:
kustomization.yaml
helmCharts:
- name: nats
repo: https://nats-io.github.io/k8s/helm/charts/
version: v0.17.0
releaseName: nats
namespace: default
valuesFile: ./values.yaml
patches:
- ./patch.yaml
patch.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: nats
namespace: default
spec:
template:
spec:
containers:
- args:
- -connz
- -routez
- -subz
- -varz
- -prefix=gnatsd
- -use_internal_server_id
- -jsz=all
- http://localhost:8222/
name: metrics
Supported via patching/merging in nats-1.0.0-beta.0