diff --git a/plugins/scheduler-k3s/template.go b/plugins/scheduler-k3s/template.go index b9c76c96a..c371daae8 100644 --- a/plugins/scheduler-k3s/template.go +++ b/plugins/scheduler-k3s/template.go @@ -73,8 +73,8 @@ type ProcessAnnotations struct { JobAnnotations map[string]string `yaml:"job,omitempty"` PodAnnotations map[string]string `yaml:"pod,omitempty"` SecretAnnotations map[string]string `yaml:"secret,omitempty"` - ServiceAnnotations map[string]string `yaml:"service,omitempty"` ServiceAccountAnnotations map[string]string `yaml:"serviceaccount,omitempty"` + ServiceAnnotations map[string]string `yaml:"service,omitempty"` TraefikIngressRouteAnnotations map[string]string `yaml:"traefik_ingressroute,omitempty"` TraefikMiddlewareAnnotations map[string]string `yaml:"traefik_middleware,omitempty"` } diff --git a/plugins/scheduler-k3s/templates/chart/ingress.yaml b/plugins/scheduler-k3s/templates/chart/ingress.yaml index afadc9275..25c9cd068 100644 --- a/plugins/scheduler-k3s/templates/chart/ingress.yaml +++ b/plugins/scheduler-k3s/templates/chart/ingress.yaml @@ -1,5 +1,5 @@ {{- $processName := "PROCESS_NAME" }} -{{- $config := .Values.processes.PROCESS_NAME }} +{{- $config := index .Values.processes "PROCESS_NAME" }} {{- if and $config.web.domains (eq $.Values.global.network.ingress_class "nginx") }} {{- range $pdx, $port_map := $config.web.port_maps }} --- @@ -8,6 +8,16 @@ kind: Ingress metadata: annotations: dokku.com/managed: "true" + {{- if and $.Values.global.annotations $.Values.global.annotations.deployment }} + {{- range $k, $v := $.Values.global.annotations.deployment }} + {{ $k }}: {{ $v | quote }} + {{- end }} + {{- end }} + {{- if and $config.annotations $config.annotations.ingress }} + {{- range $k, $v := $config.annotations.ingress }} + {{ $k }}: {{ $v | quote }} + {{- end }} + {{- end }} labels: app.kubernetes.io/instance: {{ $.Values.global.app_name }}-{{ $processName }} app.kubernetes.io/name: {{ $processName }}