-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor helm configuration(values.yaml) (#58)
* Update helm configurations and template yamls * Updated directory name and readme * Updated values.yaml * chart version bumped Signed-off-by: Sahil Raja <[email protected]>
- Loading branch information
Showing
15 changed files
with
514 additions
and
519 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
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
22 changes: 12 additions & 10 deletions
22
deploy/charts/openebs-monitoring/templates/podmonitors.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 |
---|---|---|
@@ -1,27 +1,29 @@ | ||
{{- if .Values.podMonitors }} | ||
{{- range $openebsEngine, $fields := .Values.podMonitors }} | ||
{{- range $monitoringAddon, $fields := .Values.openebsMonitoringAddon }} | ||
{{- if (and (hasKey $fields "enabled") ($fields.enabled)) }} | ||
{{- if (hasKey $fields "podMonitor") }} | ||
{{- if ($fields.podMonitor.enabled) }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PodMonitor | ||
metadata: | ||
name: {{ lower (printf "%s-%s" (include "openebs-monitoring.fullname" $) $openebsEngine) | trunc 63 | trimSuffix "-" }} | ||
name: {{ lower (printf "%s-%s" (include "openebs-monitoring.fullname" $) $monitoringAddon) | trunc 63 | trimSuffix "-" }} | ||
namespace: {{ template "openebs-monitoring.namespace" $ }} | ||
labels: | ||
app: {{ template "openebs-monitoring.name" $ }}-{{ $openebsEngine }} | ||
app: {{ template "openebs-monitoring.name" $ }}-{{ $monitoringAddon }} | ||
{{ include "openebs-monitoring.labels" $ | indent 4 }} | ||
spec: | ||
selector: | ||
{{ toYaml $fields.selector | indent 4 }} | ||
{{ toYaml $fields.podMonitor.selector | indent 4 }} | ||
namespaceSelector: | ||
{{ toYaml $fields.namespaceSelector | indent 4 }} | ||
{{ toYaml $fields.podMonitor.namespaceSelector | indent 4 }} | ||
podMetricsEndpoints: | ||
- targetPort: {{ $fields.podMetricsEndpoints.targetPort }} | ||
path: {{ $fields.podMetricsEndpoints.path }} | ||
{{- if $fields.podMetricsEndpoints.relabelings }} | ||
- targetPort: {{ $fields.podMonitor.podMetricsEndpoints.targetPort }} | ||
path: {{ $fields.podMonitor.podMetricsEndpoints.path }} | ||
{{- if $fields.podMonitor.podMetricsEndpoints.relabelings }} | ||
relabelings: | ||
{{ toYaml $fields.podMetricsEndpoints.relabelings | indent 8 }} | ||
{{ toYaml $fields.podMonitor.podMetricsEndpoints.relabelings | indent 8 }} | ||
{{- end }} | ||
--- | ||
{{- end }} | ||
{{- end }} | ||
{{- 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
22 changes: 12 additions & 10 deletions
22
deploy/charts/openebs-monitoring/templates/servicemonitors.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 |
---|---|---|
@@ -1,27 +1,29 @@ | ||
{{- if .Values.serviceMonitors }} | ||
{{- range $openebsEngine, $fields := .Values.serviceMonitors }} | ||
{{- range $monitoringAddon, $fields := .Values.openebsMonitoringAddon }} | ||
{{- if (and (hasKey $fields "enabled") ($fields.enabled)) }} | ||
{{- if (hasKey $fields "serviceMonitor") }} | ||
{{- if ($fields.serviceMonitor.enabled) }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: {{ lower (printf "%s-%s" (include "openebs-monitoring.fullname" $) $openebsEngine) | trunc 63 | trimSuffix "-" }} | ||
name: {{ lower (printf "%s-%s" (include "openebs-monitoring.fullname" $) $monitoringAddon) | trunc 63 | trimSuffix "-" }} | ||
namespace: {{ template "openebs-monitoring.namespace" $ }} | ||
labels: | ||
app: {{ template "openebs-monitoring.name" $ }}-{{ $openebsEngine }} | ||
app: {{ template "openebs-monitoring.name" $ }}-{{ $monitoringAddon }} | ||
{{ include "openebs-monitoring.labels" $ | indent 4 }} | ||
spec: | ||
selector: | ||
{{ toYaml $fields.selector | indent 4 }} | ||
{{ toYaml $fields.serviceMonitor.selector | indent 4 }} | ||
namespaceSelector: | ||
{{ toYaml $fields.namespaceSelector | indent 4 }} | ||
{{ toYaml $fields.serviceMonitor.namespaceSelector | indent 4 }} | ||
endpoints: | ||
- port: {{ $fields.endpoints.port }} | ||
path: {{ $fields.endpoints.path }} | ||
{{- if $fields.endpoints.relabelings }} | ||
- port: {{ $fields.serviceMonitor.endpoints.port }} | ||
path: {{ $fields.serviceMonitor.endpoints.path }} | ||
{{- if $fields.serviceMonitor.endpoints.relabelings }} | ||
relabelings: | ||
{{ toYaml $fields.endpoints.relabelings | indent 8 }} | ||
{{ toYaml $fields.serviceMonitor.endpoints.relabelings | indent 8 }} | ||
{{- end }} | ||
--- | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
Oops, something went wrong.