Skip to content

Commit

Permalink
Be straight-forward about the namespace
Browse files Browse the repository at this point in the history
Signed-off-by: Danil Mironov <[email protected]>
  • Loading branch information
patrungel committed Jul 24, 2020
1 parent ce9057a commit 1059909
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 21 deletions.
4 changes: 1 addition & 3 deletions deployment/dcgm-exporter/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "dcgm-exporter.fullname" . }}
{{- if .Values.namespace }}
namespace: {{ .Values.namespace }}
{{- end }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "dcgm-exporter.labels" . | nindent 4 }}
app.kubernetes.io/component: "dcgm-exporter"
Expand Down
8 changes: 1 addition & 7 deletions deployment/dcgm-exporter/templates/service-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "dcgm-exporter.fullname" . }}
{{- if .Values.serviceMonitor.namespace }}
namespace: {{ .Values.serviceMonitor.namespace }}
{{- end }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "dcgm-exporter.labels" . | nindent 4 }}
app.kubernetes.io/component: "dcgm-exporter"
Expand All @@ -36,11 +34,7 @@ spec:
path: "/metrics"
namespaceSelector:
matchNames:
{{- if .Values.namespace }}
- "{{ .Values.namespace }}"
{{ else }}
- "{{ .Release.Namespace }}"
{{- end }}
endpoints:
- port: "metrics"
path: "/metrics"
Expand Down
4 changes: 1 addition & 3 deletions deployment/dcgm-exporter/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "dcgm-exporter.fullname" . }}
{{- if .Values.namespace }}
namespace: {{ .Values.namespace }}
{{- end }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "dcgm-exporter.labels" . | nindent 4 }}
app.kubernetes.io/component: "dcgm-exporter"
Expand Down
4 changes: 1 addition & 3 deletions deployment/dcgm-exporter/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "dcgm-exporter.serviceAccountName" . }}
{{- if .Values.namespace }}
namespace: {{ .Values.namespace }}
{{- end }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "dcgm-exporter.labels" . | nindent 4 }}
app.kubernetes.io/component: "dcgm-exporter"
Expand Down
5 changes: 0 additions & 5 deletions deployment/dcgm-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ image:
# for the image tag, e.g:
#tag: 1.7.2

# For helm v2 this field might be useful
#namespace: kube-system

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
Expand Down Expand Up @@ -63,8 +60,6 @@ resources: {}
serviceMonitor:
enabled: true
interval: 15s
# Defaults to .Release.Namespace
#namespace: default
additionalLabels: {}
#monitoring: prometheus

Expand Down

0 comments on commit 1059909

Please sign in to comment.