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

Featuregate taking invalid value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Major Major
    • 4.16.z
    • 4.17.0, 4.16.z
    • kube-apiserver
    • None
    • Yes
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required
    • Done

      This is a clone of issue OCPBUGS-35906. The following is the description of the original issue:

      Description of problem:

      Featuregate taking unknown value

      Version-Release number of selected component (if applicable):

      4.16 and 4.17

      How reproducible:

      Always

      Steps to Reproduce:

       oc patch featuregate cluster --type=json -p '[{"op": "replace", "path": "/spec/featureSet", "value": "unknownghfh"}]'
      featuregate.config.openshift.io/cluster patched
       oc get  featuregate cluster -o yaml
      apiVersion: config.openshift.io/v1
      kind: FeatureGate
      metadata:
        annotations:
          include.release.openshift.io/self-managed-high-availability: "true"
        creationTimestamp: "2024-06-21T07:20:25Z"
        generation: 2
        name: cluster
        resourceVersion: "56172"
        uid: c900a975-78ea-4076-8e56-e5517e14b55e
      spec:
        featureSet: unknownghfh 

      Actual results:

      featuregate.config.openshift.io/cluster patched
      metadata:
        annotations:
          include.release.openshift.io/self-managed-high-availability: "true"
        creationTimestamp: "2024-06-21T07:20:25Z"
        generation: 2
        name: cluster
        resourceVersion: "56172"
        uid: c900a975-78ea-4076-8e56-e5517e14b55e
      spec:
        featureSet: unknownghfh 

       

      Expected results:

      Should not take invalid value and give error

      {{oc patch featuregate cluster --type=json -p '[

      {"op": "replace", "path": "/spec/featureSet", "value": "unknownghfh"}

      ]'}}
      The FeatureGate "cluster" is invalid: spec.featureSet: Unsupported value: "unknownghfh": supported values: "", "CustomNoUpgrade", "LatencySensitive", "TechPreviewNoUpgrade"
       
       
       
      Additional info:

      https://github.com/openshift/kubernetes/commit/facd3b18622d268a4780de1ad94f7da763351425

       

            lszaszki@redhat.com Lukasz Szaszkiewicz
            openshift-crt-jira-prow OpenShift Prow Bot
            Rahul Gangwar Rahul Gangwar
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: