Uploaded image for project: 'Red Hat build of Keycloak'
  1. Red Hat build of Keycloak
  2. RHBK-1096

Keycloak Operator installation fails when resource quota is present.

    XMLWordPrintable

Details

    • False
    • Hide

      None

      Show
      None
    • False
    • Important

    Description

      How to reproduce the issue?

      Reproducer Steps:

      1) Create new project

      [mycluster@upi-0 ~]$ oc project keycloak
      Already on project "keycloak" on server "https://api.mylab.domain.com:6443" 

       
      2) Applied resourcequota:

      [mycluster@upi-0 ~]$ oc describe resourcequota 
      Name: mem-cpu-demo
      Namespace: keycloak
      Resource         Used Hard
      --------         ---- ----
      limits.cpu        0    4
      limits.memory     0    4Gi
      requests.cpu      0    2
      requests.memory   0    2Gi 

      3) Trying to install keycloak operator from web console in "keycloak" project.

      4) Checked the events:

      [mycluster@upi-0 ~]$ oc get events
      [...]
      13s Warning FailedCreate replicaset/rhbk-operator-796747f779 Error creating: pods "rhbk-operator-796747f779-nhhlg" is forbidden: failed quota: mem-cpu-demo: must specify limits.cpu for: rhbk-operator; limits.memory for: rhbk-operator; requests.cpu for: rhbk-operator; requests.memory for: rhbk-operator
      13s Warning FailedCreate replicaset/rhbk-operator-796747f779 Error creating: pods "rhbk-operator-796747f779-kchww" is forbidden: failed quota: mem-cpu-demo: must specify limits.cpu for: rhbk-operator; limits.memory for: rhbk-operator; requests.cpu for: rhbk-operator; requests.memory for: rhbk-operator
      4s Warning FailedCreate replicaset/rhbk-operator-796747f779 (combined from similar events): Error creating: pods "rhbk-operator-796747f779-k4kvf" is forbidden: failed quota: mem-cpu-demo: must specify limits.cpu for: rhbk-operator; limits.memory for: rhbk-operator; requests.cpu for: rhbk-operator; requests.memory for: rhbk-operator
      14s Normal ScalingReplicaSet deployment/rhbk-operator Scaled up replica set rhbk-operator-796747f779 to 1
      15s Normal RequirementsUnknown clusterserviceversion/rhbk-operator.v22.0.8-opr.2 requirements not yet checked
      15s Normal RequirementsNotMet clusterserviceversion/rhbk-operator.v22.0.8-opr.2 one or more requirements couldn't be found
      14s Normal AllRequirementsMet clusterserviceversion/rhbk-operator.v22.0.8-opr.2 all requirements found, attempting install
      14s Normal InstallSucceeded clusterserviceversion/rhbk-operator.v22.0.8-opr.2 waiting for install components to report healthy
      14s Normal InstallWaiting clusterserviceversion/rhbk-operator.v22.0.8-opr.2 installing: waiting for deployment rhbk-operator to become ready: deployment "rhbk-operator" not available: Deployment does not have minimum availability. 

      5) After checking the deployment yaml, observed that "resources" field is empty.

      [mycluster@upi-0 ~]$ oc get deployment rhbk-operator -oyaml
      apiVersion: apps/v1
      kind: Deployment
      [...]
            image: registry.redhat.io/rhbk/keycloak-rhel9-operator@sha256:57f9efe7c3b4e19eb85f6f06ba3024949821e06b7be41f3baddfb5a344f47dc8
              imagePullPolicy: Always
              name: rhbk-operator
              resources: {} 
      [...]

      Actual Result:

      Keycloak Operator is not installing because prerequisites of resource limits are not defined in the "rhbk-operator" deployment. 

       

      Expected Result:

      - "rhbk-operator" deployment should run even if resource quota is present in the project.
      - "rhbk-operator" deployment definition should have resources requests/limits defined.  

      Attachments

        Activity

          People

            rh_vmuzikar Václav Muzikář
            rhn-support-duge Dushyant Uge
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: