Skip to content

Commit

Permalink
[stable/prometheus] gRPC port on headless svc (helm#22784)
Browse files Browse the repository at this point in the history
* [stable/prometheus] gRPC port on headless svc

Signed-off-by: Carlos Juan Gómez Peñalver <carlosjuangp@gmail.com>

* [stable/prometheus] Add new variables to docs

Signed-off-by: Carlos Juan Gómez Peñalver <carlosjuangp@gmail.com>
Signed-off-by: Adrien Loiseau <adrien.loiseau@logic-immo.com>
  • Loading branch information
carlosjgp authored and li-adrienloiseau committed Jul 29, 2020
1 parent 40f029d commit 701ef9a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/prometheus/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: prometheus
version: 11.4.0
version: 11.5.0
appVersion: 2.18.1
description: Prometheus is a monitoring system and time series database.
home: https://prometheus.io/
Expand Down
3 changes: 3 additions & 0 deletions stable/prometheus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ Parameter | Description | Default
`server.statefulSet.headless.annotations` | annotations for Prometheus server headless service | `{}`
`server.statefulSet.headless.labels` | labels for Prometheus server headless service | `{}`
`server.statefulSet.headless.servicePort` | Prometheus server headless service port | `80`
`server.statefulSet.headless.gRPC.enabled` | If true, open a second port on the service for gRPC | `false`
`server.statefulSet.headless.gRPC.servicePort` | Prometheus service gRPC port, (ignored if `server.service.gRPC.enabled` is not `true`) | `10901`
`server.statefulSet.headless.gRPC.nodePort` | Port to be used as gRPC nodePort in the prometheus service | `0`
`server.resources` | Prometheus server resource requests and limits | `{}`
`server.verticalAutoscaler.enabled` | If true a VPA object will be created for the controller (either StatefulSet or Deployemnt, based on above configs) | `false`
`server.securityContext` | Custom [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for server containers | `{}`
Expand Down
10 changes: 10 additions & 0 deletions stable/prometheus/templates/server-service-headless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ spec:
port: {{ .Values.server.statefulSet.headless.servicePort }}
protocol: TCP
targetPort: 9090
{{- if .Values.server.statefulSet.headless.gRPC.enabled }}
- name: grpc
port: {{ .Values.server.statefulSet.headless.gRPC.servicePort }}
protocol: TCP
targetPort: 10901
{{- if .Values.server.statefulSet.headless.gRPC.nodePort }}
nodePort: {{ .Values.server.statefulSet.headless.gRPC.nodePort }}
{{- end }}
{{- end }}

selector:
{{- include "prometheus.server.matchLabels" . | nindent 4 }}
{{- end -}}
Expand Down
5 changes: 5 additions & 0 deletions stable/prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,11 @@ server:
annotations: {}
labels: {}
servicePort: 80
## Enable gRPC port on service to allow auto discovery with thanos-querier
gRPC:
enabled: false
servicePort: 10901
# nodePort: 10901

## Prometheus server readiness and liveness probe initial delay and timeout
## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
Expand Down

0 comments on commit 701ef9a

Please sign in to comment.