diff --git a/stable/prometheus-operator/Chart.yaml b/stable/prometheus-operator/Chart.yaml index 8cd16c3f5a..f9f306b1c6 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: 6.20.3 +version: 6.21.0 appVersion: 0.32.0 home: https://github.com/coreos/prometheus-operator keywords: diff --git a/stable/prometheus-operator/README.md b/stable/prometheus-operator/README.md index 65f53e1816..3609a8d7d1 100644 --- a/stable/prometheus-operator/README.md +++ b/stable/prometheus-operator/README.md @@ -454,6 +454,7 @@ For a full list of configurable values please refer to the [Grafana chart](https | `kubeEtcd.serviceMonitor.scheme` | Etcd servicemonitor scheme | `http` | | `kubeEtcd.serviceMonitor.serverName` | Etcd server name to validate certificate against when scraping | `""` | | `kubeProxy.enabled` | Deploy a `service` and `serviceMonitor` to scrape the Kubernetes proxy | `true` | +| `kubeProxy.endpoints` | Endpoints where proxy runs. Provide this if running proxy outside the cluster | `[]` | | `kubeProxy.service.port` | Kubernetes proxy port for the service runs on | `10249` | | `kubeProxy.service.selector` | Kubernetes proxy service selector | `{"k8s-app" : "kube-proxy" }` | | `kubeProxy.service.targetPort` | Kubernetes proxy targetPort for the service runs on | `10249` | diff --git a/stable/prometheus-operator/templates/exporters/kube-proxy/endpoints.yaml b/stable/prometheus-operator/templates/exporters/kube-proxy/endpoints.yaml new file mode 100644 index 0000000000..111cd6b31e --- /dev/null +++ b/stable/prometheus-operator/templates/exporters/kube-proxy/endpoints.yaml @@ -0,0 +1,21 @@ +{{- if and .Values.kubeProxy.enabled .Values.kubeProxy.endpoints }} +apiVersion: v1 +kind: Endpoints +metadata: + name: {{ template "prometheus-operator.fullname" . }}-kube-proxy + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-kube-proxy + k8s-app: kube-proxy +{{ include "prometheus-operator.labels" . | indent 4 }} + namespace: kube-system +subsets: + - addresses: + {{- range .Values.kubeProxy.endpoints }} + - ip: {{ . }} + {{- end }} + ports: + - name: http-metrics + port: {{ .Values.kubeProxy.service.port }} + protocol: TCP +{{- end }} diff --git a/stable/prometheus-operator/templates/exporters/kube-proxy/service.yaml b/stable/prometheus-operator/templates/exporters/kube-proxy/service.yaml index bfc577a054..5bcabfe038 100644 --- a/stable/prometheus-operator/templates/exporters/kube-proxy/service.yaml +++ b/stable/prometheus-operator/templates/exporters/kube-proxy/service.yaml @@ -16,7 +16,9 @@ spec: port: {{ .Values.kubeProxy.service.port }} protocol: TCP targetPort: {{ .Values.kubeProxy.service.targetPort }} +{{- if .Values.kubeProxy.endpoints }}{{- else }} selector: {{ include "prometheus-operator.rangeskipempty" .Values.kubeProxy.service.selector | indent 4 }} +{{- end }} type: ClusterIP {{- end -}} diff --git a/stable/prometheus-operator/values.yaml b/stable/prometheus-operator/values.yaml index 3d15ed2784..a5cf728ea1 100644 --- a/stable/prometheus-operator/values.yaml +++ b/stable/prometheus-operator/values.yaml @@ -817,6 +817,13 @@ kubeScheduler: kubeProxy: enabled: true + ## If your kube proxy is not deployed as a pod, specify IPs it can be found on + ## + endpoints: [] + # - 10.141.4.22 + # - 10.141.4.23 + # - 10.141.4.24 + service: port: 10249 targetPort: 10249