Skip to content

Commit

Permalink
fix(helm): podLabel + improve prometheus rules and logging
Browse files Browse the repository at this point in the history
Change-Id: I3251ea6d7f47d7956db16ec26e13c95fc2d7f23b
Signed-off-by: Martin Müller <[email protected]>
  • Loading branch information
Martin Müller authored and Rash419 committed Jun 13, 2024
1 parent bada017 commit 685a8a4
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 15 deletions.
2 changes: 1 addition & 1 deletion kubernetes/helm/collabora-online/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: "application"
name: collabora-online
description: Collabora Online helm chart

version: 1.1.16
version: 1.1.17
appVersion: "24.04.3.1.1"

home: "https://www.collaboraoffice.com/code/"
Expand Down
3 changes: 3 additions & 0 deletions kubernetes/helm/collabora-online/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ spec:
labels:
{{- include "collabora-online.selectorLabels" . | nindent 8 }}
type: main
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.deployment.hostAliases }}
hostAliases:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
- parser:
hash_value_field: "nginx"
reserve_data: true
reserve_time: true
remove_key_name_field: true
parse:
type: "multi_format"
Expand Down Expand Up @@ -53,9 +54,8 @@ spec:
# TODO split ip and port
nginx.ingress_controller.upstream.address.merged: '${ [record["upstream_address_list"]].flatten&.last }'
http.response.body.bytes: '${ record["nginx"]["size"] }'
event.created: '${ time * 1000 }'
event.kind: "event"
event.category: "web"
event.kind: "event"
event.type: "access"
event.outcome: '${ record["nginx"]["code"].to_i < 400 ? "success" : "failure" }'
# for dashboard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
{{- end }}
{{- range $key, $value := .Values.prometheus.rules.defaults.viewers.doc }}
- alert: "Collabora Viewers by Document"
expr: 'doc_views_active * on(pid, namespace, job, service, pod, container, endpoint, instance) group_left(key, host, filename) doc_info > {{ $value }}'
expr: 'doc_views_active * on(pid,namespace,job,service,pod,container,endpoint,instance) group_left(key,host,filename) doc_info > {{ $value }}'
for: "1m"
labels:
severity: "{{ $key }}"
Expand Down Expand Up @@ -87,7 +87,7 @@ spec:
summary: '{{ printf "%.0f" $value }}% of all documents are opened simultaneously on different pods in namespace {{ $labels.namespace }}. Viewers can not see each others.'
`}}
- alert: "Collabora DocumentsOpenSimultaneously"
expr: 'count(doc_info) by (key, namespace, filename, host) > 1'
expr: 'count(doc_info) by (key, namespace, host, filename) > 1'
labels:
severity: "warning"
{{`
Expand Down Expand Up @@ -129,7 +129,7 @@ spec:
summary: "we returned an HTTP bad argument to a caller in namespace {{ $labels.namespace }} on pod {{ $labels.pod }}."
`}}
- alert: "Collabora Error UnauthorizedRequest"
expr: 'increase(error_unauthorized_request[1m]) > 0'
expr: 'increase(error_unauthorized_request[{{- .Values.prometheus.rules.defaults.errorUnauthorizedRequest.observationInterval }}]) > {{- .Values.prometheus.rules.defaults.errorUnauthorizedRequest.eventCounter }}'
labels:
severity: "warning"
{{`
Expand All @@ -138,7 +138,7 @@ spec:
`}}
{{- range $key, $value := .Values.prometheus.rules.defaults.errorServiceUnavailable }}
- alert: "Collabora Error ServiceUnavailable"
expr: 'increase(error_service_unavailable[1m]) > {{ $value }}'
expr: 'increase(error_service_unavailable[30m]) > {{ $value }}'
labels:
severity: "{{ $key }}"
{{`
Expand Down
3 changes: 3 additions & 0 deletions kubernetes/helm/collabora-online/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ spec:
labels:
{{- include "collabora-online.selectorLabels" . | nindent 8 }}
type: main
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- with .Values.deployment.hostAliases }}
Expand Down
21 changes: 13 additions & 8 deletions kubernetes/helm/collabora-online/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ collabora:
aliasgroups: []

extra_params: --o:ssl.enable=false
# External hostname:port of the server running coolwsd.
# If empty, it's derived from the request (please set it if this doesn't work).

# External hostname:port of the server running coolwsd.
# If empty, it's derived from the request (please set it if this doesn't work).
# May be specified when behind a reverse-proxy or when the hostname is not reachable directly.
server_name: null

existingSecret:
enabled: false
secretName: ""
Expand Down Expand Up @@ -68,6 +68,9 @@ prometheus:
critical: 50
warning: 2
info: 0
errorUnauthorizedRequest:
observationInterval: "60m"
eventCounter: 8
errorStorageConnections:
critical: 50
warning: 2
Expand Down Expand Up @@ -114,6 +117,8 @@ logging:

podAnnotations: {}

podLabels: {}

podSecurityContext: {}
# fsGroup: 2000

Expand Down Expand Up @@ -237,8 +242,8 @@ dynamicConfig:
enabled: false
ecs: false
dedot:
additionalFilters: [ ]
localOutputRefs: [ ]
additionalFilters: []
localOutputRefs: []
globalOutputRefs:
- "default"

Expand Down Expand Up @@ -288,8 +293,8 @@ dynamicConfig:
enabled: false
ecs: false
dedot:
additionalFilters: [ ]
localOutputRefs: [ ]
additionalFilters: []
localOutputRefs: []
globalOutputRefs:
- "default"

Expand Down

0 comments on commit 685a8a4

Please sign in to comment.