Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tlsConfig for ServiceMonitor #591

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions keda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,11 @@ their default values.
| `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.scheme` | string | `"http"` | HTTP scheme used for scraping. Defaults to `http` |
| `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 |
| `prometheus.metricServer.serviceMonitor.tlsConfig` | object | `{}` | TLS configuration for scraping metrics |
| `prometheus.operator.enabled` | bool | `false` | Enable KEDA Operator prometheus metrics expose |
| `prometheus.operator.podMonitor.additionalLabels` | object | `{}` | Additional labels to add for KEDA Operator using podMonitor crd (prometheus operator) |
| `prometheus.operator.podMonitor.enabled` | bool | `false` | Enables PodMonitor creation for the Prometheus Operator |
Expand All @@ -218,9 +220,11 @@ their default values.
| `prometheus.operator.serviceMonitor.port` | string | `"metrics"` | Name of the service port this endpoint refers to. Mutually exclusive with targetPort |
| `prometheus.operator.serviceMonitor.relabelings` | list | `[]` | List of expressions that define custom relabeling rules for metric server ServiceMonitor crd (prometheus operator). [RelabelConfig Spec] |
| `prometheus.operator.serviceMonitor.relabellings` | list | `[]` | DEPRECATED. List of expressions that define custom relabeling rules for metric server ServiceMonitor crd (prometheus operator). [RelabelConfig Spec] |
| `prometheus.operator.serviceMonitor.scheme` | string | `"http"` | HTTP scheme used for scraping. Defaults to `http` |
| `prometheus.operator.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.operator.serviceMonitor.targetLabels` | list | `[]` | TargetLabels transfers labels from the Kubernetes `Service` onto the created metrics |
| `prometheus.operator.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 |
| `prometheus.operator.serviceMonitor.tlsConfig` | object | `{}` | TLS configuration for scraping metrics |
| `prometheus.webhooks.enabled` | bool | `false` | Enable KEDA admission webhooks prometheus metrics expose |
| `prometheus.webhooks.port` | int | `8080` | Port used for exposing KEDA admission webhooks prometheus metrics |
| `prometheus.webhooks.prometheusRules.additionalLabels` | object | `{}` | Additional labels to add for KEDA admission webhooks using prometheusRules crd (prometheus operator) |
Expand All @@ -235,9 +239,11 @@ their default values.
| `prometheus.webhooks.serviceMonitor.port` | string | `"metrics"` | Name of the service port this endpoint refers to. Mutually exclusive with targetPort |
| `prometheus.webhooks.serviceMonitor.relabelings` | list | `[]` | List of expressions that define custom relabeling rules for metric server ServiceMonitor crd (prometheus operator). [RelabelConfig Spec] |
| `prometheus.webhooks.serviceMonitor.relabellings` | list | `[]` | DEPRECATED. List of expressions that define custom relabeling rules for metric server ServiceMonitor crd (prometheus operator). [RelabelConfig Spec] |
| `prometheus.webhooks.serviceMonitor.scheme` | string | `"http"` | HTTP scheme used for scraping. Defaults to `http` |
| `prometheus.webhooks.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.webhooks.serviceMonitor.targetLabels` | list | `[]` | TargetLabels transfers labels from the Kubernetes `Service` onto the created metrics |
| `prometheus.webhooks.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 |
| `prometheus.webhooks.serviceMonitor.tlsConfig` | object | `{}` | TLS configuration for scraping metrics |

### Troubleshooting

Expand Down
5 changes: 5 additions & 0 deletions keda/templates/manager/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ spec:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end}}
scheme: {{ .Values.prometheus.operator.serviceMonitor.scheme }}
{{- with .Values.prometheus.operator.serviceMonitor.tlsConfig }}
tlsConfig:
{{ toYaml . | nindent 6}}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
Expand Down
5 changes: 5 additions & 0 deletions keda/templates/metrics-server/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ spec:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end}}
scheme: {{ .Values.prometheus.metricServer.serviceMonitor.scheme }}
{{- with .Values.prometheus.metricServer.serviceMonitor.tlsConfig }}
tlsConfig:
{{ toYaml . | nindent 6}}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
Expand Down
5 changes: 5 additions & 0 deletions keda/templates/webhooks/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ spec:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end}}
scheme: {{ .Values.prometheus.webhooks.serviceMonitor.scheme }}
{{- with .Values.prometheus.webhooks.serviceMonitor.tlsConfig }}
tlsConfig:
{{ toYaml . | nindent 6}}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
Expand Down
24 changes: 24 additions & 0 deletions keda/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,14 @@ prometheus:
relabelings: []
# -- Additional labels to add for metric server using ServiceMonitor crd (prometheus operator)
additionalLabels: {}
# -- HTTP scheme used for scraping. Defaults to `http`
scheme: http
# -- TLS configuration for scraping metrics
tlsConfig: {}
# caFile: /etc/prom-certs/root-cert.pem
# certFile: /etc/prom-certs/cert-chain.pem
# insecureSkipVerify: true
# keyFile: /etc/prom-certs/key.pem
podMonitor:
# -- Enables PodMonitor creation for the Prometheus Operator
enabled: false
Expand Down Expand Up @@ -612,6 +620,14 @@ prometheus:
relabelings: []
# -- Additional labels to add for metric server using ServiceMonitor crd (prometheus operator)
additionalLabels: {}
# -- HTTP scheme used for scraping. Defaults to `http`
scheme: http
# -- TLS configuration for scraping metrics
tlsConfig: {}
# caFile: /etc/prom-certs/root-cert.pem
# certFile: /etc/prom-certs/cert-chain.pem
# insecureSkipVerify: true
# keyFile: /etc/prom-certs/key.pem
podMonitor:
# -- Enables PodMonitor creation for the Prometheus Operator
enabled: false
Expand Down Expand Up @@ -670,6 +686,14 @@ prometheus:
relabelings: []
# -- Additional labels to add for metric server using ServiceMonitor crd (prometheus operator)
additionalLabels: {}
# -- HTTP scheme used for scraping. Defaults to `http`
scheme: http
# -- TLS configuration for scraping metrics
tlsConfig: {}
# caFile: /etc/prom-certs/root-cert.pem
# certFile: /etc/prom-certs/cert-chain.pem
# insecureSkipVerify: true
# keyFile: /etc/prom-certs/key.pem
prometheusRules:
# -- Enables PrometheusRules creation for the Prometheus Operator
enabled: false
Expand Down
Loading