diff --git a/charts/kubezero-nats/Chart.yaml b/charts/kubezero-nats/Chart.yaml index 67b2eeda..6d40b64f 100644 --- a/charts/kubezero-nats/Chart.yaml +++ b/charts/kubezero-nats/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: kubezero-nats description: KubeZero umbrella chart for NATS type: application -version: 0.1.0 +version: 0.1.1 home: https://kubezero.com icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png keywords: @@ -11,6 +11,9 @@ keywords: maintainers: - name: Quarky9 dependencies: + - name: kubezero-lib + version: ">= 0.1.3" + repository: https://zero-down-time.github.io/kubezero/ - name: nats version: 0.8.3 #repository: https://nats-io.github.io/k8s/helm/charts/ diff --git a/charts/kubezero-nats/dashboards.yaml b/charts/kubezero-nats/dashboards.yaml new file mode 100644 index 00000000..a02ec1f9 --- /dev/null +++ b/charts/kubezero-nats/dashboards.yaml @@ -0,0 +1,8 @@ +configmap: grafana-dashboards-nats +condition: '.Values.nats.exporter.serviceMonitor.enabled' +gzip: true +# folder: +dashboards: +- name: nats + url: https://grafana.com/api/dashboards/13707/revisions/1/download + tags: ['NATS'] diff --git a/charts/kubezero-nats/templates/grafana-dashboards.yaml b/charts/kubezero-nats/templates/grafana-dashboards.yaml new file mode 100644 index 00000000..9e17afdd --- /dev/null +++ b/charts/kubezero-nats/templates/grafana-dashboards.yaml @@ -0,0 +1,13 @@ +{{- if .Values.nats.exporter.serviceMonitor.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-%s" (include "kubezero-lib.fullname" $) "grafana-dashboards-nats" | trunc 63 | trimSuffix "-" }} + namespace: {{ .Release.Namespace }} + labels: + grafana_dashboard: "1" +{{ include "kubezero-lib.labels" . | indent 4 }} +binaryData: + nats.json.gz: + H4sIAAAAAAAC/+2cW2/bNhSA3/MrBD2tgBNYci7b3lI3XQssF9TuXobAoCVaIkKRGknFTgP/95GUbFEWlWZFFystXwyLh+Q5pM7lCx3p8cDz/NkMkbwQ3P/d+1t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asDhMzTIGA2nRCqwQb6/MSAqdWh/ACj7DCRdbp6lis32nN6zaTtlKSJO3QFfVoO1nOt1Zh5UJzyqyL25neU+uRM7AerwOM0YOLKtzMNEvmBg5mHAw8fpgIoPZvmDCqrqPMHEJM8oeXhtP9IMX5g8CckcL+6GFg52w0OOnlXc3jjG2Ln89ke6uYpXbz7jcAclPxDRnL8M0thz5DKixDXNUs3+qGe2fahCZdRSel0Gbbv3P4Jtg+GKA81YZ6X0kjm0c27iTEEcN34UafnXU4KjhlVJDxpN9QoNdfb+YQf/2fykNddzwjdzQ83rruMFxwz644cRxg+OG18gNtBD7PW54woA+njdcF8KBgztwcODgwOG7gMPpDwQOTP1aNkExdGDhwELV9X2eSHTr7+uRhEMLdybxU/yfxjRltEjSXPq7+z+Nnx2AQve/p/8Bb9oO0w++Ce1807qN3wdvjnvwIEu5abIAP4dwgv/lgZanTHgG5IQvxjjjDksd4fSVDIYOb9zJSb/B4diBgwOH1wcOvJhv32Jgqdtp5/HZi52cfMXCfj3l0mmrYwvHFo4tHFt8E1v85tjCscUrZAtMl+pYgBcZZHs7l/iaFb06mphIY72x1VhHEI4gfrwfX8YYyQS686Ds9nVmKmi2XuMvytDyCV0eBhsHk2FRtanB6+2wHEV3OodWg2WYq3o82yQd06X8E+NFccHQuBiZF0H9kL1/YnwPzIvR0JQYr9gLje9BXK70drMGafCMVn82mHZ1aTEnPjUnNrWEx+ZFXbr8s9i0d2NLvX0wy1Wsk6TePoy40LVm2wsQIkv2xuTObtW+6/f9VZvp8yiFGfhr+0a+QJdG4xV95XWzOPsJgUJn6mB0Njw7WP8LyPVbsRZSAAA= +{{- end }} diff --git a/charts/kubezero-nats/update.sh b/charts/kubezero-nats/update.sh index 0e89e6f0..ce0a46e7 100755 --- a/charts/kubezero-nats/update.sh +++ b/charts/kubezero-nats/update.sh @@ -7,3 +7,6 @@ rm -rf charts/nats && mkdir -p charts/nats git clone --depth=1 https://github.com/nats-io/k8s.git cp -r k8s/helm/charts/nats/* charts/nats/ rm -rf k8s + +# Fetch dashboards +../kubezero-metrics/sync_grafana_dashboards.py dashboards.yaml templates/grafana-dashboards.yaml diff --git a/charts/kubezero-nats/values.yaml b/charts/kubezero-nats/values.yaml index 8af407cd..ad968999 100644 --- a/charts/kubezero-nats/values.yaml +++ b/charts/kubezero-nats/values.yaml @@ -7,15 +7,9 @@ nats: jetstream: enabled: true - memStorage: - enabled: true - size: 128Mi - natsbox: enabled: false exporter: serviceMonitor: enabled: true - labels: - release: metrics