Files
dokku/plugins/scheduler-k3s/templates/chart/service.yaml
T
Jose Diaz-Gonzalez d7ff8552d1 fix: index the process map to ensure the correct config is pulled
Without this change, certain generated process names - like those for a cron job - may be incorrectly handled when indexing the process map.
2024-02-06 04:41:14 -05:00

27 lines
906 B
YAML

{{- $processName := "PROCESS_NAME" }}
{{- $config := index .Values.processes "PROCESS_NAME" }}
---
apiVersion: v1
kind: Service
metadata:
annotations:
dokku.com/managed: "true"
labels:
app.kubernetes.io/instance: {{ $.Values.global.app_name }}-{{ $processName }}
app.kubernetes.io/name: {{ $processName }}
app.kubernetes.io/part-of: {{ $.Values.global.app_name }}
name: {{ $.Values.global.app_name }}-{{ $processName }}
namespace: {{ $.Values.global.namespace }}
spec:
ports:
{{- range $pdx, $port_map := $config.web.port_maps }}
- name: {{ $port_map.name }}
port: {{ $port_map.host_port }}
protocol: TCP
targetPort: {{ $port_map.container_port }}
{{- end }}
selector:
app.kubernetes.io/instance: {{ $.Values.global.app_name }}-{{ $processName }}
app.kubernetes.io/name: {{ $processName }}
app.kubernetes.io/part-of: {{ $.Values.global.app_name }}