Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-8778

[APBs] Postgres should be deployed using 'Recreate' deployment strategy not using 'Rolling' strategy

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 2.0.0-alpha2
    • 1.0.0, 1.1.0, 2.0.0-alpha
    • None

      I discovered in the UPS APB that if the postgres pod is killed or redeployed the deployment will fail and cause a crash loop.

      You can try this yourself by deploying UPS and then deleting the postgres pod once it has started. This should cause the postgres deployment to go into an endless crash loop.

      It turns out the reason for this is because the postgres deploymentconfig is specifying the 'Rolling' deployment strategy which is incompatible with postgres. The finer details are described in this issue here: https://github.com/sclorg/postgresql-container/issues/166

      We must ensure every APB where postgres is deployed is using the 'Recreate' strategy. The following config should work.

      strategy:
          activeDeadlineSeconds: 21600
          recreateParams:
            timeoutSeconds: 600
          resources: {}
          type: Recreate
      

      NOTE: the same change should be applied to all Postgres deployments across all the mobile services, like keycloak-apb, metrics-apb and ups-apb.

            danielpassos Daniel Passos (Inactive)
            pahayes@redhat.com Dara Hayes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: