Skip to content

Commit

Permalink
chore: set default log level to info & enable json logs
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra authored and moshloop committed May 21, 2024
1 parent b6cdcfd commit 9bd0939
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
12 changes: 9 additions & 3 deletions agent-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,15 @@ spec:
- --apm-hub=http://apm-hub:8080
- --canary-checker=http://canary-checker:8080
- --config-db=http://config-db:8080
{{- range $k, $v := .Values.extraArgs}}
- --{{$k}}={{$v}}
{{- end }}
{{- if (tpl .Values.logLevel .)}}
- {{ tpl .Values.logLevel . }}
{{- end }}
{{- if .Values.jsonLogs }}
- --json-logs
{{- end }}
{{- range $k, $v := .Values.extraArgs}}
- --{{$k}}={{$v}}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
startupProbe:
Expand Down
10 changes: 10 additions & 0 deletions agent-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ image:
repository: docker.io/flanksource/incident-commander
pullPolicy: IfNotPresent
tag: "v0.0.546"

global:
# -v, -vv, -vvv
logLevel: ""

logLevel: "{{.Values.global.logLevel}}"
jsonLogs: true

serviceAccount:
# Annotations to add to the service account
annotations: {}
Expand Down Expand Up @@ -91,6 +99,7 @@ db:
enabled: false
secretName: pganalyze
canary-checker:
logLevel: "{{.Values.global.logLevel}}"
image:
type: full
upstream:
Expand All @@ -110,6 +119,7 @@ canary-checker:
enabled: false
config-db:
disablePostgrest: true
logLevel: "{{.Values.global.logLevel}}"
db:
runMigrations: false
embedded:
Expand Down
6 changes: 6 additions & 0 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ spec:
{{- else}}
- --postgrest-max-rows='{{.Values.externalPostgrest.maxRows}}'
{{- end }}
{{- if (tpl .Values.logLevel .)}}
- {{ tpl .Values.logLevel . }}
{{- end }}
{{- if .Values.jsonLogs }}
- --json-logs
{{- end }}
{{- range $k, $v := .Values.extraArgs}}
- --{{$k}}={{$v}}
{{- end }}
Expand Down
10 changes: 10 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ image:
repository: docker.io/flanksource/incident-commander
pullPolicy: IfNotPresent
tag: "v0.0.546"

global:
# -v, -vv, -vvv
logLevel: ""
ui:
host: "mission-control-ui.local"
tlsSecretName: "mission-control-ui-tls"
Expand Down Expand Up @@ -80,6 +83,11 @@ otel:
properties:
incidents.disable: true
logs.disable: true

# -v, -vv, -vvv
logLevel: "{{.Values.global.logLevel}}"
jsonLogs: true

db:
create: true
conf:
Expand Down Expand Up @@ -140,6 +148,7 @@ canary-checker:
image:
type: full
disablePostgrest: true
logLevel: "{{.Values.global.logLevel}}"
otel:
collector: "{{ .Values.global.otel.collector }}"
labels: "{{ .Values.global.otel.labels }}"
Expand All @@ -159,6 +168,7 @@ config-db:
otel:
collector: "{{ .Values.global.otel.collector }}"
labels: "{{ .Values.global.otel.labels }}"
logLevel: "{{.Values.global.logLevel}}"
db:
runMigrations: false
embedded:
Expand Down

0 comments on commit 9bd0939

Please sign in to comment.