fix(prometheus): migrate away services
This commit is contained in:
@@ -20,7 +20,7 @@ sources:
|
|||||||
- https://github.com/prometheus-community/helm-charts
|
- https://github.com/prometheus-community/helm-charts
|
||||||
- https://github.com/prometheus-operator/kube-prometheus
|
- https://github.com/prometheus-operator/kube-prometheus
|
||||||
type: application
|
type: application
|
||||||
version: 0.0.4
|
version: 0.0.5
|
||||||
annotations:
|
annotations:
|
||||||
truecharts.org/catagories: |
|
truecharts.org/catagories: |
|
||||||
- metrics
|
- metrics
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
{{- if .Values.alertmanager.enabled }}
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: {{ template "kube-prometheus.alertmanager.fullname" . }}
|
|
||||||
namespace: {{ .Release.Namespace }}
|
|
||||||
labels: {{- include "kube-prometheus.alertmanager.labels" . | nindent 4 }}
|
|
||||||
{{- with .Values.alertmanager.service.annotations }}
|
|
||||||
annotations: {{- toYaml . | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
|
||||||
type: {{ .Values.alertmanager.service.type }}
|
|
||||||
{{- if index .Values.alertmanager "stickySessions" }}
|
|
||||||
sessionAffinity: ClientIP
|
|
||||||
{{- end }}
|
|
||||||
{{- if and .Values.alertmanager.service.loadBalancerIP (eq .Values.alertmanager.service.type "LoadBalancer") }}
|
|
||||||
loadBalancerIP: {{ .Values.alertmanager.service.loadBalancerIP }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if and (eq .Values.alertmanager.service.type "LoadBalancer") .Values.alertmanager.service.loadBalancerSourceRanges }}
|
|
||||||
{{- with .Values.alertmanager.service.loadBalancerSourceRanges }}
|
|
||||||
loadBalancerSourceRanges: {{- toYaml . | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if and (eq .Values.alertmanager.service.type "LoadBalancer") .Values.alertmanager.service.externalTrafficPolicy }}
|
|
||||||
externalTrafficPolicy: {{ .Values.alertmanager.service.externalTrafficPolicy }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if and (eq .Values.alertmanager.service.type "LoadBalancer") (eq .Values.alertmanager.service.externalTrafficPolicy "Local") .Values.alertmanager.service.healthCheckNodePort }}
|
|
||||||
healthCheckNodePort: {{ .Values.alertmanager.service.healthCheckNodePort }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if and (eq .Values.alertmanager.service.type "ClusterIP") .Values.alertmanager.service.clusterIP }}
|
|
||||||
clusterIP: {{ .Values.alertmanager.service.clusterIP }}
|
|
||||||
{{- end }}
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: {{ .Values.alertmanager.service.port }}
|
|
||||||
targetPort: 9093
|
|
||||||
{{- if and .Values.alertmanager.service.nodePort (or (eq .Values.alertmanager.service.type "NodePort") (eq .Values.alertmanager.service.type "LoadBalancer")) }}
|
|
||||||
nodePort: {{ .Values.alertmanager.service.nodePort }}
|
|
||||||
{{- end }}
|
|
||||||
selector:
|
|
||||||
app.kubernetes.io/name: alertmanager
|
|
||||||
alertmanager: {{ template "kube-prometheus.alertmanager.fullname" . }}
|
|
||||||
{{- end }}
|
|
||||||
@@ -9,7 +9,6 @@
|
|||||||
{{- include "prometheus.prometheus.prometheus" . }}
|
{{- include "prometheus.prometheus.prometheus" . }}
|
||||||
{{- include "prometheus.prometheus.additionalprometheusrules" . }}
|
{{- include "prometheus.prometheus.additionalprometheusrules" . }}
|
||||||
{{- include "prometheus.prometheus.additionalscrapejobs" . }}
|
{{- include "prometheus.prometheus.additionalscrapejobs" . }}
|
||||||
{{- include "prometheus.prometheus.thanos.service" . }}
|
|
||||||
{{- include "prometheus.prometheus.servicemonitor" . }}
|
{{- include "prometheus.prometheus.servicemonitor" . }}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ spec:
|
|||||||
resources: {{- toYaml .Values.prometheus.thanos.resources | nindent 8 }}
|
resources: {{- toYaml .Values.prometheus.thanos.resources | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
- name: grpc
|
- name: thanos
|
||||||
containerPort: 10901
|
containerPort: 10901
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
- name: http
|
- name: http
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
{{- define "prometheus.prometheus.thanos.service" -}}
|
|
||||||
{{- if and .Values.prometheus.enabled .Values.prometheus.thanos.create }}
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: {{ template "kube-prometheus.prometheus.fullname" . }}-thanos
|
|
||||||
namespace: {{ .Release.Namespace }}
|
|
||||||
labels: {{- include "kube-prometheus.prometheus.labels" . | nindent 4 }}
|
|
||||||
app.kubernetes.io/subcomponent: thanos
|
|
||||||
{{- if .Values.prometheus.thanos.service.annotations }}
|
|
||||||
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.prometheus.thanos.service.annotations "context" $) | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
|
||||||
type: {{ .Values.prometheus.thanos.service.type }}
|
|
||||||
{{- if and .Values.prometheus.thanos.service.loadBalancerIP (eq .Values.prometheus.thanos.service.type "LoadBalancer") }}
|
|
||||||
loadBalancerIP: {{ .Values.prometheus.thanos.service.loadBalancerIP }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if and (eq .Values.prometheus.thanos.service.type "LoadBalancer") .Values.prometheus.thanos.service.loadBalancerSourceRanges }}
|
|
||||||
{{- with .Values.prometheus.thanos.service.loadBalancerSourceRanges }}
|
|
||||||
loadBalancerSourceRanges: {{- toYaml . | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if and (eq .Values.prometheus.thanos.service.type "ClusterIP") .Values.prometheus.thanos.service.clusterIP }}
|
|
||||||
clusterIP: {{ .Values.prometheus.thanos.service.clusterIP }}
|
|
||||||
{{- end }}
|
|
||||||
ports:
|
|
||||||
- name: grpc
|
|
||||||
port: {{ .Values.prometheus.thanos.service.port }}
|
|
||||||
targetPort: grpc
|
|
||||||
protocol: TCP
|
|
||||||
{{- if and .Values.prometheus.thanos.service.nodePort (or (eq .Values.prometheus.thanos.service.type "NodePort") (eq .Values.prometheus.thanos.service.type "LoadBalancer")) }}
|
|
||||||
nodePort: {{ .Values.prometheus.thanos.service.nodePort }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.prometheus.thanos.service.extraPorts }}
|
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.prometheus.thanos.service.extraPorts "context" $) | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
selector:
|
|
||||||
app.kubernetes.io/name: prometheus
|
|
||||||
prometheus: {{ template "kube-prometheus.prometheus.fullname" . }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
@@ -1164,7 +1164,7 @@ alertmanager:
|
|||||||
routePrefix: /
|
routePrefix: /
|
||||||
## @param alertmanager.portName Port name used for the pods and governing service. This defaults to web
|
## @param alertmanager.portName Port name used for the pods and governing service. This defaults to web
|
||||||
##
|
##
|
||||||
portName: web
|
portName: alertmanager
|
||||||
## @param alertmanager.configNamespaceSelector AlertmanagerConfigs to be selected for to merge and configure Alertmanager with. This defaults to {}
|
## @param alertmanager.configNamespaceSelector AlertmanagerConfigs to be selected for to merge and configure Alertmanager with. This defaults to {}
|
||||||
##
|
##
|
||||||
configNamespaceSelector: {}
|
configNamespaceSelector: {}
|
||||||
|
|||||||
Reference in New Issue
Block a user