diff --git a/charts/fleet/templates/deployment_gitjob.yaml b/charts/fleet/templates/deployment_gitjob.yaml index 608a5db919..73f2fe798e 100644 --- a/charts/fleet/templates/deployment_gitjob.yaml +++ b/charts/fleet/templates/deployment_gitjob.yaml @@ -44,6 +44,8 @@ spec: - "{{ template "system_default_registry" $ }}{{ $.Values.image.repository }}:{{ $.Values.image.tag }}" {{- if $.Values.debug }} - --debug + - --debug-level + - {{ quote $.Values.debugLevel }} {{- end }} {{- if $shard.id }} - --shard-id diff --git a/internal/cmd/debug.go b/internal/cmd/debug.go index 43ce7190ae..a219b1d0b3 100644 --- a/internal/cmd/debug.go +++ b/internal/cmd/debug.go @@ -47,7 +47,7 @@ func (c *DebugConfig) OverrideZapOpts(zopts *crzap.Options) *crzap.Options { zopts.Development = c.Debug - if c.Debug { + if c.Debug && c.DebugLevel > 0 { zopts.Level = zapcore.Level(c.DebugLevel * -1) }