ingress-merge icon indicating copy to clipboard operation
ingress-merge copied to clipboard

Setting Priority Doesn’t Work

Open Mr-Howard-Roark opened this issue 5 years ago • 3 comments

When I use the set priority annotation in the docs it causes ingress rules to fail to be added to the ALB. Has anyone gotten this to work? It’s a perfect idea, but I don’t think it works.

Mr-Howard-Roark avatar May 02 '19 01:05 Mr-Howard-Roark

Make sure you are setting the priority as a string in yaml (in quotes).

joonathan avatar May 02 '19 04:05 joonathan

Gotcha that worked! I think it would be good to include that in the example of the annotation. I also think it would be good to mention that without priority set the rules are sorted alphabetically by name. For a while we couldn’t figure out how they were being assembled in different orders when no priority is specified until we looked through the code. Regardless, this is such a great feature so thanks for implementing it!

To elaborate on the order confusion, we always wanted our port 80 redirect rule to have first priority. This rule has no domain name. It was confusing as to why sometimes it would appear first and sometimes not. It seems that its ingress name was being used as part of the sorting.

Mr-Howard-Roark avatar May 02 '19 22:05 Mr-Howard-Roark

It works for me. Application load balancing on Amazon EKS say it has to be in this format.

alb.ingress.kubernetes.io/group.order: <'10'>

So I have this in my manifest file

alb.ingress.kubernetes.io/group.order: {{ include "microserviceChart.IngressGroupOrder" . }}

and this in my templates/_helpers.tpl file

{{/*
Function to get ingress path
*/}}
{{- define "microserviceChart.IngressGroupOrder" -}}
"<'
{{- .Values.ingress.listenerRulePriority -}}
'>"
{{- end }}

and of course this in my values.yaml file

ingress:
  listenerRulePriority: ""

ZillaG avatar Mar 09 '21 00:03 ZillaG