mirror of
https://github.com/pgsty/minio.git
synced 2026-11-25 08:39:19 +03:00
2b96153a61
* Support releasing on “chart-<version>” tags, fixes #223 * Add commonLabels that are used on all resources * Support templated values in numerous locations * Add oidc.existingConfigMapName and oidc.existingConfigUrlKey * Add networkPolicy.allowFrom * support targetLabels on ServiceMonitor * Support Probe relabelingConfigs * Allow postJob default containerSecurityContext * Allow policies to be templated string * Set MINIO_BROWSER_REDIRECT_URL * Ensure job egress only enabled when networkPolicy.egress.enabled set Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
124 lines
4.0 KiB
YAML
124 lines
4.0 KiB
YAML
{{- if and .Values.metrics.serviceMonitor.enabled .Values.metrics.serviceMonitor.includeNode }}
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: {{ template "silo.fullname" . }}
|
|
{{- if .Values.metrics.serviceMonitor.namespace }}
|
|
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
|
|
{{- end }}
|
|
labels:
|
|
app: {{ template "silo.name" . }}
|
|
chart: {{ template "silo.chart" . }}
|
|
release: {{ .Release.Name }}
|
|
heritage: {{ .Release.Service }}
|
|
{{- with .Values.metrics.serviceMonitor.additionalLabels }}
|
|
{{- tpl (toYaml .) $ | nindent 4 }}
|
|
{{- end }}
|
|
{{- with .Values.commonLabels }}
|
|
{{- tpl (toYaml .) $ | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.metrics.serviceMonitor.annotations }}
|
|
annotations: {{- toYaml .Values.metrics.serviceMonitor.annotations | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
endpoints:
|
|
{{- if .Values.tls.enabled }}
|
|
- port: https
|
|
scheme: https
|
|
tlsConfig:
|
|
ca:
|
|
secret:
|
|
name: {{ .Values.tls.certSecret }}
|
|
key: {{ .Values.tls.publicCrt }}
|
|
serverName: {{ template "silo.fullname" . }}
|
|
{{- else }}
|
|
- port: http
|
|
scheme: http
|
|
{{- end }}
|
|
path: /minio/v2/metrics/node
|
|
{{- if .Values.metrics.serviceMonitor.interval }}
|
|
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
|
{{- end }}
|
|
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
|
|
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
|
{{- end }}
|
|
{{- with .Values.metrics.serviceMonitor.relabelConfigs }}
|
|
{{- tpl (toYaml .) $ | nindent 6 }}
|
|
{{- end }}
|
|
{{- if not .Values.metrics.serviceMonitor.public }}
|
|
bearerTokenSecret:
|
|
name: {{ template "silo.fullname" . }}-prometheus
|
|
key: token
|
|
{{- end }}
|
|
namespaceSelector:
|
|
matchNames:
|
|
- {{ .Release.Namespace | quote }}
|
|
selector:
|
|
matchLabels:
|
|
app: {{ include "silo.name" . }}
|
|
release: {{ .Release.Name }}
|
|
monitoring: "true"
|
|
{{- with .Values.metrics.serviceMonitor.targetLabels }}
|
|
targetLabels:
|
|
{{- tpl (toYaml .) $ | nindent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.metrics.serviceMonitor.enabled }}
|
|
---
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: Probe
|
|
metadata:
|
|
name: {{ template "silo.fullname" . }}-cluster
|
|
{{- if .Values.metrics.serviceMonitor.namespace }}
|
|
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
|
|
{{- end }}
|
|
labels:
|
|
app: {{ template "silo.name" . }}
|
|
chart: {{ template "silo.chart" . }}
|
|
release: {{ .Release.Name }}
|
|
heritage: {{ .Release.Service }}
|
|
{{- with .Values.metrics.serviceMonitor.additionalLabels }}
|
|
{{- tpl (toYaml .) $ | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
jobName: {{ template "silo.fullname" . }}
|
|
{{- if .Values.tls.enabled }}
|
|
tlsConfig:
|
|
ca:
|
|
secret:
|
|
name: {{ .Values.tls.certSecret }}
|
|
key: {{ .Values.tls.publicCrt }}
|
|
serverName: {{ template "silo.fullname" . }}
|
|
{{- end }}
|
|
prober:
|
|
url: {{ template "silo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.port }}
|
|
path: /minio/v2/metrics/cluster
|
|
{{- if .Values.tls.enabled }}
|
|
scheme: https
|
|
{{- else }}
|
|
scheme: http
|
|
{{- end }}
|
|
{{- with .Values.metrics.serviceMonitor.relabelConfigsCluster }}
|
|
{{- tpl (toYaml .) $ | nindent 2 }}
|
|
{{- end }}
|
|
targets:
|
|
staticConfig:
|
|
static:
|
|
- {{ template "silo.fullname" . }}.{{ .Release.Namespace }}
|
|
{{- with .Values.metrics.serviceMonitor.probeRelabelingConfigs }}
|
|
relabelingConfigs:
|
|
{{- tpl (toYaml .) $ | nindent 8 }}
|
|
{{- end }}
|
|
{{- if not .Values.metrics.serviceMonitor.public }}
|
|
{{- if .Values.metrics.serviceMonitor.interval }}
|
|
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
|
{{- end }}
|
|
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
|
|
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
|
{{- end }}
|
|
bearerTokenSecret:
|
|
name: {{ template "silo.fullname" . }}-prometheus
|
|
key: token
|
|
{{- end }}
|
|
{{- end }}
|