Aleksei
Aleksei2w ago

Jobs are timed out when using extra container with cloud-sql-proxy

Hey, I am having an issue with installing this Helm chart and using a Cloud SQL database. I have set up an extra container with cloud-sql-proxy, basically just uncommented the section that was there. The problem is that extra container keeps working after the init script in the main container has finished so the whole job is considered to be running. After this {{ .Values.initJob.activeDeadlineSeconds }} amount of time the job is being killed and failed. The installation process doesn't go any further To reproduce Specify extraContainers with some process that is running infinitely Run helm install Either Init (if it's enabled) or setup job will fail because of activeDeadlineSeconds Logs
helm install ...
W0527 19:17:17.768216 36883 warnings.go:70] autopilot-default-resources-mutator:Autopilot updated Job auth/zitadel-init: defaulted unspecified 'cpu' resource for containers [cloud-sql-proxy, zitadel-init] (see http://g.co/gke/autopilot-defaults).
Error: INSTALLATION FAILED: failed pre-install: 1 error occurred:
* timed out waiting for the condition
helm install ...
W0527 19:17:17.768216 36883 warnings.go:70] autopilot-default-resources-mutator:Autopilot updated Job auth/zitadel-init: defaulted unspecified 'cpu' resource for containers [cloud-sql-proxy, zitadel-init] (see http://g.co/gke/autopilot-defaults).
Error: INSTALLATION FAILED: failed pre-install: 1 error occurred:
* timed out waiting for the condition
Am I doing something wrong? Did anyone run into that? Thank you. P.S. I opened an issue here as well https://github.com/zitadel/zitadel-charts/issues/344
1 Reply
Aleksei
AlekseiOP6d ago
I seemed to manage to fix this problem by using https://github.com/GoogleCloudPlatform/cloud-sql-proxy-operator/ It attaches sidecar containers on demand and those containers are able to terminate gracefully
GitHub
GitHub - GoogleCloudPlatform/cloud-sql-proxy-operator: A Kubernetes...
A Kubernetes Operator to automatically configure secure connections to Cloud SQL - GoogleCloudPlatform/cloud-sql-proxy-operator

Did you find this page helpful?