With this setup I was able to get 'global' settings for haproxy ingress controller. Can I modify this settings to change configuration on a host
or path
level?
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gn-ingress
namespace: gn
annotations:
kubernetes.io/ingress.class: haproxy
haproxy/backend-config-snippet: |
timeout server 600s
timeout client 600s
timeout http-request 60s
spec:
rules:
- host: "myhost1"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: myhost
port:
number: 80
With this setup I was able to get 'global' settings for haproxy ingress controller. Can I modify this settings to change configuration on a host
or path
level?
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gn-ingress
namespace: gn
annotations:
kubernetes.io/ingress.class: haproxy
haproxy.org/backend-config-snippet: |
timeout server 600s
timeout client 600s
timeout http-request 60s
spec:
rules:
- host: "myhost1.org"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: myhost
port:
number: 80
Share
Improve this question
asked Feb 6 at 14:07
dimusdimus
9,37011 gold badges48 silver badges57 bronze badges
1 Answer
Reset to default 0Annotations can only be applied to the whole kubernetes resource because they are part of the resource metadata. One way to solve this is to create separate Ingress resources for each host or path with specific settings.