Skip to content

Commit

Permalink
feat: add quitquitquit endpoint for cloud-sql-proxy to allow for clea…
Browse files Browse the repository at this point in the history
…n termination of the sidecar
  • Loading branch information
Muni10 committed Feb 6, 2024
1 parent 2438b6f commit be8fe03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/resourcecreator/google/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func CloudSqlProxyContainer(port int32, googleCloudSQLProxyContainerImage, proje
"/cloud-sql-proxy",
"--max-sigterm-delay", CloudSQLProxyTermTimeout,
"--port", strconv.Itoa(int(port)),
"--quitquitquit",
connectionName,
},
Resources: pod.ResourceLimits(cloudSqlProxyContainerResourceSpec),
Expand Down
2 changes: 1 addition & 1 deletion pkg/synchronizer/synchronizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ func TestSynchronizerResourceOptions(t *testing.T) {
err = rig.client.Get(ctx, req.NamespacedName, deploy)
assert.NoError(t, err)
expectedInstanceName := fmt.Sprintf("%s:%s:%s", testProjectId, google.Region, app.Name)
assert.Equal(t, expectedInstanceName, deploy.Spec.Template.Spec.Containers[1].Command[5])
assert.Equal(t, expectedInstanceName, deploy.Spec.Template.Spec.Containers[1].Command[6])

err = rig.client.Get(ctx, req.NamespacedName, sqlinstance)
assert.NoError(t, err)
Expand Down

0 comments on commit be8fe03

Please sign in to comment.