Add ability to configure whether to deploy kpi-exporter
Also, add release name as a prefix to kpi-exporter resource names to
in line with other resources created by nem-monitoring.
Change-Id: I2b15f97128795e19d56a1be2a9290e8775f389e2
diff --git a/nem-monitoring/templates/exporter-deployment.yaml b/nem-monitoring/templates/exporter-deployment.yaml
index 1611239..f49029f 100644
--- a/nem-monitoring/templates/exporter-deployment.yaml
+++ b/nem-monitoring/templates/exporter-deployment.yaml
@@ -13,10 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+{{- if .Values.kpi_exporter.enabled }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
- name: kpi-exporter
+ name: {{ template "kpi-exporter.fullname" . }}
labels:
release: {{ .Release.Name }}
spec:
@@ -43,4 +44,5 @@
volumes:
- name: exporter-config
configMap:
- name: exporter-configmap
+ name: {{ template "kpi-exporter.fullname" . }}
+{{- end }}