Skip to content

Commit bd75451

Browse files
authored
fix: Correct the name of the quit url envvar CSQL_PROXY_QUIT_URLS. (#454)
All proxy and operator-related environment variables need to use the prefix CSQL_PROXY_ for consistency. Related to #361
1 parent a13ca22 commit bd75451

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

internal/testhelpers/resources.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func BuildJob(name types.NamespacedName, appLabel string) *batchv1.Job {
297297
job.Spec.Template.Spec.RestartPolicy = corev1.RestartPolicyNever
298298
podCmd := fmt.Sprintf("echo Container 1 is Running \n"+
299299
"sleep %d \n"+
300-
"for url in $CSQL_QUIT_URLS ; do \n"+
300+
"for url in $CSQL_PROXY_QUIT_URLS ; do \n"+
301301
" wget --post-data '' $url \n"+
302302
"done", 30)
303303
job.Spec.Template.Spec.Containers[0].Command = []string{"sh", "-c", podCmd}
@@ -331,7 +331,7 @@ func BuildCronJob(name types.NamespacedName, appLabel string) *batchv1.CronJob {
331331
job.Spec.JobTemplate.Spec.Template.Spec.RestartPolicy = corev1.RestartPolicyNever
332332
podCmd := fmt.Sprintf("echo Container 1 is Running \n"+
333333
"sleep %d \n"+
334-
"for url in $CSQL_QUIT_URLS ; do \n"+
334+
"for url in $CSQL_PROXY_QUIT_URLS ; do \n"+
335335
" wget --post-data '' $url \n"+
336336
"done", 30)
337337
job.Spec.JobTemplate.Spec.Template.Spec.Containers[0].Command = []string{"sh", "-c", podCmd}

internal/workload/podspec_updates.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ func (s *updateState) addQuitEnvVar() {
408408

409409
s.addEnvVar(nil, managedEnvVar{
410410
OperatorManagedValue: corev1.EnvVar{
411-
Name: "CSQL_QUIT_URLS",
411+
Name: "CSQL_PROXY_QUIT_URLS",
412412
Value: v,
413413
}})
414414
}

internal/workload/podspec_updates_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ func TestQuitURLEnvVar(t *testing.T) {
10151015
}
10161016

10171017
// test that envvar was set
1018-
ev, err := findEnvVar(wl, "busybox", "CSQL_QUIT_URLS")
1018+
ev, err := findEnvVar(wl, "busybox", "CSQL_PROXY_QUIT_URLS")
10191019
if err != nil {
10201020
t.Fatal("can't find env var", err)
10211021
}

0 commit comments

Comments
 (0)