Skip to content

[Enhancement]: Make the default Wildcard Domain configrable #614

@christianh814

Description

@christianh814

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 this

This 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions