Uploaded image for project: 'Knative Serving'
  1. Knative Serving
  2. SRVKS-1154

S-O always inserts default domain to config-domain

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • 1.32.0
    • 1.28.0, 1.29.0, 1.30.0, 1.31.0
    • None
    • None
    • False
    • None
    • False
    • Hide
      If you've configured `spec.config.domain` in the KnativeServing CR, the default external domain will no longer be automatically inserted into the config-domain ConfigMap in the `knative-serving` namespace. You'll need to configure it manually.

      For example, let's assume your cluster has a domain "app.mycluster.example.com."

      If you haven't configured anything for `spec.config.domain`, the config-domain will have:

      ```
      app.mycluster.example.com: ""
      ```

      If you have configured something for `spec.config.domain`, like:

      ```
      spec:
        config:
          domain:
            some1.domain: |
              selector:
                something: foo
      ```

      Previously, the config-domain became:

      ```
      app.mycluster.example.com: ""
      some.domain.example.com: |
        selector:
          something: foo
      ```

      But starting from this release, it will become:

      ```
      some.domain.example.com: |
        selector:
          something: foo
      ```

      These adjustments aim to allow you set another default domain such as cluster local domain.
      Show
      If you've configured `spec.config.domain` in the KnativeServing CR, the default external domain will no longer be automatically inserted into the config-domain ConfigMap in the `knative-serving` namespace. You'll need to configure it manually. For example, let's assume your cluster has a domain "app.mycluster.example.com." If you haven't configured anything for `spec.config.domain`, the config-domain will have: ``` app.mycluster.example.com: "" ``` If you have configured something for `spec.config.domain`, like: ``` spec:   config:     domain:       some1.domain: |         selector:           something: foo ``` Previously, the config-domain became: ``` app.mycluster.example.com: "" some.domain.example.com: |   selector:     something: foo ``` But starting from this release, it will become: ``` some.domain.example.com: |   selector:     something: foo ``` These adjustments aim to allow you set another default domain such as cluster local domain.
    • Enhancement
    • Proposed

      Issue

       Currently regardless of KnativeServing configuration, SO always inserts

      <default-domain>: ""
      

       
      to the config-domain.
      It is because the following line does not use ConfigureIfUnset. 
      https://github.com/openshift-knative/serverless-operator/blob/release-1.31/openshift-knative-operator/pkg/serving/extension.go#L98-L103
       

          // Set the default host to the cluster's host.
          if domain, err := e.fetchClusterHost(ctx); err != nil {
              return fmt.Errorf("failed to fetch cluster host: %w", err)
          } else if domain != "" {
              common.Configure(&ks.Spec.CommonSpec, "domain", domain, "")
          }
      

       
      It should use "ConfigureIfUnset" instead of "Configure".

      Use case

      For example, some users want to use the cluster local domain by default but it is not possible for this issue.

      svc.cluster.local: ''"
      

              rhn-support-knakayam Kenjiro Nakayama (Inactive)
              rhn-support-knakayam Kenjiro Nakayama (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: