Uploaded image for project: 'Red Hat Developer Hub Bugs'
  1. Red Hat Developer Hub Bugs
  2. RHDHBUGS-2278

Unable to patch the Deployment strategy by the Operator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 1.9.0
    • 1.8.0
    • Operator
    • None
    • 3
    • False
    • Hide

      None

      Show
      None
    • False

      Description of problem:

      The operator applies by default the `rollingUpdate` deployment strategy, however, if the administrator or PE operating the platform wants to apply the `Recreate` strategy, it is not possible right now. {}{}

      Prerequisites (if any, like setup, operators/versions):

      Steps to Reproduce

       Following the same pattern to patch the Deployment definition of the RHDH instance, to apply the `Recreate` strategy, the following patterns should work:

      Option 1:

       

      apiVersion: rhdh.redhat.com/v1alpha4
      kind: Backstage
      metadata:
        name: developer-hub
      spec:
        deployment:
          patch:
            spec:
              strategy:
                rollingUpdate: null
                type: Recreate                             

      Option 2:

       

       

      apiVersion: rhdh.redhat.com/v1alpha4
      kind: Backstage
      metadata:
        name: developer-hub
      spec:
        deployment:
          patch:
            spec:
              strategy:
                rollingUpdate: null
                rollingUpdate:
                  $patch: delete 

       

       

      Actual results:

      The operator does not apply that change successfully and the following errors are displayed in the Backstage status section:

      failed to apply backstage objects failed to apply object: Deployment.apps "backstage-developer-hub" is invalid: spec.strategy.rollingUpdate: Forbidden: may not be specified when strategy `type` is 'Recreate' 

      Expected results:

      Apply the new deployment strategy successfully.

      Reproducibility (Always/Intermittent/Only Once):

      Always applying that configuration

      Build Details:

      Additional info (Such as Logs, Screenshots, etc):

              Unassigned Unassigned
              rmarting@redhat.com Roman Martin Gil
              RHIDP - Install
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: