I've got this ingress.yaml base configuration:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  labels:
    sia: aza
    app: asap-ingress-internal
  name: asap-ingress-internal
  annotations:
    kubernetes.io/ingress.class: "nginx-external"
    nginx.ingress.kubernetes.io/use-regex: "true"
spec:
  rules:
    - host: the-host-value
      http:
        paths:
          - path: /asap-srv-template/(.*)
            backend:
              serviceName: asap-srv-template
              servicePort: 8080
And want to replace the spec.rules.host value only (and keep all http.paths as is.
So I create a env-var.yaml like this :
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: asap-ingress-internal
spec:
  rules:
    - host: the.real.hostname
But the result is the following:
$ kustomize build
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx-external
    nginx.ingress.kubernetes.io/use-regex: "true"
  labels:
    app: asap-ingress-internal
    env: dev
    sia: aza
  name: asap-ingress-internal
  namespace: aza-72461-dev
spec:
  rules:
  - host: the.real.hostname
I have lost all http.paths configuration and I can't find out how to do.
I tried with patches: or patchesStrategicMerge in kustomization.yaml but the result is always the same.
Any help would be greatly appreciated
 
     
     
     
    