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

keda.sh/v1alpha1 apiVersion not found when attempting to apply scaledObject and triggerAuthentication

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • 4.17
    • 4.13, 4.12, 4.14, 4.15, 4.16
    • None
    • Moderate
    • None
    • 5
    • OSDOCS Sprint 258, OSDOCS Sprint 259
    • 2
    • False
    • Hide

      None

      Show
      None

      Description of problem:

          the api version: `keda.sh/v1alpha1` is not found on OCP version 4.16 and 4.17. When we attempt to apply a scaledObject resource and a trigerredAuthentication resource with this kind, within the ingressController, there is an error. 

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

          OCP-4.16 and OCP-4.17

      How reproducible:

          Always

      Steps to Reproduce:

          1. Navigate to ingress operator, 'autoscaling an ingress operator' section: https://docs.openshift.com/container-platform/4.16/networking/ingress-operator.html#nw-autoscaling-ingress-controller_configuring-ingress
          2. Start from step 1, attempt to apply triggerAuthentication YAML (step 3B) 
          3. Notice there are no matches for triggerAuth with keda api version
          4. Attempt step 6, similar issue with no matches for scaledObject on keda apiVersion
          

      Actual results:

      when trying to apply YAML:
      oc process TOKEN="$secret" -f - <<EOF | oc apply -f -
      apiVersion: template.openshift.io/v1
      kind: Template
      parameters:
      - name: TOKEN
      objects:
      - apiVersion: keda.sh/v1alpha1
        kind: TriggerAuthentication
        metadata:
          name: keda-trigger-auth-prometheus
        spec:
          secretTargetRef:
          - parameter: bearerToken
            name: \${TOKEN}
            key: token
          - parameter: ca
            name: \${TOKEN}
            key: ca.crt
      EOF
      get error:   
      unable to recognize no matches for kind "TriggerAuthentication" in version "keda.sh/v1alpha1" 
      
      When trying to apply YAML:
      apiVersion: keda.sh/v1alpha1
      kind: ScaledObject
      metadata:
        name: ingress-scaler
      spec:
        scaleTargetRef: 
          apiVersion: operator.openshift.io/v1
          kind: IngressController
          name: default
          envSourceContainerName: ingress-operator
        minReplicaCount: 1
        maxReplicaCount: 20 
        cooldownPeriod: 1
        pollingInterval: 1
        triggers:
        - type: prometheus
          metricType: AverageValue
          metadata:
            serverAddress: https://thanos-querier.openshift-monitoring.svc.cluster.local:9091 
            namespace: openshift-ingress-operator 
            metricName: 'kube-node-role'
            threshold: '1'
            query: 'sum(kube_node_role{role="worker",service="kube-state-metrics"})' 
            authModes: "bearer"
          authenticationRef:
            name: keda-trigger-auth-prometheus
      
      get error:
      error: resource mapping not found for name: "ingress-scaler" namespace: "" from "scaledobject.yaml": no matches for kind "ScaledObject" in version "keda.sh/v1alpha1"
      ensure CRDs are installed first
      
      
      

      Expected results:

      scaledObject and triggerAuthentication should be applied successfully in apiVersion    

      Additional info:

          

              dfitzmau@redhat.com Darragh Fitzmaurice
              rh-ee-iamin Ishmam Amin
              Ishmam Amin Ishmam Amin
              Melvin Joseph
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: