diff --git a/common/templates/traefik/_service.tpl b/common/templates/traefik/_service.tpl new file mode 100644 index 0000000000000000000000000000000000000000..06ebb01ae40303e8697d6cc2787ad62c3003d4de --- /dev/null +++ b/common/templates/traefik/_service.tpl @@ -0,0 +1,26 @@ +# https://doc.traefik.io/traefik/routing/services/#services +{{- define "common.traefik.service" }} +apiVersion: {{ .Values.apiVersion | default "traefik.io/v1alpha1" }} +kind: TraefikService +metadata: + name: {{ .Values.name | default "service" }} + {{- with .Values.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "common.variables.labels" . | nindent 4 }} +spec: + {{- with .Values.loadBalancer }} + loadBalancer: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.weighted }} + weighted: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.mirroring }} + mirroring: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }}