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

Scuttle config: change scuttleLogging to disableLogging #182

Merged
merged 1 commit into from
Mar 2, 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
2 changes: 1 addition & 1 deletion api/v1alpha1/k6_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type K6Scuttle struct {
EnvoyAdminApi string `json:"envoyAdminApi,omitempty"`
NeverKillIstio bool `json:"neverKillIstio,omitempty"`
NeverKillIstioOnFailure bool `json:"neverKillIstioOnFailure,omitempty"`
ScuttleLogging bool `json:"scuttleLogging,omitempty"`
DisableLogging bool `json:"disableLogging,omitempty"`
StartWithoutEnvoy bool `json:"startWithoutEnvoy,omitempty"`
WaitForEnvoyTimeout string `json:"waitForEnvoyTimeout,omitempty"`
IstioQuitApi string `json:"istioQuitApi,omitempty"`
Expand Down
7 changes: 7 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions config/crd/bases/k6.io_k6s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,10 @@ spec:
type: array
image:
type: string
imagePullPolicy:
description: PullPolicy describes a policy for if/when to pull
a container image
type: string
imagePullSecrets:
items:
description: LocalObjectReference contains enough information
Expand Down Expand Up @@ -1102,6 +1106,8 @@ spec:
type: object
scuttle:
properties:
disableLogging:
type: boolean
enabled:
type: string
envoyAdminApi:
Expand All @@ -1116,8 +1122,6 @@ spec:
type: boolean
quitWithoutEnvoyTimeout:
type: string
scuttleLogging:
type: boolean
startWithoutEnvoy:
type: boolean
waitForEnvoyTimeout:
Expand Down Expand Up @@ -1888,6 +1892,10 @@ spec:
type: array
image:
type: string
imagePullPolicy:
description: PullPolicy describes a policy for if/when to pull
a container image
type: string
imagePullSecrets:
items:
description: LocalObjectReference contains enough information
Expand Down
4 changes: 2 additions & 2 deletions pkg/resources/jobs/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ func newIstioEnvVar(istio v1alpha1.K6Scuttle, istioEnabled bool) []corev1.EnvVar
})
}

if istio.ScuttleLogging {
if istio.DisableLogging {
env = append(env, corev1.EnvVar{
Name: "SCUTTLE_LOGGING",
Value: strconv.FormatBool(istio.ScuttleLogging),
Value: strconv.FormatBool(false),
})
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/resources/jobs/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@ func TestNewIstioEnvVarTrueValues(t *testing.T) {
},
{
Name: "SCUTTLE_LOGGING",
Value: "true",
Value: "false",
},
}

envVars := newIstioEnvVar(v1alpha1.K6Scuttle{
EnvoyAdminApi: "",
IstioQuitApi: "",
WaitForEnvoyTimeout: "",
ScuttleLogging: true,
DisableLogging: true,
}, true)

if !reflect.DeepEqual(envVars, expectedOutcome) {
Expand Down Expand Up @@ -146,7 +146,7 @@ func TestNewIstioEnvVarFalseValues(t *testing.T) {
EnvoyAdminApi: "",
IstioQuitApi: "",
WaitForEnvoyTimeout: "",
ScuttleLogging: false,
DisableLogging: false,
}, true)

if !reflect.DeepEqual(envVars, expectedOutcome) {
Expand Down