-
Notifications
You must be signed in to change notification settings - Fork 224
Description
What would you like to be added:
It would be nice to be able to configure the default wildcard domain to use when running oc expose svc or oc create route. The default mDNS is fine, but it would be nice to be able to configure this in the config.yaml file.
Example:
---
dataDir: /tmp/microshift/data
auditLogDir: /tmp/microshift/logs
logVLevel: 4
roles:
- role1
- role2
nodeName: node1
nodeIP: '1.2.3.4'
cluster:
url: https://1.2.3.4:6443
clusterCIDR: '10.20.30.40/16'
serviceCIDR: '40.30.20.10/16'
dns: 'cluster.dns'
domain: cluster.local
wildcardDomain: 'apps.example.com' # add thisThis should produce a route of
{servicename}-{serviceproject}.apps.example.com when someone runs oc expose or oc create route
Why is this needed:
There's probably many reasons to add this, but my specific use case revolves around application delivery via GitOps (Argo CD or ACM)
Doing GitOps with the OpenShift router is sort of a pain because the hostname field is always different. So you have to store a "generic" version of it like this
apiVersion: route.openshift.io/v1
kind: Route
metadata:
creationTimestamp: null
labels:
app: bgd
name: bgd
namespace: bgd
spec:
host: ""
port:
targetPort: 8080
to:
kind: Service
name: bgd
weight: 100
status: {}Which works, because the OpenShift Ingress Controller "automagically" fills out the host field for me. This way, I can store this as a generic file in Git, but deploy to n+∞ OpenShift/µShift clusters without worrying about the destination configuration.