Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Correct the name of the quit url envvar CSQL_PROXY_QUIT_URLS. #454

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/testhelpers/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func BuildJob(name types.NamespacedName, appLabel string) *batchv1.Job {
job.Spec.Template.Spec.RestartPolicy = corev1.RestartPolicyNever
podCmd := fmt.Sprintf("echo Container 1 is Running \n"+
"sleep %d \n"+
"for url in $CSQL_QUIT_URLS ; do \n"+
"for url in $CSQL_PROXY_QUIT_URLS ; do \n"+
" wget --post-data '' $url \n"+
"done", 30)
job.Spec.Template.Spec.Containers[0].Command = []string{"sh", "-c", podCmd}
Expand Down Expand Up @@ -331,7 +331,7 @@ func BuildCronJob(name types.NamespacedName, appLabel string) *batchv1.CronJob {
job.Spec.JobTemplate.Spec.Template.Spec.RestartPolicy = corev1.RestartPolicyNever
podCmd := fmt.Sprintf("echo Container 1 is Running \n"+
"sleep %d \n"+
"for url in $CSQL_QUIT_URLS ; do \n"+
"for url in $CSQL_PROXY_QUIT_URLS ; do \n"+
" wget --post-data '' $url \n"+
"done", 30)
job.Spec.JobTemplate.Spec.Template.Spec.Containers[0].Command = []string{"sh", "-c", podCmd}
Expand Down
2 changes: 1 addition & 1 deletion internal/workload/podspec_updates.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ func (s *updateState) addQuitEnvVar() {

s.addEnvVar(nil, managedEnvVar{
OperatorManagedValue: corev1.EnvVar{
Name: "CSQL_QUIT_URLS",
Name: "CSQL_PROXY_QUIT_URLS",
Value: v,
}})
}
Expand Down
2 changes: 1 addition & 1 deletion internal/workload/podspec_updates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ func TestQuitURLEnvVar(t *testing.T) {
}

// test that envvar was set
ev, err := findEnvVar(wl, "busybox", "CSQL_QUIT_URLS")
ev, err := findEnvVar(wl, "busybox", "CSQL_PROXY_QUIT_URLS")
if err != nil {
t.Fatal("can't find env var", err)
}
Expand Down