GoogleCloudPlatform / GoogleCloudPlatform/cloud-sql-proxy-operator

Bug: Cloud SQL Proxy Operator fails injecting sometimes.

Offen
#736 7 Kommentare 3 Reaktionen 2 zugewiesene Personen Beansprucht von @panavenue Auf GitHub ansehen
type: bug
Vorherrschende Sprache
Go
Sterne
120
Forks
18
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Priority: I would definitely label this issue with the highest priority, since this completely kills off one replica until a pod has been *deleted*

Issue Description:
Sometimes the Cloud SQL Proxy Operator fails to inject the CloudSQL pod. I was not able to successfully get the pod to restart with a regular initContainer (see below) / the operator to inject, unless I really kill the pod.

Current Workaround:
Add `kubectl delete pod` permission to the service account and kill the pod using a `curl` command and a `busybox-curl` image for the init Container.

Impact:
This essentially fully blocks 1 replica: The replica is not able to spawn the pod to connect to the database and hence stays in a completely unusable state.

Killing pods is essentially harmful for pods with bigger images (consider `imagePullPolicy: Always`)

Recommendation:
Introduce / Fix the mechanism that verifies if a pod has really been properly injected with the cloud sql proxy sidecar. E.g. this can be done by checking if port `5432` or whatever DB_PORT is set is reachable. If not reachable / injected kill the pod, so it restarts.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.