Uploaded image for project: 'OpenShift Request For Enhancement'
  1. OpenShift Request For Enhancement
  2. RFE-1590

Support scaling CRD resources

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • OLM
    • None
    • False
    • False
    • Undefined

      1. Proposed title of this feature request

      Support scaling CRD resources

      2. What is the nature and description of the request?

      CRD can define a scale subresource that allows to use the command "oc scale" to scale up/down the custom resources (https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#scale-subresource).

      Currently when OLM install the operator, it gives permissions for the CRD but not for its subresources (such as scale).
      This prevent a regular using to run the oc scale method as it fails with:

      $ oc scale --replicas 3 wfly/my-app # wfly is my CRD
      Error from server (Forbidden): wildflyservers.wildfly.org "my-app" is forbidden: User "myuser" cannot patch resource "wildflyservers/scale" in API group "wildfly.org" in the namespace "test"
      

      Note that if I am logged is an admin, the same commands succeeds:

      $ oc scale --replicas 3 wfly/my-app
      wildflyserver.wildfly.org/my-app scaled
      

      For reference, the scale subresource is defined in the CRD at https://github.com/wildfly/wildfly-operator/blob/7faca6c60e51ea7b438498fd8f615aaa6bfe45b5/deploy/crds/wildfly.org_wildflyservers_crd.yaml#L22-L25

      3. Why does the customer need this? (List the business requirements here)

      It is simple to scale up and down a custom resources in OpenShift.
      However when the oc client is used, it requires a complex patch command or to edit the resource.
      Supporting "oc scale" for CRD would make their integration with the oc client more seamless.

              DanielMesser Daniel Messer
              jmesnil1@redhat.com Jeff Mesnil
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: