Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-55031

Example of ClusterUserDefinedNetwork matchLabels shows an array where it should be an object

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • 4.17, 4.18
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Important
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In Creating a ClusterUserDefinedNetwork CR by using the CLI, the following example:

      apiVersion: k8s.ovn.org/v1
      kind: ClusterUserDefinedNetwork
      metadata:
        name: <cudn_name>
      spec:
        namespaceSelector:
          matchLabels:
          - "<example_namespace_one>":""  
          - "<example_namespace_two>":"" 
        network: 6
          topology: Layer2  
          layer2:  
            role: Primary  
            subnets:
              - "2001:db8::/64"
              - "10.100.0.0/16" 10
      

      Should look like this:

      apiVersion: k8s.ovn.org/v1
      kind: ClusterUserDefinedNetwork
      metadata:
        name: <cudn_name>  
      spec:
        namespaceSelector:  
          matchLabels:  
            "<example_namespace_one>": ""  
            "<example_namespace_two>": ""  
        network:  
          topology: Layer2  
          layer2:  
            role: Primary  
            subnets:
              - "2001:db8::/64"
              - "10.100.0.0/16"  
      

      The key is that matchLabels accepts a dictionary of label key-values, not an array.

              rhn-support-palonsor Pablo Alonso Rodriguez
              rhn-support-palonsor Pablo Alonso Rodriguez
              None
              None
              Arti Sood Arti Sood
              None
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: