mirror of
https://github.com/wahyd4/helm-charts.git
synced 2026-08-09 04:26:02 +10:00
feat(prometheus-couchdb-exporter): add configurable apiVersion (#384)
Signed-off-by: Gabriel Melillo <gabriel@melillo.me>
This commit is contained in:
@@ -3,7 +3,7 @@ appVersion: "1.0"
|
||||
description: A Helm chart to export the metrics from couchdb in Prometheus format.
|
||||
name: prometheus-couchdb-exporter
|
||||
home: https://github.com/gesellix/couchdb-prometheus-exporter
|
||||
version: 0.1.3
|
||||
version: 0.2.0
|
||||
keywords:
|
||||
- couchdb-exporter
|
||||
sources:
|
||||
|
||||
@@ -40,4 +40,15 @@ Create the name of the service account to use
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for rbac.
|
||||
*/}}
|
||||
{{- define "rbac.apiVersion" -}}
|
||||
{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" }}
|
||||
{{- print "rbac.authorization.k8s.io/v1" -}}
|
||||
{{- else -}}
|
||||
{{- print "rbac.authorization.k8s.io/v1beta1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{- if .Values.rbac.create }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: {{ template "rbac.apiVersion" . }}
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ template "prometheus-couchdb-exporter.fullname" . }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: {{ template "rbac.apiVersion" . }}
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ template "prometheus-couchdb-exporter.fullname" . }}
|
||||
|
||||
Reference in New Issue
Block a user