Uploaded image for project: 'openstack-k8s'
  1. openstack-k8s
  2. OSPK8-742

Blank domain name in OpenStackNetConfig CR is blocked by validation webhook

XMLWordPrintable

    • False
    • None
    • False

      If you want to create an `OpenStackNetConfig` CR with a blank `domainName`, creating the CR will fail with the error message: 
      admission webhook "vopenstacknetconfig.kb.io" denied the request: domainName must include a top-level domain and at least one subdomain
      It appears that empty/blank `domainName`s are allowed, given the CRD field defition: https://github.com/openstack-k8s-operators/osp-director-operator/blob/91f01844715efb0543ca07c35a1559baa71167ef/api/v1beta1/openstacknetconfig_types.go#L118-L121.  But if left blank, the value is defaulted to `localdomain`, which then fails the validation check that comes next: https://github.com/openstack-k8s-operators/osp-director-operator/blob/91f01844715efb0543ca07c35a1559baa71167ef/api/v1beta1/openstacknetconfig_webhook.go#L421-L423.

              Unassigned Unassigned
              abays@redhat.com Andrew Bays
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: