When I ingresses/KongIngresses for 2 separate hosts:
Ingresses:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hosta-portal
namespace: devops
annotations:
konghq.com/override: https-only
konghq.com/plugins: hosta-allowed-ips
kubernetes.io/ingress.class: kong
spec:
tls:
- hosts:
- hosta.com
secretName: hosta-tls-csi
rules:
- host: hosta.com
- http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: hosta-portal
port:
number: 80
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hostb-portal
namespace: devops
annotations:
konghq.com/override: https-only
kubernetes.io/ingress.class: kong
spec:
tls:
- hosts:
- hostb.com
secretName: hostb-tls-csi
rules:
- host: hostb.com
- http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: hostb-portal
port:
number: 80
Kong Ingresses:
apiVersion: configuration.konghq.com/v1
kind: KongIngress
metadata:
name: hosta-portal
namespace: devops
route:
hosts: hosta.com
https_redirect_status_code: 302
path_handling: v0
preserve_host: true
protocols:
- https
strip_path: true
apiVersion: configuration.konghq.com/v1
kind: KongIngress
metadata:
name: hostb-portal
namespace: devops
route:
hosts: hostb.com
https_redirect_status_code: 302
path_handling: v0
preserve_host: true
protocols:
- https
strip_path: true
With this definition host.com and host.com both are performing the allow ip check and both route to the same backend service.
This worked just fine before we upgraded to 2.5