Open charoensri opened 10 months ago
Right now it is required to change the chart action to deploy to remove the init containers if something goes wrong and the jobs go away. We will investigate in the future if there are potential enhancements we could make to recover more automatically.
Describe the bug Should the deployment yaml has a dependency on initContainer - upgrade job at end of the upgrad-deploy action?
I tried upgradeType: "zero-downtime" on docker desktop and crashed before post upgrade job. I noticed that the deployment spec.template with the upgrade-deploy action has the initContainer generated initContainers:
To Reproduce
Expected behavior
Source: pega/templates/pega-tier-deployment.yaml
should the initContainers with zdt upgrade job remained in Deployment spec after the upgrade? or because my docker desktop crashed just before the the post upgrade job started. NOTE: both pre and zdt upgrade completed. DB was upgraded successfully and the NEW replicaset recycled the pods without issues. It is OK from the application and upgrade perspective. However the deployment spec (so the pod spec) now has the initContainer in it. Once I deleted the upgrade job, a new pod will fail to start due to the intiContainer failure. I fixed this up by having another helm upgrade using the deploy action only with the new rules schema.
Chart version I clone and use this chart locally https://github.com/pegasystems/pega-helm-charts/blob/master/charts/pega/Chart.yaml
apiVersion: v1 name: pega version: "1.2.0" description: Pega installation on kubernetes keywords:
Server (if applicable, please complete the following information): postgreSQL, docker desktop
Additional context
Source: pega/templates/pega-tier-deployment.yaml
kind: Deployment apiVersion: apps/v1 metadata: annotations: name: pega-dockerdesktop-web namespace: pega883 labels: app: pega-dockerdesktop-web component: Pega spec:
Replicas specify the number of copies for pega-dockerdesktop-web
replicas: 1 progressDeadlineSeconds: 2147483647 selector: matchLabels: app: pega-dockerdesktop-web strategy: rollingUpdate: maxSurge: 1 maxUnavailable: 0 type: RollingUpdate template: metadata: labels: app: pega-dockerdesktop-web annotations: config-check: 41181778004bd56b9c2cf77c7d9e9bdec0eb73e9e5980e0d95159dc69621efac config-tier-check: 7060cc4a89b2696a22ccca2b06eb060f204cb55ff63a90469297eeffec62c403 certificate-check: 2cb1f675c5f532bd68c3851872bf42719f0516208049d403a84068dac54c695c