-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(exporter): Add ndm exporters support from helm chart (#612)
* added ndm exporters in helm charts * updated helm chart README * removed unrequired fields from README and automgenerate ndm-operator yaml * bumped up chart vesion, chart appVersion and images version Signed-off-by: Abhishek Agarwal <abhishek.agarwal@mayadata.io>
- Loading branch information
Abhishek Agarwal
authored
Aug 13, 2021
1 parent
37af3c2
commit 4278a9f
Showing
11 changed files
with
369 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
deploy/helm/charts/templates/cluster-exporter-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- if and .Values.ndmExporter.enabled .Values.ndmExporter.clusterExporter.metricsPort }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "openebs-ndm.cluster-exporter.fullname" . }}-service | ||
labels: | ||
{{- include "openebs-ndm.cluster-exporter.labels" . | nindent 4 }} | ||
spec: | ||
clusterIP: None | ||
ports: | ||
- name: metrics | ||
port: {{ .Values.ndmExporter.clusterExporter.metricsPort }} | ||
targetPort: {{ .Values.ndmExporter.clusterExporter.metricsPort }} | ||
selector: | ||
{{- with .Values.ndmExporter.clusterExporter.podLabels }} | ||
{{ toYaml . }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{{- if .Values.ndmExporter.enabled }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "openebs-ndm.cluster-exporter.fullname" . }} | ||
labels: | ||
{{- include "openebs-ndm.cluster-exporter.labels" . | nindent 4 }} | ||
spec: | ||
replicas: 1 | ||
strategy: | ||
type: Recreate | ||
selector: | ||
matchLabels: | ||
{{- include "openebs-ndm.cluster-exporter.matchLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "openebs-ndm.cluster-exporter.labels" . | nindent 8 }} | ||
{{- with .Values.ndmExporter.clusterExporter.podLabels }} | ||
{{ toYaml . | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
serviceAccountName: {{ template "openebs-ndm.serviceAccountName" . }} | ||
containers: | ||
- name: {{ template "openebs-ndm.cluster-exporter.fullname" . }} | ||
image: "{{ .Values.ndmExporter.image.registry }}{{ .Values.ndmExporter.image.repository }}:{{ .Values.ndmExporter.image.tag }}" | ||
command: | ||
- /usr/local/bin/exporter | ||
args: | ||
- "start" | ||
- "--mode=cluster" | ||
- "--port=$(METRICS_LISTEN_PORT)" | ||
- "--metrics=/metrics" | ||
ports: | ||
- containerPort: {{ .Values.ndmExporter.clusterExporter.metricsPort }} | ||
protocol: TCP | ||
name: metrics | ||
imagePullPolicy: {{ .Values.ndmExporter.image.pullPolicy }} | ||
env: | ||
- name: NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
{{- if .Values.ndmExporter.clusterExporter.metricsPort }} | ||
- name: METRICS_LISTEN_PORT | ||
value: :{{ .Values.ndmExporter.clusterExporter.metricsPort }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- if and .Values.ndmExporter.enabled .Values.ndmExporter.nodeExporter.metricsPort }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "openebs-ndm.node-exporter.fullname" . }}-service | ||
labels: | ||
{{- include "openebs-ndm.node-exporter.labels" . | nindent 4 }} | ||
spec: | ||
clusterIP: None | ||
ports: | ||
- name: metrics | ||
port: {{ .Values.ndmExporter.nodeExporter.metricsPort }} | ||
targetPort: {{ .Values.ndmExporter.nodeExporter.metricsPort }} | ||
selector: | ||
{{- with .Values.ndmExporter.nodeExporter.podLabels }} | ||
{{ toYaml . }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{{- if .Values.ndmExporter.enabled }} | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: {{ template "openebs-ndm.node-exporter.fullname" . }} | ||
labels: | ||
{{- include "openebs-ndm.node-exporter.labels" . | nindent 4 }} | ||
spec: | ||
updateStrategy: | ||
type: RollingUpdate | ||
selector: | ||
matchLabels: | ||
{{- include "openebs-ndm.node-exporter.matchLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "openebs-ndm.node-exporter.labels" . | nindent 8 }} | ||
{{- with .Values.ndmExporter.nodeExporter.podLabels }} | ||
{{ toYaml . | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
serviceAccountName: {{ template "openebs-ndm.serviceAccountName" . }} | ||
containers: | ||
- name: {{ template "openebs-ndm.node-exporter.fullname" . }} | ||
image: "{{ .Values.ndmExporter.image.registry }}{{ .Values.ndmExporter.image.repository }}:{{ .Values.ndmExporter.image.tag }}" | ||
command: | ||
- /usr/local/bin/exporter | ||
args: | ||
- "start" | ||
- "--mode=node" | ||
- "--port=$(METRICS_LISTEN_PORT)" | ||
- "--metrics=/metrics" | ||
ports: | ||
- containerPort: {{ .Values.ndmExporter.nodeExporter.metricsPort }} | ||
protocol: TCP | ||
name: metrics | ||
imagePullPolicy: {{ .Values.ndmExporter.image.pullPolicy }} | ||
securityContext: | ||
privileged: true | ||
env: | ||
- name: NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
{{- if .Values.ndmExporter.nodeExporter.metricsPort }} | ||
- name: METRICS_LISTEN_PORT | ||
value: :{{ .Values.ndmExporter.nodeExporter.metricsPort }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.