Files
dokku/plugins/scheduler-k3s/templates/chart/keda-interceptor-proxy-service.yaml
T
Jose Diaz-Gonzalez b98863b6a7 feat: add support for the keda-http-add-on
Externally, it is treated the same as any other scaling trigger, but requires that the chart be installed in order for it to be supported.
2024-11-13 03:29:26 -05:00

27 lines
1.3 KiB
YAML

{{- $processName := "PROCESS_NAME" }}
{{- $config := index .Values.processes "PROCESS_NAME" }}
{{- if and (eq $processName "web") (and $config.autoscaling (and $config.autoscaling.enabled (eq $config.autoscaling.type "keda"))) }}
{{- if .Capabilities.APIVersions.Has "http.keda.sh/v1alpha1" -}}
---
kind: Service
apiVersion: v1
metadata:
annotations:
app.kubernetes.io/version: {{ $.Values.global.deployment_id | quote }}
dokku.com/managed: "true"
{{ include "print.annotations" (dict "config" $.Values.global "key" "keda_interceptor_proxy_service") | indent 4 }}
{{ include "print.annotations" (dict "config" $config "key" "keda_interceptor_proxy_service") | indent 4 }}
labels:
app.kubernetes.io/instance: {{ $.Values.global.app_name }}-{{ $processName }}
app.kubernetes.io/name: {{ $processName }}
app.kubernetes.io/part-of: {{ $.Values.global.app_name }}
{{ include "print.labels" (dict "config" $.Values.global "key" "keda_interceptor_proxy_service") | indent 4 }}
{{ include "print.labels" (dict "config" $config "key" "keda_interceptor_proxy_service") | indent 4 }}
name: kip-{{ $.Values.global.app_name}}-{{ $processName }}
namespace: {{ $.Values.global.namespace }}
spec:
type: ExternalName
externalName: keda-add-ons-http-interceptor-proxy.keda.svc.cluster.local
{{- end }}
{{- end }}