diff --git a/stable/prometheus-operator/Chart.yaml b/stable/prometheus-operator/Chart.yaml index f644795132..8a1926f65b 100644 --- a/stable/prometheus-operator/Chart.yaml +++ b/stable/prometheus-operator/Chart.yaml @@ -10,7 +10,7 @@ name: prometheus-operator sources: - https://github.com/coreos/prometheus-operator - https://coreos.com/operators/prometheus -version: 7.0.0 +version: 7.1.0 appVersion: 0.32.0 tillerVersion: ">=2.12.0" home: https://github.com/coreos/prometheus-operator diff --git a/stable/prometheus-operator/README.md b/stable/prometheus-operator/README.md index 33df8ddc6f..14f8ce77d0 100644 --- a/stable/prometheus-operator/README.md +++ b/stable/prometheus-operator/README.md @@ -298,6 +298,7 @@ The following tables list the configurable parameters of the prometheus-operator | `prometheus.service.loadBalancerIP` | Prometheus Loadbalancer IP | `""` | | `prometheus.service.loadBalancerSourceRanges` | Prometheus Load Balancer Source Ranges | `[]` | | `prometheus.service.nodePort` | Prometheus Service port for NodePort service type | `30090` | +| `prometheus.service.port` | Port for Prometheus Service to listen on | `9090` | | `prometheus.service.sessionAffinity` | Prometheus Service Session Affinity | `""` | | `prometheus.service.targetPort` | Prometheus Service internal port | `9090` | | `prometheus.service.type` | Prometheus Service type | `ClusterIP` | @@ -312,7 +313,8 @@ The following tables list the configurable parameters of the prometheus-operator | `prometheus.servicePerReplica.enabled` | If true, create a Service for each Prometheus server replica in the StatefulSet | `false` | | `prometheus.servicePerReplica.labels` | Prometheus per replica Service Labels | `{}` | | `prometheus.servicePerReplica.loadBalancerSourceRanges` | Prometheus per replica Service Loadbalancer Source Ranges | `[]` | -| `prometheus.servicePerReplica.nodePort` | Prometheus per replica service port for NodePort Service type | `30091` | +| `prometheus.servicePerReplica.nodePort` | Prometheus per replica Service port for NodePort Service type | `30091` | +| `prometheus.servicePerReplica.port` | Port for Prometheus per replica Service to listen on | `9090` | | `prometheus.servicePerReplica.targetPort` | Prometheus per replica Service internal port | `9090` | | `prometheus.servicePerReplica.type` | Prometheus per replica Service type | `ClusterIP` | @@ -363,6 +365,7 @@ The following tables list the configurable parameters of the prometheus-operator | `alertmanager.service.loadBalancerIP` | Alertmanager Loadbalancer IP | `""` | | `alertmanager.service.loadBalancerSourceRanges` | Alertmanager Load Balancer Source Ranges | `[]` | | `alertmanager.service.nodePort` | Alertmanager Service port for NodePort service type | `30903` | +| `alertmanager.service.port` | Port for Alertmanager Service to listen on | `9093` | | `alertmanager.service.type` | Alertmanager Service type | `ClusterIP` | | `alertmanager.serviceAccount.create` | Create a `serviceAccount` for alertmanager | `true` | | `alertmanager.serviceAccount.name` | Name for Alertmanager service account | `""` | diff --git a/stable/prometheus-operator/templates/alertmanager/alertmanager.yaml b/stable/prometheus-operator/templates/alertmanager/alertmanager.yaml index b7ef3d32b8..917528224d 100644 --- a/stable/prometheus-operator/templates/alertmanager/alertmanager.yaml +++ b/stable/prometheus-operator/templates/alertmanager/alertmanager.yaml @@ -20,7 +20,7 @@ spec: {{- else if and .Values.alertmanager.ingress.enabled .Values.alertmanager.ingress.hosts }} externalUrl: "http://{{ index .Values.alertmanager.ingress.hosts 0 }}{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}" {{- else }} - externalUrl: http://{{ template "prometheus-operator.fullname" . }}-alertmanager.{{ .Release.Namespace }}:9093 + externalUrl: http://{{ template "prometheus-operator.fullname" . }}-alertmanager.{{ .Release.Namespace }}:{{ .Values.alertmanager.service.port }} {{- end }} {{- if .Values.alertmanager.alertmanagerSpec.nodeSelector }} nodeSelector: diff --git a/stable/prometheus-operator/templates/alertmanager/ingress.yaml b/stable/prometheus-operator/templates/alertmanager/ingress.yaml index 333c83b157..e20ceef2c3 100644 --- a/stable/prometheus-operator/templates/alertmanager/ingress.yaml +++ b/stable/prometheus-operator/templates/alertmanager/ingress.yaml @@ -1,6 +1,6 @@ {{- if and .Values.alertmanager.enabled .Values.alertmanager.ingress.enabled }} {{- $serviceName := printf "%s-%s" (include "prometheus-operator.fullname" .) "alertmanager" }} -{{- $servicePort := 9093 -}} +{{- $servicePort := .Values.alertmanager.service.port -}} {{- $routePrefix := list .Values.alertmanager.alertmanagerSpec.routePrefix }} {{- $paths := .Values.alertmanager.ingress.paths | default $routePrefix -}} apiVersion: extensions/v1beta1 diff --git a/stable/prometheus-operator/templates/alertmanager/service.yaml b/stable/prometheus-operator/templates/alertmanager/service.yaml index b48a7787ae..dee4b73fb4 100644 --- a/stable/prometheus-operator/templates/alertmanager/service.yaml +++ b/stable/prometheus-operator/templates/alertmanager/service.yaml @@ -33,7 +33,7 @@ spec: {{- if eq .Values.alertmanager.service.type "NodePort" }} nodePort: {{ .Values.alertmanager.service.nodePort }} {{- end }} - port: 9093 + port: {{ .Values.alertmanager.service.port }} targetPort: 9093 protocol: TCP selector: diff --git a/stable/prometheus-operator/templates/grafana/configmaps-datasources.yaml b/stable/prometheus-operator/templates/grafana/configmaps-datasources.yaml index ecc4775ea3..eafbe54d9b 100644 --- a/stable/prometheus-operator/templates/grafana/configmaps-datasources.yaml +++ b/stable/prometheus-operator/templates/grafana/configmaps-datasources.yaml @@ -15,7 +15,7 @@ data: {{- if .Values.grafana.sidecar.datasources.defaultDatasourceEnabled }} - name: Prometheus type: prometheus - url: http://{{ template "prometheus-operator.fullname" . }}-prometheus:9090/{{ trimPrefix "/" .Values.prometheus.prometheusSpec.routePrefix }} + url: http://{{ template "prometheus-operator.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}/{{ trimPrefix "/" .Values.prometheus.prometheusSpec.routePrefix }} access: proxy isDefault: true {{- if .Values.grafana.sidecar.datasources.createPrometheusReplicasDatasources }} diff --git a/stable/prometheus-operator/templates/prometheus/ingress.yaml b/stable/prometheus-operator/templates/prometheus/ingress.yaml index dca48b52e2..c52669a1f0 100644 --- a/stable/prometheus-operator/templates/prometheus/ingress.yaml +++ b/stable/prometheus-operator/templates/prometheus/ingress.yaml @@ -1,6 +1,6 @@ {{- if and .Values.prometheus.enabled .Values.prometheus.ingress.enabled }} {{- $serviceName := printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus" }} -{{- $servicePort := 9090 -}} +{{- $servicePort := .Values.prometheus.service.port -}} {{- $routePrefix := list .Values.prometheus.prometheusSpec.routePrefix }} {{- $paths := .Values.prometheus.ingress.paths | default $routePrefix -}} apiVersion: extensions/v1beta1 diff --git a/stable/prometheus-operator/templates/prometheus/ingressperreplica.yaml b/stable/prometheus-operator/templates/prometheus/ingressperreplica.yaml index 680ab177d7..be9639b9a7 100644 --- a/stable/prometheus-operator/templates/prometheus/ingressperreplica.yaml +++ b/stable/prometheus-operator/templates/prometheus/ingressperreplica.yaml @@ -1,6 +1,6 @@ {{- if and .Values.prometheus.enabled .Values.prometheus.servicePerReplica.enabled .Values.prometheus.ingressPerReplica.enabled }} {{- $count := .Values.prometheus.prometheusSpec.replicas | int -}} -{{- $servicePort := 9090 -}} +{{- $servicePort := .Values.prometheus.service.port -}} {{- $ingressValues := .Values.prometheus.ingressPerReplica -}} apiVersion: extensions/v1beta1 kind: IngressList diff --git a/stable/prometheus-operator/templates/prometheus/prometheus.yaml b/stable/prometheus-operator/templates/prometheus/prometheus.yaml index cbfd98526a..40a35b4858 100644 --- a/stable/prometheus-operator/templates/prometheus/prometheus.yaml +++ b/stable/prometheus-operator/templates/prometheus/prometheus.yaml @@ -49,7 +49,7 @@ spec: {{- else if and .Values.prometheus.ingress.enabled .Values.prometheus.ingress.hosts }} externalUrl: "http://{{ index .Values.prometheus.ingress.hosts 0 }}{{ .Values.prometheus.prometheusSpec.routePrefix }}" {{- else }} - externalUrl: http://{{ template "prometheus-operator.fullname" . }}-prometheus.{{ .Release.Namespace }}:9090 + externalUrl: http://{{ template "prometheus-operator.fullname" . }}-prometheus.{{ .Release.Namespace }}:{{ .Values.prometheus.service.port }} {{- end }} {{- if .Values.prometheus.prometheusSpec.nodeSelector }} nodeSelector: diff --git a/stable/prometheus-operator/templates/prometheus/service.yaml b/stable/prometheus-operator/templates/prometheus/service.yaml index ce9766912d..7a7752055e 100644 --- a/stable/prometheus-operator/templates/prometheus/service.yaml +++ b/stable/prometheus-operator/templates/prometheus/service.yaml @@ -34,7 +34,7 @@ spec: {{- if eq .Values.prometheus.service.type "NodePort" }} nodePort: {{ .Values.prometheus.service.nodePort }} {{- end }} - port: 9090 + port: {{ .Values.prometheus.service.port }} targetPort: {{ .Values.prometheus.service.targetPort }} {{- if .Values.prometheus.service.additionalPorts }} {{ toYaml .Values.prometheus.service.additionalPorts | indent 2 }} diff --git a/stable/prometheus-operator/templates/prometheus/serviceperreplica.yaml b/stable/prometheus-operator/templates/prometheus/serviceperreplica.yaml index 57ca60b9a4..24a6379d6d 100644 --- a/stable/prometheus-operator/templates/prometheus/serviceperreplica.yaml +++ b/stable/prometheus-operator/templates/prometheus/serviceperreplica.yaml @@ -35,7 +35,7 @@ items: {{- if eq $serviceValues.type "NodePort" }} nodePort: {{ $serviceValues.nodePort }} {{- end }} - port: 9090 + port: {{ $serviceValues.port }} targetPort: {{ $serviceValues.targetPort }} selector: app: prometheus diff --git a/stable/prometheus-operator/values.yaml b/stable/prometheus-operator/values.yaml index 37504bacfd..d585a519ac 100644 --- a/stable/prometheus-operator/values.yaml +++ b/stable/prometheus-operator/values.yaml @@ -182,13 +182,16 @@ alertmanager: labels: {} clusterIP: "" - ## Port to expose on each node - ## Only used if service.type is 'NodePort' - ## + ## Port for Alertmanager Service to listen on + ## + port: 9093 + ## Port to expose on each node + ## Only used if service.type is 'NodePort' + ## nodePort: 30903 - ## List of IP addresses at which the Prometheus server service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## + ## List of IP addresses at which the Prometheus server service is available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## externalIPs: [] loadBalancerIP: "" loadBalancerSourceRanges: [] @@ -1182,6 +1185,9 @@ prometheus: labels: {} clusterIP: "" + ## Port for Prometheus Service to listen on + ## + port: 9090 ## To be used with a proxy extraContainer port targetPort: 9090 @@ -1212,6 +1218,10 @@ prometheus: enabled: false annotations: {} + ## Port for Prometheus Service per replica to listen on + ## + port: 9090 + ## To be used with a proxy extraContainer port targetPort: 9090