Skip to content

Commit

Permalink
Change JobSink execution mode variable to K_EXECUTION_MODE (#8350)
Browse files Browse the repository at this point in the history
* Change JobSink execution mode variable to `K_EXECUTION_MODE`

Align to `K_SINK`.

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Fix tests

Signed-off-by: Pierangelo Di Pilato <[email protected]>

---------

Signed-off-by: Pierangelo Di Pilato <[email protected]>
  • Loading branch information
pierDipi authored Nov 28, 2024
1 parent 91f1c79 commit 545c14c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions pkg/apis/sinks/v1alpha1/job_sink_defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestSetDefaults(t *testing.T) {
Name: "cnt3",
Image: "img3",
Env: []corev1.EnvVar{
{Name: "KNATIVE_EXECUTION_MODE", Value: "something"},
{Name: "K_EXECUTION_MODE", Value: "something"},
},
},
},
Expand All @@ -63,7 +63,7 @@ func TestSetDefaults(t *testing.T) {
Name: "cnt-ini2",
Image: "img-ini2",
Env: []corev1.EnvVar{
{Name: "KNATIVE_EXECUTION_MODE", Value: "something"},
{Name: "K_EXECUTION_MODE", Value: "something"},
},
},
},
Expand All @@ -84,14 +84,14 @@ func TestSetDefaults(t *testing.T) {
Name: "cnt",
Image: "img",
Env: []corev1.EnvVar{
{Name: "KNATIVE_EXECUTION_MODE", Value: "batch"},
{Name: "K_EXECUTION_MODE", Value: "batch"},
},
},
{
Name: "cnt-ini2",
Image: "img-ini2",
Env: []corev1.EnvVar{
{Name: "KNATIVE_EXECUTION_MODE", Value: "something"},
{Name: "K_EXECUTION_MODE", Value: "something"},
},
},
},
Expand All @@ -100,21 +100,21 @@ func TestSetDefaults(t *testing.T) {
Name: "cnt",
Image: "img",
Env: []corev1.EnvVar{
{Name: "KNATIVE_EXECUTION_MODE", Value: "batch"},
{Name: "K_EXECUTION_MODE", Value: "batch"},
},
},
{
Name: "cnt2",
Image: "img2",
Env: []corev1.EnvVar{
{Name: "KNATIVE_EXECUTION_MODE", Value: "batch"},
{Name: "K_EXECUTION_MODE", Value: "batch"},
},
},
{
Name: "cnt3",
Image: "img3",
Env: []corev1.EnvVar{
{Name: "KNATIVE_EXECUTION_MODE", Value: "something"},
{Name: "K_EXECUTION_MODE", Value: "something"},
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/sinks/v1alpha1/job_sink_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
)

const (
ExecutionModeEnvVar = "KNATIVE_EXECUTION_MODE"
ExecutionModeEnvVar = "K_EXECUTION_MODE"
)

type ExecutionMode string
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/jobsink/jobsink_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func testJob(name string) *batchv1.Job {
{
Name: "test-container",
Env: []corev1.EnvVar{
{Name: "KNATIVE_EXECUTION_MODE", Value: "batch"},
{Name: "K_EXECUTION_MODE", Value: "batch"},
},
},
},
Expand Down

0 comments on commit 545c14c

Please sign in to comment.