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 Service for Operator #337

Merged
merged 3 commits into from
Nov 29, 2022
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
30 changes: 15 additions & 15 deletions keda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ their default values.
| `service.portHttpTarget` | Service HTTP port for KEDA Metric Server container | `8080` |
| `service.portHttps` | HTTPS port for KEDA Metric Server service | `443` |
| `service.portHttpsTarget` | HTTPS port for KEDA Metric Server container | `6443` |
| `prometheus.metricServer.enabled` | Enable metric server prometheus metrics expose | `false`
| `prometheus.metricServer.enabled` | Enable metric server Prometheus metrics expose | `false`
| `prometheus.metricServer.port` | HTTP port used for exposing metrics server prometheus metrics | `9022`
| `prometheus.metricServer.portName` | HTTP port name for exposing metrics server prometheus metrics | `metrics`
| `prometheus.metricServer.path` | Path used for exposing metric server prometheus metrics | `/metrics`
Expand All @@ -134,20 +134,20 @@ their default values.
| `prometheus.metricServer.podMonitor.namespace` | Scraping namespace for metric server using podMonitor crd (prometheus operator) | ``
| `prometheus.metricServer.podMonitor.additionalLabels` | Additional labels to add for metric server using podMonitor crd (prometheus operator) | `{}`
| `prometheus.metricServer.podMonitor.relabelings` | List of expressions that define custom relabeling rules for metric server podMonitor crd (prometheus operator) | `[]`
| `prometheus.operator.enabled` | Enable keda operator prometheus metrics expose | `false`
| `prometheus.operator.path` | Path used for exposing keda operator prometheus metrics | `/metrics`
| `prometheus.operator.podMonitor.enabled` | Enable monitoring for keda operator using podMonitor crd (prometheus operator) | `false`
| `prometheus.operator.podMonitor.interval` | Scraping interval for keda operator using podMonitor crd (prometheus operator) | ``
| `prometheus.operator.podMonitor.scrapeTimeout` | Scraping timeout for keda operator using podMonitor crd (prometheus operator) | ``
| `prometheus.operator.podMonitor.namespace` | Scraping namespace for keda operator using podMonitor crd (prometheus operator) | ``
| `prometheus.operator.podMonitor.additionalLabels` | Additional labels to add for keda operator using podMonitor crd (prometheus operator) | `{}`
| `prometheus.operator.prometheusRules.enabled` | Enable monitoring for keda operator using prometheusRules crd (prometheus operator) | `false`
| `prometheus.operator.prometheusRules.namespace` | Scraping namespace for keda operator using prometheusRules crd (prometheus operator) | ``
| `prometheus.operator.prometheusRules.additionalLabels` | Additional labels to add for keda operator using prometheusRules crd (prometheus operator) | `{}`
| `prometheus.operator.prometheusRules.alerts` | Additional alerts to add for keda operator using prometheusRules crd (prometheus operator) | `[]`
| `prometheus.operator.podMonitor.relabelings` | List of expressions that define custom relabeling rules for keda operator podMonitor crd (prometheus operator) | `[]`
| `volumes.keda.extraVolumes` | Extra volumes for keda deployment | `[]`
| `volumes.keda.extraVolumeMounts` | Extra volume mounts for keda deployment | `[]`
| `prometheus.operator.enabled` | Enable KEDA Operator prometheus metrics expose | `false`
| `prometheus.operator.port` | Port used for exposing KEDA Operator prometheus metrics | `8080`
| `prometheus.operator.podMonitor.enabled` | Enable monitoring for KEDA Operator using podMonitor crd (prometheus operator) | `false`
| `prometheus.operator.podMonitor.interval` | Scraping interval for KEDA Operator using podMonitor crd (prometheus operator) | ``
| `prometheus.operator.podMonitor.scrapeTimeout` | Scraping timeout for KEDA Operator using podMonitor crd (prometheus operator) | ``
| `prometheus.operator.podMonitor.namespace` | Scraping namespace for KEDA Operator using podMonitor crd (prometheus operator) | ``
| `prometheus.operator.podMonitor.additionalLabels` | Additional labels to add for KEDA Operator using podMonitor crd (prometheus operator) | `{}`
| `prometheus.operator.prometheusRules.enabled` | Enable monitoring for KEDA Operator using prometheusRules crd (prometheus operator) | `false`
| `prometheus.operator.prometheusRules.namespace` | Scraping namespace for KEDA Operator using prometheusRules crd (prometheus operator) | ``
| `prometheus.operator.prometheusRules.additionalLabels` | Additional labels to add for KEDA Operator using prometheusRules crd (prometheus operator) | `{}`
| `prometheus.operator.prometheusRules.alerts` | Additional alerts to add for KEDA Operator using prometheusRules crd (prometheus operator) | `[]`
| `prometheus.operator.podMonitor.relabelings` | List of expressions that define custom relabeling rules for KEDA Operator podMonitor crd (prometheus operator) | `[]`
| `volumes.keda.extraVolumes` | Extra volumes for KEDA deployment | `[]`
| `volumes.keda.extraVolumeMounts` | Extra volume mounts for KEDA deployment | `[]`
| `volumes.metricsApiServer.extraVolumes` | Extra volumes for metric server deployment | `[]`
| `volumes.metricsApiServer.extraVolumeMounts` | Extra volume mounts for metric server deployment | `[]`

Expand Down
3 changes: 3 additions & 0 deletions keda/templates/12-keda-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ spec:
- "--zap-log-level={{ .Values.logging.operator.level }}"
- "--zap-encoder={{ .Values.logging.operator.format }}"
- "--zap-time-encoding={{ .Values.logging.operator.timeEncoding }}"
{{- if .Values.prometheus.operator.enabled }}
- --metrics-port=:{{ .Values.prometheus.operator.port }}
{{- end }}
{{- range $key, $value := .Values.extraArgs.keda }}
- --{{ $key }}={{ $value }}
{{- end }}
Expand Down
20 changes: 20 additions & 0 deletions keda/templates/13-keda-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
{{- include "keda.labels" . | indent 4 }}
name: {{ .Values.operator.name }}
namespace: {{ .Release.Namespace }}
spec:
ports:
- name: metricsservice
port: 9666
targetPort: 9666
{{- if .Values.prometheus.operator.enabled }}
- name: metrics
port: {{ .Values.prometheus.operator.port }}
targetPort: {{ .Values.prometheus.operator.port }}
{{- end }}
selector:
app: {{ .Values.operator.name }}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ metadata:
spec:
podMetricsEndpoints:
- port: http
path: {{ .Values.prometheus.operator.path }}
path: /metrics
honorLabels: true
{{- with .Values.prometheus.operator.podMonitor.interval }}
interval: {{ . }}
Expand Down
1 change: 1 addition & 0 deletions keda/templates/22-metrics-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ spec:
- --port={{ .Values.service.portHttpTarget }}
- --secure-port={{ .Values.service.portHttpsTarget }}
- --logtostderr=true
- --metrics-service-address={{ .Values.operator.name }}.{{ .Release.Namespace }}.svc.cluster.local:9666
{{- if .Values.prometheus.metricServer.enabled }}
- --metrics-port={{ .Values.prometheus.metricServer.port }}
- --metrics-path={{ .Values.prometheus.metricServer.path }}
Expand Down
1 change: 0 additions & 1 deletion keda/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ prometheus:
operator:
enabled: false
port: 8080
path: /metrics
podMonitor:
# Enables PodMonitor creation for the Prometheus Operator
enabled: false
Expand Down