Skip to content

Commit

Permalink
Drop references to prometheus monitors for Metrics Server
Browse files Browse the repository at this point in the history
Signed-off-by: Rajat Vig <rvig@etsy.com>
  • Loading branch information
rajatvig committed Jun 30, 2023
1 parent b1ae25b commit 786427b
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 191 deletions.
20 changes: 0 additions & 20 deletions keda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,26 +170,6 @@ their default values.
| `podDisruptionBudget.metricServer` | object | `{}` | Capability to configure [Pod Disruption Budget] |
| `podLabels.metricsAdapter` | object | `{}` | Pod labels for KEDA Metrics Adapter |
| `podSecurityContext.metricServer` | object | [See below](#KEDA-is-secure-by-default) | [Pod security context] of the KEDA metrics apiserver pod |
| `prometheus.metricServer.enabled` | bool | `false` | Enable metric server Prometheus metrics expose |
| `prometheus.metricServer.podMonitor.additionalLabels` | object | `{}` | Additional labels to add for metric server using podMonitor crd (prometheus operator) |
| `prometheus.metricServer.podMonitor.enabled` | bool | `false` | Enables PodMonitor creation for the Prometheus Operator |
| `prometheus.metricServer.podMonitor.interval` | string | `""` | Scraping interval for metric server using podMonitor crd (prometheus operator) |
| `prometheus.metricServer.podMonitor.namespace` | string | `""` | Scraping namespace for metric server using podMonitor crd (prometheus operator) |
| `prometheus.metricServer.podMonitor.relabelings` | list | `[]` | List of expressions that define custom relabeling rules for metric server podMonitor crd (prometheus operator) |
| `prometheus.metricServer.podMonitor.scrapeTimeout` | string | `""` | Scraping timeout for metric server using podMonitor crd (prometheus operator) |
| `prometheus.metricServer.port` | int | `8080` | HTTP port used for exposing metrics server prometheus metrics |
| `prometheus.metricServer.portName` | string | `"metrics"` | HTTP port name for exposing metrics server prometheus metrics |
| `prometheus.metricServer.serviceMonitor.additionalLabels` | object | `{}` | Additional labels to add for metric server using ServiceMonitor crd (prometheus operator) |
| `prometheus.metricServer.serviceMonitor.enabled` | bool | `false` | Enables ServiceMonitor creation for the Prometheus Operator |
| `prometheus.metricServer.serviceMonitor.interval` | string | `""` | Interval at which metrics should be scraped If not specified Prometheus’ global scrape interval is used. |
| `prometheus.metricServer.serviceMonitor.jobLabel` | string | `""` | JobLabel selects the label from the associated Kubernetes service which will be used as the job label for all metrics. [ServiceMonitor Spec] |
| `prometheus.metricServer.serviceMonitor.podTargetLabels` | list | `[]` | PodTargetLabels transfers labels on the Kubernetes `Pod` onto the created metrics |
| `prometheus.metricServer.serviceMonitor.port` | string | `"metrics"` | Name of the service port this endpoint refers to. Mutually exclusive with targetPort |
| `prometheus.metricServer.serviceMonitor.relabelings` | list | `[]` | List of expressions that define custom relabeling rules for metric server ServiceMonitor crd (prometheus operator). [RelabelConfig Spec] |
| `prometheus.metricServer.serviceMonitor.relabellings` | list | `[]` | DEPRECATED. List of expressions that define custom relabeling rules for metric server ServiceMonitor crd (prometheus operator). [RelabelConfig Spec] |
| `prometheus.metricServer.serviceMonitor.scrapeTimeout` | string | `""` | Timeout after which the scrape is ended If not specified, the Prometheus global scrape timeout is used unless it is less than Interval in which the latter is used |
| `prometheus.metricServer.serviceMonitor.targetLabels` | list | `[]` | TargetLabels transfers labels from the Kubernetes `Service` onto the created metrics |
| `prometheus.metricServer.serviceMonitor.targetPort` | string | `""` | Name or number of the target port of the Pod behind the Service, the port must be specified with container port property. Mutually exclusive with port |
| `resources.metricServer` | object | `{"limits":{"cpu":1,"memory":"1000Mi"},"requests":{"cpu":"100m","memory":"100Mi"}}` | Manage [resource request & limits] of KEDA metrics apiserver pod |
| `securityContext.metricServer` | object | [See below](#KEDA-is-secure-by-default) | [Security context] of the metricServer container |
| `service.annotations` | object | `{}` | Annotations to add the KEDA Metric Server service |
Expand Down
3 changes: 0 additions & 3 deletions keda/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ Get an overview of the Horizontal Pod Autoscalers (HPA) that KEDA is using behin
WARNING - prometheus.operator.serviceMonitor.relabellings is deprecated, please migrate to prometheus.operator.serviceMonitor.relabelings instead.
-------------------------------------------------------------------------------------
{{- end }}
{{- if .Values.prometheus.metricServer.serviceMonitor.relabellings}}
WARNING - prometheus.metricServer.serviceMonitor.relabellings is deprecated, please migrate to prometheus.metricServer.serviceMonitor.relabelings instead.
{{- end }}
{{- if .Values.prometheus.webhooks.serviceMonitor.relabellings}}
-------------------------------------------------------------------------------------
WARNING - prometheus.webhooks.serviceMonitor.relabellings is deprecated, please migrate to prometheus.webhooks.serviceMonitor.relabelings instead.
Expand Down
16 changes: 2 additions & 14 deletions keda/templates/metrics-server/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,11 @@ spec:
{{- if .Values.podIdentity.azureWorkload.enabled }}
azure.workload.identity/use: "true"
{{- end }}
{{- if or .Values.additionalAnnotations .Values.podAnnotations.metricsAdapter (and .Values.prometheus.metricServer.enabled ( not (or .Values.prometheus.metricServer.podMonitor.enabled .Values.prometheus.metricServer.serviceMonitor.enabled )) )}}
{{- if .Values.additionalAnnotations }}
annotations:
{{- if .Values.additionalAnnotations }}
{{- toYaml .Values.additionalAnnotations | nindent 8 }}
{{- end }}
{{- if and .Values.prometheus.metricServer.enabled ( not (or .Values.prometheus.metricServer.podMonitor.enabled .Values.prometheus.metricServer.serviceMonitor.enabled )) }}
prometheus.io/scrape: "true"
prometheus.io/port: {{ .Values.prometheus.metricServer.port | quote }}
prometheus.io/path: {{ .Values.prometheus.metricServer.path }}
{{- end }}
{{- if .Values.podAnnotations.metricsAdapter }}
{{- toYaml .Values.podAnnotations.metricsAdapter | nindent 8}}
{{- end }}
{{- end }}
{{- end }}
spec:
{{- if .Values.priorityClassName }}
Expand Down Expand Up @@ -111,7 +103,6 @@ spec:
{{- end }}
args:
- /usr/local/bin/keda-adapter
- --port={{ .Values.prometheus.metricServer.port }}
- --secure-port={{ .Values.service.portHttpsTarget }}
- --logtostderr=true
- --metrics-service-address={{ .Values.operator.name }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:9666
Expand All @@ -127,9 +118,6 @@ spec:
- containerPort: {{ .Values.service.portHttpsTarget }}
name: https
protocol: TCP
- containerPort: {{ .Values.prometheus.metricServer.port }}
name: {{ .Values.prometheus.metricServer.portName }}
protocol: TCP
volumeMounts:
- mountPath: {{ .Values.certificates.mountPath }}
name: certificates
Expand Down
39 changes: 0 additions & 39 deletions keda/templates/metrics-server/podmonitor.yaml

This file was deleted.

13 changes: 2 additions & 11 deletions keda/templates/metrics-server/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@ metadata:
{{- include "keda.labels" . | indent 4 }}
name: {{ .Values.operator.name }}-metrics-apiserver
namespace: {{ .Release.Namespace }}
{{- if or .Values.additionalAnnotations .Values.service.annotations (and .Values.prometheus.metricServer.enabled ( not (or .Values.prometheus.metricServer.podMonitor.enabled .Values.prometheus.metricServer.serviceMonitor.enabled )))}}
annotations:
{{- if and .Values.prometheus.metricServer.enabled ( not (or .Values.prometheus.metricServer.podMonitor.enabled .Values.prometheus.metricServer.serviceMonitor.enabled )) }}
prometheus.io/scrape: "true"
prometheus.io/port: {{ .Values.prometheus.metricServer.port | quote }}
prometheus.io/path: "/metrics"
{{- end }}
{{- if or .Values.additionalAnnotations .Values.service.annotations }}
annotations:
{{- with .Values.additionalAnnotations }}
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
Expand All @@ -31,9 +26,5 @@ spec:
port: {{ .Values.service.portHttps }}
targetPort: {{ .Values.service.portHttpsTarget }}
protocol: TCP
- name: {{ .Values.prometheus.metricServer.portName }}
port: {{ .Values.prometheus.metricServer.port }}
targetPort: {{ .Values.prometheus.metricServer.port }}
protocol: TCP
selector:
app: {{ .Values.operator.name }}-metrics-apiserver
60 changes: 0 additions & 60 deletions keda/templates/metrics-server/servicemonitor.yaml

This file was deleted.

45 changes: 1 addition & 44 deletions keda/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -443,50 +443,7 @@ volumes:
# -- Extra volume mounts for admission webhooks deployment
extraVolumeMounts: []

prometheus:
metricServer:
# -- Enable metric server Prometheus metrics expose
enabled: false
# -- HTTP port used for exposing metrics server prometheus metrics
port: 8080
# -- HTTP port name for exposing metrics server prometheus metrics
portName: metrics
serviceMonitor:
# -- Enables ServiceMonitor creation for the Prometheus Operator
enabled: false
# -- JobLabel selects the label from the associated Kubernetes service which will be used as the job label for all metrics. [ServiceMonitor Spec]
jobLabel: ""
# -- TargetLabels transfers labels from the Kubernetes `Service` onto the created metrics
targetLabels: []
# -- PodTargetLabels transfers labels on the Kubernetes `Pod` onto the created metrics
podTargetLabels: []
# -- Name of the service port this endpoint refers to. Mutually exclusive with targetPort
port: metrics
# -- Name or number of the target port of the Pod behind the Service, the port must be specified with container port property. Mutually exclusive with port
targetPort: ""
# -- Interval at which metrics should be scraped If not specified Prometheus’ global scrape interval is used.
interval: ""
# -- Timeout after which the scrape is ended If not specified, the Prometheus global scrape timeout is used unless it is less than Interval in which the latter is used
scrapeTimeout: ""
# -- DEPRECATED. List of expressions that define custom relabeling rules for metric server ServiceMonitor crd (prometheus operator). [RelabelConfig Spec]
relabellings: []
# -- List of expressions that define custom relabeling rules for metric server ServiceMonitor crd (prometheus operator). [RelabelConfig Spec]
relabelings: []
# -- Additional labels to add for metric server using ServiceMonitor crd (prometheus operator)
additionalLabels: {}
podMonitor:
# -- Enables PodMonitor creation for the Prometheus Operator
enabled: false
# -- Scraping interval for metric server using podMonitor crd (prometheus operator)
interval: ""
# -- Scraping timeout for metric server using podMonitor crd (prometheus operator)
scrapeTimeout: ""
# -- Scraping namespace for metric server using podMonitor crd (prometheus operator)
namespace: ""
# -- Additional labels to add for metric server using podMonitor crd (prometheus operator)
additionalLabels: {}
# -- List of expressions that define custom relabeling rules for metric server podMonitor crd (prometheus operator)
relabelings: []
prometheus:
operator:
# -- Enable KEDA Operator prometheus metrics expose
enabled: false
Expand Down

0 comments on commit 786427b

Please sign in to comment.