diff --git a/chart/templates/daemonset.yaml b/chart/templates/daemonset.yaml index 2932e74..7d1f9d2 100644 --- a/chart/templates/daemonset.yaml +++ b/chart/templates/daemonset.yaml @@ -15,6 +15,9 @@ spec: template: metadata: labels: + app: {{ include "chart.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + release: {{ .Release.Name }} app.kubernetes.io/name: {{ include "chart.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} spec: @@ -25,8 +28,12 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - - containerPort: 8080 - protocol: TCP + - containerPort: 8080 + protocol: TCP + name: metrics + - containerPort: 80 + protocol: TCP + name: web env: - name: NODE_NAME valueFrom: diff --git a/chart/templates/pormonitor.yaml b/chart/templates/pormonitor.yaml new file mode 100644 index 0000000..e3fab1f --- /dev/null +++ b/chart/templates/pormonitor.yaml @@ -0,0 +1,19 @@ +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: kube-prometheus-stack-multicooker-metrics + namespace: monitoring + labels: + #some of those labels should match the "spec.selector.matchLatels" of prometheus otherwise metrics won't be available in targets + app: kube-prometheus-stack-operator + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + release: kube-prometheus-stack + {{- range $key, $value := .Values.serviceMonitor.additionalLabels }} + {{ $key }}: {{ $value | quote }} +spec: + selector: + matchLabels: + app: {{ include "chart.name" . }} + podMetricsEndpoints: + - port: metrics + - path: "/metrics" \ No newline at end of file diff --git a/chart/values.yaml b/chart/values.yaml index 559ff4f..4655527 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -1,6 +1,6 @@ image: repository: docmarr/kubernetes-multicooker - tag: "1.0.0" + tag: "1.0.2" pullPolicy: Always nameOverride: ""