How to point multiple domains (aliases) to the same route in OpenShift YAML

64 Views Asked by At

I have 2 domains and want to point them both to the same OpenShift pod using a YAML file so both would show the same identical website.

For first domain this is in the route part of my YAML file below & works, so if I want to add zzz.mydomain.com to it, what would I need to modify?


kind: "Route"
apiVersion: "route.openshift.io/v1"
metadata:
  name: "sales-container"
  namespace: "sales-dev"
  labels:
    component: "sales-container"
spec:
  host: "aaa.mydomain.com"
  to:
    kind: "Service"
    name: "sales-service"
  port:
    targetPort: "web"
  tls:
    insecureEdgeTerminationPolicy: Allow
    termination: edge

I tried duplicating this block as well as add a second "host" line to the above block, and it didn't work with this error in Spinnaker:

Exception ( Monitor Deploy )
Deploy failed: The Route "sales-container" is invalid: spec.host: 
Invalid value: "zzz.mydomain.com": field is immutable

Thank you in advance :)

0

There are 0 best solutions below