Skip to content

Commit

Permalink
[stable/prometheus] gRPC port on prometheus service (helm#21002)
Browse files Browse the repository at this point in the history
* add grpc service port to service template

Signed-off-by: Simone Lamberti <simone.lamberti@native-instruments.de>

* update readme with grpc values

Signed-off-by: Simone Lamberti <simone.lamberti@native-instruments.de>

* bump chart version

Signed-off-by: Simone Lamberti <simone.lamberti@native-instruments.de>
  • Loading branch information
ni-slamberti authored Feb 26, 2020
1 parent 6d2fc82 commit 6a62fe5
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: 10.5.1
version: 10.5.2
appVersion: 2.16.0
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 @@ -358,6 +358,9 @@ Parameter | Description | Default
`server.service.servicePort` | Prometheus server service port | `80`
`server.service.sessionAffinity` | Session Affinity for server service, can be `None` or `ClientIP` | `None`
`server.service.type` | type of Prometheus server service to create | `ClusterIP`
`server.service.gRPC.enabled` | If true, open a second port on the service for gRPC | `false`
`server.service.gRPC.servicePort` | Prometheus service gRPC port, (ignored if `server.service.gRPC.enabled` is not `true`) | `10901`
`server.service.gRPC.nodePort` | Port to be used as gRPC nodePort in the prometheus service | `0`
`server.service.statefulsetReplica.enabled` | If true, send the traffic from the service to only one replica of the replicaset | `false`
`server.service.statefulsetReplica.replica` | Which replica to send the traffice to | `0`
`server.sidecarContainers` | array of snippets with your sidecar containers for prometheus server | `""`
Expand Down
9 changes: 9 additions & 0 deletions stable/prometheus/templates/server-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ spec:
{{- if .Values.server.service.nodePort }}
nodePort: {{ .Values.server.service.nodePort }}
{{- end }}
{{- if .Values.server.service.gRPC.enabled }}
- name: grpc
port: {{ .Values.server.service.gRPC.servicePort }}
protocol: TCP
targetPort: 10901
{{- if .Values.server.service.gRPC.nodePort }}
nodePort: {{ .Values.server.service.gRPC.nodePort }}
{{- end }}
{{- end }}
selector:
{{- if and .Values.server.statefulSet.enabled .Values.server.service.statefulsetReplica.enabled }}
statefulset.kubernetes.io/pod-name: {{ .Release.Name }}-{{ .Values.server.name }}-{{ .Values.server.service.statefulsetReplica.replica }}
Expand Down
6 changes: 6 additions & 0 deletions stable/prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,12 @@ server:
sessionAffinity: None
type: ClusterIP

## Enable gRPC port on service to allow auto discovery with thanos-querier
gRPC:
enabled: false
servicePort: 10901
# nodePort: 10901

## If using a statefulSet (statefulSet.enabled=true), configure the
## service to connect to a specific replica to have a consistent view
## of the data.
Expand Down

0 comments on commit 6a62fe5

Please sign in to comment.