From d575e5b954864513a619872c2c68c4cd6cdbafb7 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Thu, 27 Oct 2022 11:20:52 +0200 Subject: [PATCH 1/4] add monitoring and debug endpoints --- charts/ocis/templates/app-provider/deployment.yaml | 7 +++++++ charts/ocis/templates/app-provider/service.yaml | 11 ++++++++--- charts/ocis/templates/app-registry/deployment.yaml | 7 +++++++ charts/ocis/templates/app-registry/service.yaml | 9 +++++++-- charts/ocis/templates/auth-basic/deployment.yaml | 11 +++++++++-- charts/ocis/templates/auth-basic/service.yaml | 9 +++++++-- charts/ocis/templates/auth-machine/deployment.yaml | 7 +++++++ charts/ocis/templates/auth-machine/service.yaml | 9 +++++++-- charts/ocis/templates/frontend/deployment.yaml | 12 ++++++++++-- charts/ocis/templates/frontend/service.yaml | 9 +++++++-- charts/ocis/templates/gateway/deployment.yaml | 7 +++++++ charts/ocis/templates/gateway/service.yaml | 9 +++++++-- charts/ocis/templates/graph/deployment.yaml | 7 +++++++ charts/ocis/templates/graph/service.yaml | 9 +++++++-- charts/ocis/templates/groups/deployment.yaml | 7 +++++++ charts/ocis/templates/groups/service.yaml | 9 +++++++-- charts/ocis/templates/idm/service.yaml | 5 +++-- charts/ocis/templates/idp/service.yaml | 9 +++++---- charts/ocis/templates/nats/service.yaml | 5 +++-- charts/ocis/templates/ocdav/deployment.yaml | 7 +++++++ charts/ocis/templates/ocdav/service.yaml | 9 +++++++-- charts/ocis/templates/ocs/deployment.yaml | 11 +++++++++-- charts/ocis/templates/ocs/service.yaml | 9 +++++++-- charts/ocis/templates/proxy/deployment.yaml | 7 +++++++ charts/ocis/templates/proxy/service.yaml | 12 ++++++++---- charts/ocis/templates/search/deployment.yaml | 11 +++++++++-- charts/ocis/templates/search/service.yaml | 7 +++++-- charts/ocis/templates/settings/deployment.yaml | 7 +++++++ charts/ocis/templates/settings/service.yaml | 9 +++++++-- charts/ocis/templates/sharing/deployment.yaml | 7 +++++++ charts/ocis/templates/sharing/service.yaml | 9 +++++++-- .../templates/storage-publiclink/deployment.yaml | 11 +++++++++-- .../ocis/templates/storage-publiclink/service.yaml | 9 +++++++-- charts/ocis/templates/storage-shares/deployment.yaml | 7 +++++++ charts/ocis/templates/storage-shares/service.yaml | 9 +++++++-- charts/ocis/templates/storage-system/deployment.yaml | 9 ++++++++- charts/ocis/templates/storage-system/service.yaml | 9 +++++++-- charts/ocis/templates/storage-users/deployment.yaml | 9 ++++++++- charts/ocis/templates/storage-users/service.yaml | 9 +++++++-- charts/ocis/templates/store/deployment.yaml | 8 ++++++++ charts/ocis/templates/store/service.yaml | 9 +++++++-- charts/ocis/templates/thumbnails/deployment.yaml | 7 +++++++ charts/ocis/templates/thumbnails/service.yaml | 9 +++++++-- charts/ocis/templates/users/deployment.yaml | 7 +++++++ charts/ocis/templates/users/service.yaml | 9 +++++++-- charts/ocis/templates/web/deployment.yaml | 7 +++++++ charts/ocis/templates/web/service.yaml | 9 +++++++-- charts/ocis/templates/webdav/deployment.yaml | 7 +++++++ charts/ocis/templates/webdav/service.yaml | 9 +++++++-- charts/ocis/values.yaml | 7 +++++++ 50 files changed, 354 insertions(+), 69 deletions(-) diff --git a/charts/ocis/templates/app-provider/deployment.yaml b/charts/ocis/templates/app-provider/deployment.yaml index fd6254f48..4c1ba7682 100644 --- a/charts/ocis/templates/app-provider/deployment.yaml +++ b/charts/ocis/templates/app-provider/deployment.yaml @@ -48,8 +48,13 @@ spec: - name: APP_PROVIDER_LOG_PRETTY value: "{{ $.Values.logging.pretty }}" + - name: APP_PROVIDER_DEBUG_PPROF + value: "{{ $.Values.debug.profiling }}" + - name: APP_PROVIDER_GRPC_ADDR value: 0.0.0.0:9164 + - name: APP_PROVIDER_DEBUG_ADDR + value: 0.0.0.0:9165 - name: APP_PROVIDER_EXTERNAL_ADDR value: app-provider-{{ regexReplaceAll "\\W+" (lower $officeSuite.name) "_" }}:9164 @@ -80,6 +85,8 @@ spec: ports: - name: grpc containerPort: 9164 + - name: metrics-debug + containerPort: 9165 volumeMounts: - name: tmp-volume mountPath: /tmp diff --git a/charts/ocis/templates/app-provider/service.yaml b/charts/ocis/templates/app-provider/service.yaml index 0d7523082..12907c379 100644 --- a/charts/ocis/templates/app-provider/service.yaml +++ b/charts/ocis/templates/app-provider/service.yaml @@ -5,17 +5,22 @@ apiVersion: v1 kind: Service metadata: - name: app-provider-{{ regexReplaceAll "\\W+" (lower $officeSuite.name) "_" }} + name: app-provider-{{ regexReplaceAll "\\W+" (lower $officeSuite.name) "_" }} namespace: {{ template "ocis.namespace" $ }} labels: + app: app-provider-{{ regexReplaceAll "\\W+" (lower $officeSuite.name) "_" }} + ocis-metrics: enabled {{- include "ocis.labels" $ | nindent 4 }} spec: + selector: + app: app-provider-{{ regexReplaceAll "\\W+" (lower $officeSuite.name) "_" }} ports: - name: grpc port: 9164 protocol: TCP - selector: - app: app-provider-{{ regexReplaceAll "\\W+" (lower $officeSuite.name) "_" }} + - name: metrics-debug + port: 9165 + protocol: TCP {{ end }} {{ end }} {{ end }} diff --git a/charts/ocis/templates/app-registry/deployment.yaml b/charts/ocis/templates/app-registry/deployment.yaml index 51c014245..ac85852b6 100644 --- a/charts/ocis/templates/app-registry/deployment.yaml +++ b/charts/ocis/templates/app-registry/deployment.yaml @@ -47,8 +47,13 @@ spec: - name: APP_REGISTRY_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: APP_REGISTRY_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: APP_REGISTRY_GRPC_ADDR value: 0.0.0.0:9242 + - name: APP_REGISTRY_DEBUG_ADDR + value: 0.0.0.0:9243 - name: REVA_GATEWAY value: gateway:9142 @@ -63,6 +68,8 @@ spec: ports: - name: http containerPort: 9242 + - name: metrics-debug + containerPort: 9243 volumeMounts: - name: tmp-volume mountPath: /tmp diff --git a/charts/ocis/templates/app-registry/service.yaml b/charts/ocis/templates/app-registry/service.yaml index 10a310a4a..f0a3adc3d 100644 --- a/charts/ocis/templates/app-registry/service.yaml +++ b/charts/ocis/templates/app-registry/service.yaml @@ -5,12 +5,17 @@ metadata: name: app-registry namespace: {{ template "ocis.namespace" . }} labels: + app: app-registry + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: app-registry ports: - name: grpc port: 9242 protocol: TCP - selector: - app: app-registry + - name: metrics-debug + port: 9243 + protocol: TCP {{ end }} diff --git a/charts/ocis/templates/auth-basic/deployment.yaml b/charts/ocis/templates/auth-basic/deployment.yaml index ee523993b..407e7cfb1 100644 --- a/charts/ocis/templates/auth-basic/deployment.yaml +++ b/charts/ocis/templates/auth-basic/deployment.yaml @@ -47,8 +47,13 @@ spec: - name: AUTH_BASIC_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: AUTH_BASIC_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: AUTH_BASIC_GRPC_ADDR value: 0.0.0.0:9146 + - name: AUTH_BASIC_DEBUG_ADDR + value: 0.0.0.0:9147 - name: REVA_GATEWAY value: gateway:9142 @@ -149,8 +154,10 @@ spec: resources: {{ toYaml .Values.resources | nindent 12 }} ports: - - name: grpc - containerPort: 9146 + - name: grpc + containerPort: 9146 + - name: metrics-debug + containerPort: 9147 volumeMounts: - name: ocis-config-tmp mountPath: /etc/ocis # we mount that volume only to apply fsGroup to that path diff --git a/charts/ocis/templates/auth-basic/service.yaml b/charts/ocis/templates/auth-basic/service.yaml index 2ca8ab02c..7021f01ab 100644 --- a/charts/ocis/templates/auth-basic/service.yaml +++ b/charts/ocis/templates/auth-basic/service.yaml @@ -5,12 +5,17 @@ metadata: name: auth-basic namespace: {{ template "ocis.namespace" . }} labels: + app: auth-basic + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: auth-basic ports: - name: grpc port: 9146 protocol: TCP - selector: - app: auth-basic + - name: metrics-debug + port: 9147 + protocol: TCP {{ end }} diff --git a/charts/ocis/templates/auth-machine/deployment.yaml b/charts/ocis/templates/auth-machine/deployment.yaml index 758830104..dc8c09085 100644 --- a/charts/ocis/templates/auth-machine/deployment.yaml +++ b/charts/ocis/templates/auth-machine/deployment.yaml @@ -46,8 +46,13 @@ spec: - name: AUTH_MACHINE_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: AUTH_MACHINE_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: AUTH_MACHINE_GRPC_ADDR value: 0.0.0.0:9166 + - name: AUTH_MACHINE_DEBUG_ADDR + value: 0.0.0.0:9167 - name: REVA_GATEWAY value: gateway:9142 @@ -68,6 +73,8 @@ spec: ports: - name: grpc containerPort: 9166 + - name: metrics-debug + containerPort: 9167 volumeMounts: - name: tmp-volume mountPath: /tmp diff --git a/charts/ocis/templates/auth-machine/service.yaml b/charts/ocis/templates/auth-machine/service.yaml index cc2df785e..e8ed9f6e6 100644 --- a/charts/ocis/templates/auth-machine/service.yaml +++ b/charts/ocis/templates/auth-machine/service.yaml @@ -4,11 +4,16 @@ metadata: name: auth-machine namespace: {{ template "ocis.namespace" . }} labels: + app: auth-machine + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: auth-machine ports: - name: grpc port: 9166 protocol: TCP - selector: - app: auth-machine + - name: metrics-debug + port: 9167 + protocol: TCP diff --git a/charts/ocis/templates/frontend/deployment.yaml b/charts/ocis/templates/frontend/deployment.yaml index 041138f29..130fd3558 100644 --- a/charts/ocis/templates/frontend/deployment.yaml +++ b/charts/ocis/templates/frontend/deployment.yaml @@ -46,8 +46,14 @@ spec: - name: FRONTEND_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: FRONTEND_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: FRONTEND_HTTP_ADDR value: 0.0.0.0:9140 + - name: FRONTEND_DEBUG_ADDR + value: 0.0.0.0:9141 + - name: FRONTEND_PUBLIC_URL value: "https://{{ .Values.externalDomain }}" @@ -80,8 +86,10 @@ spec: resources: {{ toYaml .Values.resources | nindent 12 }} ports: - - name: http - containerPort: 9140 + - name: http + containerPort: 9140 + - name: metrics-debug + containerPort: 9141 volumeMounts: - name: tmp-volume mountPath: /tmp diff --git a/charts/ocis/templates/frontend/service.yaml b/charts/ocis/templates/frontend/service.yaml index 5aafc079d..1b0294a95 100644 --- a/charts/ocis/templates/frontend/service.yaml +++ b/charts/ocis/templates/frontend/service.yaml @@ -4,11 +4,16 @@ metadata: name: frontend namespace: {{ template "ocis.namespace" . }} labels: + app: frontend + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: frontend ports: - name: http port: 9140 protocol: TCP - selector: - app: frontend + - name: metrics-debug + port: 9141 + protocol: TCP diff --git a/charts/ocis/templates/gateway/deployment.yaml b/charts/ocis/templates/gateway/deployment.yaml index 07f4ded7c..6d03ebe32 100644 --- a/charts/ocis/templates/gateway/deployment.yaml +++ b/charts/ocis/templates/gateway/deployment.yaml @@ -46,8 +46,13 @@ spec: - name: GATEWAY_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: GATEWAY_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: GATEWAY_GRPC_ADDR value: 0.0.0.0:9142 + - name: GATEWAY_DEBUG_ADDR + value: 0.0.0.0:9143 - name: REVA_GATEWAY # we also could have gateway:9142 here, but some @@ -99,6 +104,8 @@ spec: ports: - name: grpc containerPort: 9142 + - name: metrics-debug + containerPort: 9143 volumeMounts: - name: tmp-volume mountPath: /tmp diff --git a/charts/ocis/templates/gateway/service.yaml b/charts/ocis/templates/gateway/service.yaml index 5ef2a2881..35548a1f8 100644 --- a/charts/ocis/templates/gateway/service.yaml +++ b/charts/ocis/templates/gateway/service.yaml @@ -4,11 +4,16 @@ metadata: name: gateway namespace: {{ template "ocis.namespace" . }} labels: + app: gateway + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: gateway ports: - name: grpc port: 9142 protocol: TCP - selector: - app: gateway + - name: metrics-debug + port: 9143 + protocol: TCP diff --git a/charts/ocis/templates/graph/deployment.yaml b/charts/ocis/templates/graph/deployment.yaml index 707692440..795e46e73 100644 --- a/charts/ocis/templates/graph/deployment.yaml +++ b/charts/ocis/templates/graph/deployment.yaml @@ -46,8 +46,13 @@ spec: - name: GRAPH_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: GRAPH_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: GRAPH_HTTP_ADDR value: 0.0.0.0:9120 + - name: GRAPH_DEBUG_ADDR + value: 0.0.0.0:9124 - name: GRAPH_SPACES_WEBDAV_BASE value: "https://{{ .Values.externalDomain }}" @@ -83,6 +88,8 @@ spec: ports: - name: http containerPort: 9120 + - name: metrics-debug + containerPort: 9124 {{ if not .Values.features.externalUserManagement.enabled }} volumeMounts: - name: ocis-config-tmp diff --git a/charts/ocis/templates/graph/service.yaml b/charts/ocis/templates/graph/service.yaml index d6a325c0a..39e2d093a 100644 --- a/charts/ocis/templates/graph/service.yaml +++ b/charts/ocis/templates/graph/service.yaml @@ -4,11 +4,16 @@ metadata: name: graph namespace: {{ template "ocis.namespace" . }} labels: + app: graph + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: graph ports: - name: http port: 9120 protocol: TCP - selector: - app: graph + - name: metrics-debug + port: 9124 + protocol: TCP diff --git a/charts/ocis/templates/groups/deployment.yaml b/charts/ocis/templates/groups/deployment.yaml index b826f52b4..a7b02ddf9 100644 --- a/charts/ocis/templates/groups/deployment.yaml +++ b/charts/ocis/templates/groups/deployment.yaml @@ -46,8 +46,13 @@ spec: - name: GROUPS_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: GROUPS_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: GROUPS_GRPC_ADDR value: 0.0.0.0:9160 + - name: GROUPS_DEBUG_ADDR + value: 0.0.0.0:9161 {{- if .Values.features.externalUserManagement.enabled }} - name: GROUPS_LDAP_INSECURE @@ -149,6 +154,8 @@ spec: ports: - name: grpc containerPort: 9160 + - name: metrics-debug + containerPort: 9161 volumeMounts: - name: ocis-config-tmp mountPath: /etc/ocis # we mount that volume only to apply fsGroup to that path diff --git a/charts/ocis/templates/groups/service.yaml b/charts/ocis/templates/groups/service.yaml index e6a97e0af..3e82b009d 100644 --- a/charts/ocis/templates/groups/service.yaml +++ b/charts/ocis/templates/groups/service.yaml @@ -4,11 +4,16 @@ metadata: name: groups namespace: {{ template "ocis.namespace" . }} labels: + app: groups + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: groups ports: - name: grpc port: 9160 protocol: TCP - selector: - app: groups + - name: metrics-debug + port: 9161 + protocol: TCP diff --git a/charts/ocis/templates/idm/service.yaml b/charts/ocis/templates/idm/service.yaml index e39ad34b0..f3275847b 100644 --- a/charts/ocis/templates/idm/service.yaml +++ b/charts/ocis/templates/idm/service.yaml @@ -5,12 +5,13 @@ metadata: name: idm namespace: {{ template "ocis.namespace" . }} labels: + app: idm {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: idm ports: - name: ldaps port: 9235 protocol: TCP - selector: - app: idm {{- end }} diff --git a/charts/ocis/templates/idp/service.yaml b/charts/ocis/templates/idp/service.yaml index 869c09ab5..27c48e66e 100644 --- a/charts/ocis/templates/idp/service.yaml +++ b/charts/ocis/templates/idp/service.yaml @@ -5,12 +5,13 @@ metadata: name: idp namespace: {{ template "ocis.namespace" . }} labels: + app: idp {{- include "ocis.labels" . | nindent 4 }} spec: - ports: - - name: http - port: 9130 - protocol: TCP selector: app: idp + ports: + - name: http + port: 9130 + protocol: TCP {{- end }} diff --git a/charts/ocis/templates/nats/service.yaml b/charts/ocis/templates/nats/service.yaml index 7b88daa5f..3079ab732 100644 --- a/charts/ocis/templates/nats/service.yaml +++ b/charts/ocis/templates/nats/service.yaml @@ -4,11 +4,12 @@ metadata: name: nats namespace: {{ template "ocis.namespace" . }} labels: + app: nats {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: nats ports: - name: nats port: 9233 protocol: TCP - selector: - app: nats diff --git a/charts/ocis/templates/ocdav/deployment.yaml b/charts/ocis/templates/ocdav/deployment.yaml index 9ad3f5d98..b120c7c1d 100644 --- a/charts/ocis/templates/ocdav/deployment.yaml +++ b/charts/ocis/templates/ocdav/deployment.yaml @@ -46,8 +46,13 @@ spec: - name: OCDAV_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: OCDAV_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: OCDAV_HTTP_ADDR value: 0.0.0.0:8080 + - name: OCDAV_DEBUG_ADDR + value: 0.0.0.0:9163 - name: OCDAV_PUBLIC_URL value: https://{{ .Values.externalDomain }} @@ -74,3 +79,5 @@ spec: ports: - name: http containerPort: 8080 + - name: metrics-debug + containerPort: 9163 diff --git a/charts/ocis/templates/ocdav/service.yaml b/charts/ocis/templates/ocdav/service.yaml index 6f41c0d8a..b9155d5d4 100644 --- a/charts/ocis/templates/ocdav/service.yaml +++ b/charts/ocis/templates/ocdav/service.yaml @@ -4,11 +4,16 @@ metadata: name: ocdav namespace: {{ template "ocis.namespace" . }} labels: + app: ocdav + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: ocdav ports: - name: http port: 8080 protocol: TCP - selector: - app: ocdav + - name: metrics-debug + port: 9163 + protocol: TCP diff --git a/charts/ocis/templates/ocs/deployment.yaml b/charts/ocis/templates/ocs/deployment.yaml index 2655011b3..4a2e6589e 100644 --- a/charts/ocis/templates/ocs/deployment.yaml +++ b/charts/ocis/templates/ocs/deployment.yaml @@ -46,8 +46,13 @@ spec: - name: OCS_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: OCS_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: OCS_HTTP_ADDR value: 0.0.0.0:9110 + - name: OCS_DEBUG_ADDR + value: 0.0.0.0:9114 - name: OCS_IDM_ADDRESS {{ if not .Values.features.externalUserManagement.enabled }} @@ -73,5 +78,7 @@ spec: resources: {{ toYaml .Values.resources | nindent 12 }} ports: - - name: http - containerPort: 9110 + - name: http + containerPort: 9110 + - name: metrics-debug + containerPort: 9114 diff --git a/charts/ocis/templates/ocs/service.yaml b/charts/ocis/templates/ocs/service.yaml index 84ac43dff..5de9374c8 100644 --- a/charts/ocis/templates/ocs/service.yaml +++ b/charts/ocis/templates/ocs/service.yaml @@ -4,11 +4,16 @@ metadata: name: ocs namespace: {{ template "ocis.namespace" . }} labels: + app: ocs + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: ocs ports: - name: http port: 9110 protocol: TCP - selector: - app: ocs + - name: metrics-debug + port: 9114 + protocol: TCP diff --git a/charts/ocis/templates/proxy/deployment.yaml b/charts/ocis/templates/proxy/deployment.yaml index 5e183928f..dc6dd8ac0 100644 --- a/charts/ocis/templates/proxy/deployment.yaml +++ b/charts/ocis/templates/proxy/deployment.yaml @@ -48,8 +48,13 @@ spec: - name: PROXY_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: PROXY_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: PROXY_HTTP_ADDR value: 0.0.0.0:9200 + - name: PROXY_DEBUG_ADDR + value: 0.0.0.0:9205 - name: PROXY_ENABLE_BASIC_AUTH value: "{{ .Values.features.basicAuthentication }}" @@ -96,6 +101,8 @@ spec: ports: - name: http containerPort: 9200 + - name: metrics-debug + containerPort: 9205 volumeMounts: - name: configs mountPath: /etc/ocis diff --git a/charts/ocis/templates/proxy/service.yaml b/charts/ocis/templates/proxy/service.yaml index 23949c86f..15050d36b 100644 --- a/charts/ocis/templates/proxy/service.yaml +++ b/charts/ocis/templates/proxy/service.yaml @@ -1,15 +1,19 @@ -apiVersion: v1 -kind: Service -metadata: + +@@ -4,12 +4,17 @@ metadata: name: proxy namespace: {{ template "ocis.namespace" . }} labels: + app: proxy + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: selector: - app: proxy + app: proxy ports: - name: http protocol: TCP port: 9200 targetPort: 9200 + - name: metrics-debug + port: 9205 + protocol: TCP diff --git a/charts/ocis/templates/search/deployment.yaml b/charts/ocis/templates/search/deployment.yaml index e64f47ea1..a109dabec 100644 --- a/charts/ocis/templates/search/deployment.yaml +++ b/charts/ocis/templates/search/deployment.yaml @@ -58,8 +58,13 @@ spec: - name: SEARCH_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: SEARCH_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: SEARCH_GRPC_ADDR value: 0.0.0.0:9220 + - name: SEARCH_DEBUG_ADDR + value: 0.0.0.0:9224 - name: REVA_GATEWAY value: gateway:9142 @@ -74,8 +79,10 @@ spec: resources: {{ toYaml .Values.resources | nindent 12 }} ports: - - name: grpc - containerPort: 9220 + - name: grpc + containerPort: 9220 + - name: metrics-debug + containerPort: 9224 volumeMounts: - name: search-data mountPath: /var/lib/ocis diff --git a/charts/ocis/templates/search/service.yaml b/charts/ocis/templates/search/service.yaml index 7bf1f9c54..5d1db017b 100644 --- a/charts/ocis/templates/search/service.yaml +++ b/charts/ocis/templates/search/service.yaml @@ -6,9 +6,12 @@ metadata: labels: {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: search ports: - name: grpc port: 9220 protocol: TCP - selector: - app: search + - name: metrics-debug + port: 9224 + protocol: TCP diff --git a/charts/ocis/templates/settings/deployment.yaml b/charts/ocis/templates/settings/deployment.yaml index c87099d0c..0542e5bdd 100644 --- a/charts/ocis/templates/settings/deployment.yaml +++ b/charts/ocis/templates/settings/deployment.yaml @@ -46,10 +46,15 @@ spec: - name: SETTINGS_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: SETTINGS_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: SETTINGS_HTTP_ADDR value: 0.0.0.0:9190 - name: SETTINGS_GRPC_ADDR value: 0.0.0.0:9191 + - name: SETTINGS_DEBUG_ADDR + value: 0.0.0.0:9194 - name: STORAGE_GATEWAY_GRPC_ADDR value: storage-system:9215 @@ -85,3 +90,5 @@ spec: containerPort: 9190 - name: grpc containerPort: 9191 + - name: metrics-debug + containerPort: 9194 diff --git a/charts/ocis/templates/settings/service.yaml b/charts/ocis/templates/settings/service.yaml index 9707ad680..943305d50 100644 --- a/charts/ocis/templates/settings/service.yaml +++ b/charts/ocis/templates/settings/service.yaml @@ -4,8 +4,12 @@ metadata: name: settings namespace: {{ template "ocis.namespace" . }} labels: + app: settings + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: settings ports: - name: grpc port: 9191 @@ -13,5 +17,6 @@ spec: - name: http port: 9190 protocol: TCP - selector: - app: settings + - name: metrics-debug + port: 9194 + protocol: TCP diff --git a/charts/ocis/templates/sharing/deployment.yaml b/charts/ocis/templates/sharing/deployment.yaml index d222d0466..85ff81421 100644 --- a/charts/ocis/templates/sharing/deployment.yaml +++ b/charts/ocis/templates/sharing/deployment.yaml @@ -46,8 +46,13 @@ spec: - name: SHARING_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: SHARING_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: SHARING_GRPC_ADDR value: 0.0.0.0:9150 + - name: SHARING_DEBUG_ADDR + value: 0.0.0.0:9151 - name: REVA_GATEWAY value: gateway:9142 @@ -96,6 +101,8 @@ spec: ports: - name: grpc containerPort: 9150 + - name: metrics-debug + containerPort: 9151 volumeMounts: - name: tmp-volume mountPath: /tmp diff --git a/charts/ocis/templates/sharing/service.yaml b/charts/ocis/templates/sharing/service.yaml index 79b60bec4..631b73ae0 100644 --- a/charts/ocis/templates/sharing/service.yaml +++ b/charts/ocis/templates/sharing/service.yaml @@ -4,11 +4,16 @@ metadata: name: sharing namespace: {{ template "ocis.namespace" . }} labels: + app: sharing + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: sharing ports: - name: grpc port: 9150 protocol: TCP - selector: - app: sharing + - name: metrics-debug + port: 9151 + protocol: TCP diff --git a/charts/ocis/templates/storage-publiclink/deployment.yaml b/charts/ocis/templates/storage-publiclink/deployment.yaml index 5f11c58ca..6b9a6c785 100644 --- a/charts/ocis/templates/storage-publiclink/deployment.yaml +++ b/charts/ocis/templates/storage-publiclink/deployment.yaml @@ -46,8 +46,13 @@ spec: - name: STORAGE_PUBLICLINK_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: STORAGE_PUBLICLINK_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: STORAGE_PUBLICLINK_GRPC_ADDR value: 0.0.0.0:9178 + - name: STORAGE_PUBLICLINK_DEBUG_ADDR + value: 0.0.0.0:9179 - name: REVA_GATEWAY value: gateway:9142 @@ -60,8 +65,10 @@ spec: resources: {{ toYaml .Values.resources | nindent 12 }} ports: - - name: grpc - containerPort: 9178 + - name: grpc + containerPort: 9178 + - name: metrics-debug + containerPort: 9179 volumeMounts: - name: tmp-volume mountPath: /tmp diff --git a/charts/ocis/templates/storage-publiclink/service.yaml b/charts/ocis/templates/storage-publiclink/service.yaml index 85e8d9c2f..a2587fdaa 100644 --- a/charts/ocis/templates/storage-publiclink/service.yaml +++ b/charts/ocis/templates/storage-publiclink/service.yaml @@ -4,11 +4,16 @@ metadata: name: storage-publiclink namespace: {{ template "ocis.namespace" . }} labels: + app: storage-publiclink + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: storage-publiclink ports: - name: grpc port: 9178 protocol: TCP - selector: - app: storage-publiclink + - name: metrics-debug + port: 9179 + protocol: TCP diff --git a/charts/ocis/templates/storage-shares/deployment.yaml b/charts/ocis/templates/storage-shares/deployment.yaml index aad86af50..35acb5953 100644 --- a/charts/ocis/templates/storage-shares/deployment.yaml +++ b/charts/ocis/templates/storage-shares/deployment.yaml @@ -46,8 +46,13 @@ spec: - name: STORAGE_SHARES_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: STORAGE_SHARES_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: STORAGE_SHARES_GRPC_ADDR value: 0.0.0.0:9154 + - name: STORAGE_SHARES_DEBUG_ADDR + value: 0.0.0.0:9156 - name: STORAGE_SHARES_USER_SHARE_PROVIDER_ENDPOINT value: sharing:9150 @@ -65,6 +70,8 @@ spec: ports: - name: grpc containerPort: 9154 + - name: metrics-debug + containerPort: 9156 volumeMounts: - name: tmp-volume mountPath: /tmp diff --git a/charts/ocis/templates/storage-shares/service.yaml b/charts/ocis/templates/storage-shares/service.yaml index 68788f8ed..21916bffc 100644 --- a/charts/ocis/templates/storage-shares/service.yaml +++ b/charts/ocis/templates/storage-shares/service.yaml @@ -4,11 +4,16 @@ metadata: name: storage-shares namespace: {{ template "ocis.namespace" . }} labels: + app: storage-shares + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: storage-shares ports: - name: grpc port: 9154 protocol: TCP - selector: - app: storage-shares + - name: metrics-debug + port: 9156 + protocol: TCP diff --git a/charts/ocis/templates/storage-system/deployment.yaml b/charts/ocis/templates/storage-system/deployment.yaml index 68da37db2..ceaa3eac7 100644 --- a/charts/ocis/templates/storage-system/deployment.yaml +++ b/charts/ocis/templates/storage-system/deployment.yaml @@ -59,9 +59,14 @@ spec: - name: STORAGE_SYSTEM_LOG_PRETTY value: "{{ .Values.logging.pretty }}" - # external availability grpc + - name: STORAGE_SYSTEM_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + + # bind configuration - name: STORAGE_SYSTEM_GRPC_ADDR value: 0.0.0.0:9215 + - name: STORAGE_SYSTEM_DEBUG_ADDR + value: 0.0.0.0:9217 # external availability data gateway - name: STORAGE_SYSTEM_HTTP_ADDR @@ -96,6 +101,8 @@ spec: containerPort: 9215 - name: http containerPort: 9216 + - name: metrics-debug + containerPort: 9217 volumeMounts: - name: tmp-volume mountPath: /tmp diff --git a/charts/ocis/templates/storage-system/service.yaml b/charts/ocis/templates/storage-system/service.yaml index 75a7b97ce..46db3c92f 100644 --- a/charts/ocis/templates/storage-system/service.yaml +++ b/charts/ocis/templates/storage-system/service.yaml @@ -4,8 +4,12 @@ metadata: name: storage-system namespace: {{ template "ocis.namespace" . }} labels: + app: storage-system + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: storage-system ports: - name: grpc port: 9215 @@ -13,5 +17,6 @@ spec: - name: http port: 9216 protocol: TCP - selector: - app: storage-system + - name: metrics-debug + port: 9217 + protocol: TCP diff --git a/charts/ocis/templates/storage-users/deployment.yaml b/charts/ocis/templates/storage-users/deployment.yaml index 51abfc70b..13ebc8ce6 100644 --- a/charts/ocis/templates/storage-users/deployment.yaml +++ b/charts/ocis/templates/storage-users/deployment.yaml @@ -59,9 +59,14 @@ spec: - name: STORAGE_USERS_LOG_PRETTY value: "{{ .Values.logging.pretty }}" - # external availability grpc + - name: STORAGE_USERS_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + + # bind config - name: STORAGE_USERS_GRPC_ADDR value: 0.0.0.0:9157 + - name: STORAGE_USERS_DEBUG_ADDR + value: 0.0.0.0:9159 # external availability data gateway - name: STORAGE_USERS_HTTP_ADDR @@ -119,6 +124,8 @@ spec: containerPort: 9157 - name: http containerPort: 9158 + - name: metrics-debug + containerPort: 9159 volumeMounts: - name: tmp-volume mountPath: /tmp diff --git a/charts/ocis/templates/storage-users/service.yaml b/charts/ocis/templates/storage-users/service.yaml index d2e34cbdf..03da278ba 100644 --- a/charts/ocis/templates/storage-users/service.yaml +++ b/charts/ocis/templates/storage-users/service.yaml @@ -4,8 +4,12 @@ metadata: name: storage-users namespace: {{ template "ocis.namespace" . }} labels: + app: storage-users + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: storage-users ports: - name: grpc port: 9157 @@ -13,5 +17,6 @@ spec: - name: http port: 9158 protocol: TCP - selector: - app: storage-users + - name: metrics-debug + port: 9159 + protocol: TCP diff --git a/charts/ocis/templates/store/deployment.yaml b/charts/ocis/templates/store/deployment.yaml index a429c8c0b..4568f34bc 100644 --- a/charts/ocis/templates/store/deployment.yaml +++ b/charts/ocis/templates/store/deployment.yaml @@ -60,12 +60,20 @@ spec: - name: STORE_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: STORE_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: STORE_GRPC_ADDR value: 0.0.0.0:9460 + - name: STORE_DEBUG_ADDR + value: 0.0.0.0:9464 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: grpc containerPort: 9460 + - name: metrics-debug + containerPort: 9464 volumeMounts: - name: store-data mountPath: /var/lib/ocis diff --git a/charts/ocis/templates/store/service.yaml b/charts/ocis/templates/store/service.yaml index e3a00ea77..c6c0fe325 100644 --- a/charts/ocis/templates/store/service.yaml +++ b/charts/ocis/templates/store/service.yaml @@ -4,11 +4,16 @@ metadata: name: store namespace: {{ template "ocis.namespace" . }} labels: + app: store + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: store ports: - name: grpc port: 9460 protocol: TCP - selector: - app: store + - name: metrics-debug + port: 9464 + protocol: TCP diff --git a/charts/ocis/templates/thumbnails/deployment.yaml b/charts/ocis/templates/thumbnails/deployment.yaml index b45ede523..b1e7fdfd8 100644 --- a/charts/ocis/templates/thumbnails/deployment.yaml +++ b/charts/ocis/templates/thumbnails/deployment.yaml @@ -58,10 +58,15 @@ spec: - name: THUMBNAILS_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: THUMBNAILS_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: THUMBNAILS_GRPC_ADDR value: 0.0.0.0:9185 - name: THUMBNAILS_HTTP_ADDR value: 0.0.0.0:9186 + - name: THUMBNAILS_DEBUG_ADDR + value: 0.0.0.0:9189 - name: THUMBNAILS_DATA_ENDPOINT value: http://thumbnails:9186/thumbnails/data @@ -87,6 +92,8 @@ spec: containerPort: 9185 - name: http containerPort: 9186 + - name: metrics-debug + containerPort: 9189 volumeMounts: - name: thumbnails-data mountPath: /var/lib/ocis diff --git a/charts/ocis/templates/thumbnails/service.yaml b/charts/ocis/templates/thumbnails/service.yaml index e8d29ad85..7236bb318 100644 --- a/charts/ocis/templates/thumbnails/service.yaml +++ b/charts/ocis/templates/thumbnails/service.yaml @@ -4,8 +4,12 @@ metadata: name: thumbnails namespace: {{ template "ocis.namespace" . }} labels: + app: thumbnails + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: thumbnails ports: - name: grpc port: 9185 @@ -13,5 +17,6 @@ spec: - name: http port: 9186 protocol: TCP - selector: - app: thumbnails + - name: metrics-debug + port: 9189 + protocol: TCP diff --git a/charts/ocis/templates/users/deployment.yaml b/charts/ocis/templates/users/deployment.yaml index 5b5cc4d60..a45aa0444 100644 --- a/charts/ocis/templates/users/deployment.yaml +++ b/charts/ocis/templates/users/deployment.yaml @@ -46,8 +46,13 @@ spec: - name: USERS_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: USERS_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: USERS_GRPC_ADDR value: 0.0.0.0:9144 + - name: USERS_DEBUG_ADDR + value: 0.0.0.0:9145 {{- if .Values.features.externalUserManagement.enabled }} - name: USERS_LDAP_INSECURE @@ -149,6 +154,8 @@ spec: ports: - name: grpc containerPort: 9144 + - name: metrics-debug + containerPort: 9145 volumeMounts: - name: ocis-config-tmp mountPath: /etc/ocis # we mount that volume only to apply fsGroup to that path diff --git a/charts/ocis/templates/users/service.yaml b/charts/ocis/templates/users/service.yaml index 41a1d808d..93ff7a706 100644 --- a/charts/ocis/templates/users/service.yaml +++ b/charts/ocis/templates/users/service.yaml @@ -4,11 +4,16 @@ metadata: name: users namespace: {{ template "ocis.namespace" . }} labels: + app: users + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: users ports: - name: grpc port: 9144 protocol: TCP - selector: - app: users + - name: metrics-debug + port: 9145 + protocol: TCP diff --git a/charts/ocis/templates/web/deployment.yaml b/charts/ocis/templates/web/deployment.yaml index 36df6498d..1b600ce9b 100644 --- a/charts/ocis/templates/web/deployment.yaml +++ b/charts/ocis/templates/web/deployment.yaml @@ -46,8 +46,13 @@ spec: - name: WEB_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: WEB_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: WEB_HTTP_ADDR value: 0.0.0.0:9100 + - name: WEB_DEBUG_ADDR + value: 0.0.0.0:9104 - name: WEB_OIDC_AUTHORITY {{ if not .Values.features.externalUserManagement.enabled }} @@ -65,3 +70,5 @@ spec: ports: - name: http containerPort: 9100 + - name: metrics-debug + containerPort: 9104 diff --git a/charts/ocis/templates/web/service.yaml b/charts/ocis/templates/web/service.yaml index e7a11c31c..b1ddae213 100644 --- a/charts/ocis/templates/web/service.yaml +++ b/charts/ocis/templates/web/service.yaml @@ -4,11 +4,16 @@ metadata: name: web namespace: {{ template "ocis.namespace" . }} labels: + app: web + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: web ports: - name: http port: 9100 protocol: TCP - selector: - app: web + - name: metrics-debug + port: 9104 + protocol: TCP diff --git a/charts/ocis/templates/webdav/deployment.yaml b/charts/ocis/templates/webdav/deployment.yaml index 70d897d34..29cd23b41 100644 --- a/charts/ocis/templates/webdav/deployment.yaml +++ b/charts/ocis/templates/webdav/deployment.yaml @@ -46,8 +46,13 @@ spec: - name: WEBDAV_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: WEBDAV_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: WEBDAV_HTTP_ADDR value: 0.0.0.0:9115 + - name: WEBDAV_DEBUG_ADDR + value: 0.0.0.0:9119 - name: OCIS_PUBLIC_URL value: "https://{{ .Values.externalDomain }}" @@ -58,3 +63,5 @@ spec: ports: - name: http containerPort: 9115 + - name: metrics-debug + containerPort: 9119 diff --git a/charts/ocis/templates/webdav/service.yaml b/charts/ocis/templates/webdav/service.yaml index d64206c21..8e580d09f 100644 --- a/charts/ocis/templates/webdav/service.yaml +++ b/charts/ocis/templates/webdav/service.yaml @@ -4,11 +4,16 @@ metadata: name: webdav namespace: {{ template "ocis.namespace" . }} labels: + app: webdav + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: + selector: + app: webdav ports: - name: http port: 9115 protocol: TCP - selector: - app: webdav + - name: metrics-debug + port: 9119 + protocol: TCP diff --git a/charts/ocis/values.yaml b/charts/ocis/values.yaml index fba0bedb2..a9fa1cedf 100644 --- a/charts/ocis/values.yaml +++ b/charts/ocis/values.yaml @@ -22,6 +22,13 @@ logging: # Not recommended for production installations. color: "false" +# Debug settings for the oCIS service +debug: + # -- Profiling enables the http://:/debug/pprof endpoint to inspect various Go runtime internals. + # You can use the endpoint on your machine by forwarding the port, eg: `kubectl port-forward -n ocis pod/auth-basic-8587dc9d64-fs24l 9147:9147` + # and then accessing the port on https://localhost:9147/debug/pprof or using the pprof command line tool: `go tool pprof -web http://localhost:9147/debug/pprof/symbol\?seconds\=10` + profiling: false + # -- Deployment strategy. deploymentStrategy: type: RollingUpdate From b88d2c586ffd9157939233620b27392c268245dd Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Fri, 7 Oct 2022 06:44:22 +0200 Subject: [PATCH 2/4] Add liveness probes where possible IDM and NAT don't provide any debug service/port so use a simple TCP check on the main port. Notifications and Audit do currently not provide a debug port either. As they are not listening on any port by default we don't currently implement a useful liveness probe for them. --- .../templates/app-provider/deployment.yaml | 11 +++++++++ .../templates/app-registry/deployment.yaml | 9 +++++++ .../ocis/templates/auth-basic/deployment.yaml | 9 +++++++ .../templates/auth-machine/deployment.yaml | 9 +++++++ .../ocis/templates/frontend/deployment.yaml | 9 +++++++ charts/ocis/templates/gateway/deployment.yaml | 9 +++++++ charts/ocis/templates/graph/deployment.yaml | 9 +++++++ charts/ocis/templates/groups/deployment.yaml | 9 +++++++ charts/ocis/templates/idm/deployment.yaml | 21 ++++++++++++++++ charts/ocis/templates/idm/service.yaml | 5 ++++ charts/ocis/templates/idp/deployment.yaml | 16 +++++++++++++ charts/ocis/templates/idp/service.yaml | 5 ++++ charts/ocis/templates/nats/deployment.yaml | 24 +++++++++++++++++++ charts/ocis/templates/nats/service.yaml | 5 ++++ .../templates/notifications/deployment.yaml | 21 ++++++++++++++++ charts/ocis/templates/ocdav/deployment.yaml | 9 +++++++ charts/ocis/templates/ocs/deployment.yaml | 9 +++++++ charts/ocis/templates/proxy/deployment.yaml | 9 +++++++ charts/ocis/templates/proxy/service.yaml | 5 ++-- charts/ocis/templates/search/deployment.yaml | 9 +++++++ charts/ocis/templates/search/service.yaml | 2 ++ .../ocis/templates/settings/deployment.yaml | 9 +++++++ charts/ocis/templates/sharing/deployment.yaml | 9 +++++++ .../storage-publiclink/deployment.yaml | 9 +++++++ .../templates/storage-shares/deployment.yaml | 9 +++++++ .../templates/storage-system/deployment.yaml | 9 +++++++ .../templates/storage-users/deployment.yaml | 9 +++++++ charts/ocis/templates/store/deployment.yaml | 9 +++++++ .../ocis/templates/thumbnails/deployment.yaml | 9 +++++++ charts/ocis/templates/users/deployment.yaml | 9 +++++++ charts/ocis/templates/web/deployment.yaml | 10 ++++++++ charts/ocis/templates/webdav/deployment.yaml | 9 +++++++ 32 files changed, 312 insertions(+), 2 deletions(-) diff --git a/charts/ocis/templates/app-provider/deployment.yaml b/charts/ocis/templates/app-provider/deployment.yaml index 4c1ba7682..f81c4401f 100644 --- a/charts/ocis/templates/app-provider/deployment.yaml +++ b/charts/ocis/templates/app-provider/deployment.yaml @@ -81,6 +81,17 @@ spec: name: {{ $.Values.secretRefs.jwtSecretRef }} key: jwt-secret + livenessProbe: + exec: + command: + - /bin/sh + - -c + - curl --silent --fail http://frontend:9140/app/list | grep {{ $officeSuite.name }} + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml $.Values.resources | nindent 12 }} ports: - name: grpc diff --git a/charts/ocis/templates/app-registry/deployment.yaml b/charts/ocis/templates/app-registry/deployment.yaml index ac85852b6..62e5a5f10 100644 --- a/charts/ocis/templates/app-registry/deployment.yaml +++ b/charts/ocis/templates/app-registry/deployment.yaml @@ -64,6 +64,15 @@ spec: name: {{ .Values.secretRefs.jwtSecretRef }} key: jwt-secret + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: http diff --git a/charts/ocis/templates/auth-basic/deployment.yaml b/charts/ocis/templates/auth-basic/deployment.yaml index 407e7cfb1..643e37e1b 100644 --- a/charts/ocis/templates/auth-basic/deployment.yaml +++ b/charts/ocis/templates/auth-basic/deployment.yaml @@ -152,6 +152,15 @@ spec: name: {{ .Values.secretRefs.jwtSecretRef }} key: jwt-secret + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: grpc diff --git a/charts/ocis/templates/auth-machine/deployment.yaml b/charts/ocis/templates/auth-machine/deployment.yaml index dc8c09085..625b8d6ac 100644 --- a/charts/ocis/templates/auth-machine/deployment.yaml +++ b/charts/ocis/templates/auth-machine/deployment.yaml @@ -69,6 +69,15 @@ spec: name: {{ .Values.secretRefs.machineAuthApiKeySecretRef }} key: machine-auth-api-key + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: grpc diff --git a/charts/ocis/templates/frontend/deployment.yaml b/charts/ocis/templates/frontend/deployment.yaml index 130fd3558..4fa8ced73 100644 --- a/charts/ocis/templates/frontend/deployment.yaml +++ b/charts/ocis/templates/frontend/deployment.yaml @@ -84,6 +84,15 @@ spec: name: {{ .Values.secretRefs.transferSecretSecretRef }} key: transfer-secret + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: http diff --git a/charts/ocis/templates/gateway/deployment.yaml b/charts/ocis/templates/gateway/deployment.yaml index 6d03ebe32..35f36b9de 100644 --- a/charts/ocis/templates/gateway/deployment.yaml +++ b/charts/ocis/templates/gateway/deployment.yaml @@ -100,6 +100,15 @@ spec: name: {{ .Values.secretRefs.transferSecretSecretRef }} key: transfer-secret + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: grpc diff --git a/charts/ocis/templates/graph/deployment.yaml b/charts/ocis/templates/graph/deployment.yaml index 795e46e73..9cd049677 100644 --- a/charts/ocis/templates/graph/deployment.yaml +++ b/charts/ocis/templates/graph/deployment.yaml @@ -84,6 +84,15 @@ spec: name: {{ .Values.secretRefs.jwtSecretRef }} key: jwt-secret + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: http diff --git a/charts/ocis/templates/groups/deployment.yaml b/charts/ocis/templates/groups/deployment.yaml index a7b02ddf9..9a25596d4 100644 --- a/charts/ocis/templates/groups/deployment.yaml +++ b/charts/ocis/templates/groups/deployment.yaml @@ -150,6 +150,15 @@ spec: name: {{ .Values.secretRefs.jwtSecretRef }} key: jwt-secret + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: grpc diff --git a/charts/ocis/templates/idm/deployment.yaml b/charts/ocis/templates/idm/deployment.yaml index 132bd2dcd..f6a00699f 100644 --- a/charts/ocis/templates/idm/deployment.yaml +++ b/charts/ocis/templates/idm/deployment.yaml @@ -68,8 +68,13 @@ spec: - name: IDM_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: IDM_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: IDM_LDAPS_ADDR value: 0.0.0.0:9235 + - name: IDM_DEBUG_ADDR + value: 0.0.0.0:9239 - name: IDM_CREATE_DEMO_USERS value: "{{ .Values.features.demoUsers }}" @@ -109,10 +114,26 @@ spec: - name: IDM_LDAPS_KEY value: /etc/ocis/ldap-cert/ldap.key + livenessProbe: + # TODO: IDM does not currently provide a debug port, re-enable this once that is implemented + # httpGet: + # path: /healthz + # port: metrics-debug + # until then we're just doing a TCP check on the main port + tcpSocket: + port: ldaps + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: ldaps containerPort: 9235 + # TODO: IDM does not currently provide a debug port, re-enable this once that is implemented + # - name: metrics-debug + # containerPort: 9239 volumeMounts: - name: ocis-config-tmp mountPath: /etc/ocis # we mount that volume only to apply fsGroup to that path diff --git a/charts/ocis/templates/idm/service.yaml b/charts/ocis/templates/idm/service.yaml index f3275847b..8410a2185 100644 --- a/charts/ocis/templates/idm/service.yaml +++ b/charts/ocis/templates/idm/service.yaml @@ -6,6 +6,7 @@ metadata: namespace: {{ template "ocis.namespace" . }} labels: app: idm + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: selector: @@ -14,4 +15,8 @@ spec: - name: ldaps port: 9235 protocol: TCP + # TODO: IDM does not currently provide a debug port, re-enable this once that is implemented + # - name: metrics-debug + # port: 9239 + # protocol: TCP {{- end }} diff --git a/charts/ocis/templates/idp/deployment.yaml b/charts/ocis/templates/idp/deployment.yaml index abeebfa87..04454d318 100644 --- a/charts/ocis/templates/idp/deployment.yaml +++ b/charts/ocis/templates/idp/deployment.yaml @@ -49,8 +49,13 @@ spec: - name: IDP_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: IDP_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: IDP_HTTP_ADDR value: 0.0.0.0:9130 + - name: IDP_DEBUG_ADDR + value: 0.0.0.0:9134 - name: IDP_ISS value: "https://{{ .Values.externalDomain }}" @@ -73,10 +78,21 @@ spec: - name: IDP_ENCRYPTION_SECRET_FILE value: /etc/ocis/idp/encryption.key + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: http containerPort: 9130 + - name: metrics-debug + containerPort: 9134 volumeMounts: - name: ocis-config-tmp mountPath: /etc/ocis # we mount that volume only to apply fsGroup to that path diff --git a/charts/ocis/templates/idp/service.yaml b/charts/ocis/templates/idp/service.yaml index 27c48e66e..2faf81fbe 100644 --- a/charts/ocis/templates/idp/service.yaml +++ b/charts/ocis/templates/idp/service.yaml @@ -6,6 +6,7 @@ metadata: namespace: {{ template "ocis.namespace" . }} labels: app: idp + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: selector: @@ -14,4 +15,8 @@ spec: - name: http port: 9130 protocol: TCP + - name: metrics-debug + port: 9134 + protocol: TCP + {{- end }} diff --git a/charts/ocis/templates/nats/deployment.yaml b/charts/ocis/templates/nats/deployment.yaml index 804e2008c..42bc398b4 100644 --- a/charts/ocis/templates/nats/deployment.yaml +++ b/charts/ocis/templates/nats/deployment.yaml @@ -52,14 +52,38 @@ spec: - name: NATS_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: NATS_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + - name: NATS_NATS_HOST value: "0.0.0.0" - name: NATS_NATS_PORT value: "9233" + + - name: NATS_DEBUG_ADDR + value: 0.0.0.0:9234 + + livenessProbe: + # TODO: NATS does not currently provide a debug port, re-enable this once that is implemented + # See: https://github.com/owncloud/ocis-charts/issues/111 + # httpGet: + # path: /healthz + # port: metrics-debug + # until then we're just doing a TCP check on the main port + tcpSocket: + port: 9233 + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: nats containerPort: 9233 + # TODO: NATS does not currently provide a debug port, re-enable this once that is implemented + # - name: metrics-debug + # containerPort: 9234 volumeMounts: - name: nats-data mountPath: /var/lib/ocis diff --git a/charts/ocis/templates/nats/service.yaml b/charts/ocis/templates/nats/service.yaml index 3079ab732..458880f63 100644 --- a/charts/ocis/templates/nats/service.yaml +++ b/charts/ocis/templates/nats/service.yaml @@ -5,6 +5,7 @@ metadata: namespace: {{ template "ocis.namespace" . }} labels: app: nats + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: selector: @@ -13,3 +14,7 @@ spec: - name: nats port: 9233 protocol: TCP + # TODO: NATS does not currently provide a debug port, re-enable this once that is implemented + # - name: metrics-debug + # port: 9234 + # protocol: TCP diff --git a/charts/ocis/templates/notifications/deployment.yaml b/charts/ocis/templates/notifications/deployment.yaml index ab9e62a78..bbf723331 100644 --- a/charts/ocis/templates/notifications/deployment.yaml +++ b/charts/ocis/templates/notifications/deployment.yaml @@ -44,6 +44,12 @@ spec: - name: NOTIFICATIONS_LOG_PRETTY value: "{{ .Values.logging.pretty }}" + - name: NOTIFICATIONS_DEBUG_PPROF + value: "{{ .Values.debug.profiling }}" + + - name: NOTIFICATIONS_DEBUG_ADDR + value: 0.0.0.0:9174 + - name: NOTIFICATIONS_SMTP_HOST value: "{{ .Values.features.emailNotifications.smtp.host }}" - name: NOTIFICATIONS_SMTP_PORT @@ -78,5 +84,20 @@ spec: name: {{ .Values.secretRefs.machineAuthApiKeySecretRef }} key: machine-auth-api-key + # TODO: This service does not currently provide a debug port, re-enable this once that is implemented + # See: https://github.com/owncloud/ocis-charts/issues/111 + # livenessProbe: + # httpGet: + # path: /healthz + # port: metrics-debug + # timeoutSeconds: 10 + # initialDelaySeconds: 60 + # periodSeconds: 20 + # failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} + # TODO: This service does not currently provide a debug port, re-enable this once that is implemented + # ports: + # - name: metrics-debug + # containerPort: 9174 {{- end }} diff --git a/charts/ocis/templates/ocdav/deployment.yaml b/charts/ocis/templates/ocdav/deployment.yaml index b120c7c1d..3c80e8c4f 100644 --- a/charts/ocis/templates/ocdav/deployment.yaml +++ b/charts/ocis/templates/ocdav/deployment.yaml @@ -75,6 +75,15 @@ spec: name: {{ .Values.secretRefs.machineAuthApiKeySecretRef }} key: machine-auth-api-key + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: http diff --git a/charts/ocis/templates/ocs/deployment.yaml b/charts/ocis/templates/ocs/deployment.yaml index 4a2e6589e..79d05a5b4 100644 --- a/charts/ocis/templates/ocs/deployment.yaml +++ b/charts/ocis/templates/ocs/deployment.yaml @@ -76,6 +76,15 @@ spec: name: {{ .Values.secretRefs.machineAuthApiKeySecretRef }} key: machine-auth-api-key + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: http diff --git a/charts/ocis/templates/proxy/deployment.yaml b/charts/ocis/templates/proxy/deployment.yaml index dc6dd8ac0..d4c1db00f 100644 --- a/charts/ocis/templates/proxy/deployment.yaml +++ b/charts/ocis/templates/proxy/deployment.yaml @@ -97,6 +97,15 @@ spec: name: {{ .Values.secretRefs.machineAuthApiKeySecretRef }} key: machine-auth-api-key + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: http diff --git a/charts/ocis/templates/proxy/service.yaml b/charts/ocis/templates/proxy/service.yaml index 15050d36b..b4f21f7cf 100644 --- a/charts/ocis/templates/proxy/service.yaml +++ b/charts/ocis/templates/proxy/service.yaml @@ -1,5 +1,6 @@ - -@@ -4,12 +4,17 @@ metadata: +apiVersion: v1 +kind: Service +metadata: name: proxy namespace: {{ template "ocis.namespace" . }} labels: diff --git a/charts/ocis/templates/search/deployment.yaml b/charts/ocis/templates/search/deployment.yaml index a109dabec..187ff9a19 100644 --- a/charts/ocis/templates/search/deployment.yaml +++ b/charts/ocis/templates/search/deployment.yaml @@ -77,6 +77,15 @@ spec: name: {{ .Values.secretRefs.machineAuthApiKeySecretRef }} key: machine-auth-api-key + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: grpc diff --git a/charts/ocis/templates/search/service.yaml b/charts/ocis/templates/search/service.yaml index 5d1db017b..3167c69ae 100644 --- a/charts/ocis/templates/search/service.yaml +++ b/charts/ocis/templates/search/service.yaml @@ -4,6 +4,8 @@ metadata: name: search namespace: {{ template "ocis.namespace" . }} labels: + app: search + ocis-metrics: enabled {{- include "ocis.labels" . | nindent 4 }} spec: selector: diff --git a/charts/ocis/templates/settings/deployment.yaml b/charts/ocis/templates/settings/deployment.yaml index 0542e5bdd..3f5ea17f3 100644 --- a/charts/ocis/templates/settings/deployment.yaml +++ b/charts/ocis/templates/settings/deployment.yaml @@ -84,6 +84,15 @@ spec: name: {{ .Values.secretRefs.storageSystemSecretRef }} key: user-id + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: http diff --git a/charts/ocis/templates/sharing/deployment.yaml b/charts/ocis/templates/sharing/deployment.yaml index 85ff81421..7f48d1418 100644 --- a/charts/ocis/templates/sharing/deployment.yaml +++ b/charts/ocis/templates/sharing/deployment.yaml @@ -97,6 +97,15 @@ spec: name: {{ .Values.secretRefs.storageSystemSecretRef }} key: user-id + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: grpc diff --git a/charts/ocis/templates/storage-publiclink/deployment.yaml b/charts/ocis/templates/storage-publiclink/deployment.yaml index 6b9a6c785..4441f333d 100644 --- a/charts/ocis/templates/storage-publiclink/deployment.yaml +++ b/charts/ocis/templates/storage-publiclink/deployment.yaml @@ -63,6 +63,15 @@ spec: name: {{ .Values.secretRefs.jwtSecretRef }} key: jwt-secret + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: grpc diff --git a/charts/ocis/templates/storage-shares/deployment.yaml b/charts/ocis/templates/storage-shares/deployment.yaml index 35acb5953..34b37f728 100644 --- a/charts/ocis/templates/storage-shares/deployment.yaml +++ b/charts/ocis/templates/storage-shares/deployment.yaml @@ -66,6 +66,15 @@ spec: name: {{ .Values.secretRefs.jwtSecretRef }} key: jwt-secret + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: grpc diff --git a/charts/ocis/templates/storage-system/deployment.yaml b/charts/ocis/templates/storage-system/deployment.yaml index ceaa3eac7..e7a677719 100644 --- a/charts/ocis/templates/storage-system/deployment.yaml +++ b/charts/ocis/templates/storage-system/deployment.yaml @@ -95,6 +95,15 @@ spec: name: {{ .Values.secretRefs.storageSystemSecretRef }} key: user-id + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: grpc diff --git a/charts/ocis/templates/storage-users/deployment.yaml b/charts/ocis/templates/storage-users/deployment.yaml index 13ebc8ce6..4c85f418f 100644 --- a/charts/ocis/templates/storage-users/deployment.yaml +++ b/charts/ocis/templates/storage-users/deployment.yaml @@ -118,6 +118,15 @@ spec: name: {{ .Values.secretRefs.transferSecretSecretRef }} key: transfer-secret + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: grpc diff --git a/charts/ocis/templates/store/deployment.yaml b/charts/ocis/templates/store/deployment.yaml index 4568f34bc..d8aeab7ef 100644 --- a/charts/ocis/templates/store/deployment.yaml +++ b/charts/ocis/templates/store/deployment.yaml @@ -68,6 +68,15 @@ spec: - name: STORE_DEBUG_ADDR value: 0.0.0.0:9464 + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: grpc diff --git a/charts/ocis/templates/thumbnails/deployment.yaml b/charts/ocis/templates/thumbnails/deployment.yaml index b1e7fdfd8..e302ad466 100644 --- a/charts/ocis/templates/thumbnails/deployment.yaml +++ b/charts/ocis/templates/thumbnails/deployment.yaml @@ -86,6 +86,15 @@ spec: name: {{ .Values.secretRefs.thumbnailsSecretRef }} key: thumbnails-transfer-secret + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: grpc diff --git a/charts/ocis/templates/users/deployment.yaml b/charts/ocis/templates/users/deployment.yaml index a45aa0444..d6aa4510a 100644 --- a/charts/ocis/templates/users/deployment.yaml +++ b/charts/ocis/templates/users/deployment.yaml @@ -150,6 +150,15 @@ spec: name: {{ .Values.secretRefs.jwtSecretRef }} key: jwt-secret + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: grpc diff --git a/charts/ocis/templates/web/deployment.yaml b/charts/ocis/templates/web/deployment.yaml index 1b600ce9b..4415f9908 100644 --- a/charts/ocis/templates/web/deployment.yaml +++ b/charts/ocis/templates/web/deployment.yaml @@ -66,6 +66,16 @@ spec: value: https://{{ .Values.externalDomain }} - name: WEB_OIDC_METADATA_URL value: https://{{ .Values.externalDomain }}/.well-known/openid-configuration + + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: http diff --git a/charts/ocis/templates/webdav/deployment.yaml b/charts/ocis/templates/webdav/deployment.yaml index 29cd23b41..8441584e3 100644 --- a/charts/ocis/templates/webdav/deployment.yaml +++ b/charts/ocis/templates/webdav/deployment.yaml @@ -59,6 +59,15 @@ spec: - name: REVA_GATEWAY value: gateway:9142 + livenessProbe: + httpGet: + path: /healthz + port: metrics-debug + timeoutSeconds: 10 + initialDelaySeconds: 60 + periodSeconds: 20 + failureThreshold: 3 + resources: {{ toYaml .Values.resources | nindent 12 }} ports: - name: http From 251fc3cd3f8ab8fc1e2461626b6114bc49a0954b Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Thu, 27 Oct 2022 12:22:34 +0200 Subject: [PATCH 3/4] make descriptions --- charts/ocis/docs/values-desc-table.adoc | 6 ++++++ charts/ocis/docs/values.adoc.yaml | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/charts/ocis/docs/values-desc-table.adoc b/charts/ocis/docs/values-desc-table.adoc index ff773a4fd..e59e35402 100644 --- a/charts/ocis/docs/values-desc-table.adoc +++ b/charts/ocis/docs/values-desc-table.adoc @@ -30,6 +30,12 @@ a| [subs=-attributes] a| [subs=-attributes] `3` | Sets minimum replicas for autoscaling. +| debug.profiling +a| [subs=-attributes] ++bool+ +a| [subs=-attributes] +`false` +| Profiling enables the http://:/debug/pprof endpoint to inspect various Go runtime internals. You can use the endpoint on your machine by forwarding the port, eg: `kubectl port-forward -n ocis pod/auth-basic-8587dc9d64-fs24l 9147:9147` and then accessing the port on https://localhost:9147/debug/pprof or using the pprof command line tool: `go tool pprof -web http://localhost:9147/debug/pprof/symbol\?seconds\=10` | deploymentStrategy a| [subs=-attributes] +object+ diff --git a/charts/ocis/docs/values.adoc.yaml b/charts/ocis/docs/values.adoc.yaml index 65b7f001e..1d740ef4b 100644 --- a/charts/ocis/docs/values.adoc.yaml +++ b/charts/ocis/docs/values.adoc.yaml @@ -23,6 +23,13 @@ logging: # Not recommended for production installations. color: "false" +# Debug settings for the oCIS service +debug: + # -- Profiling enables the http://:/debug/pprof endpoint to inspect various Go runtime internals. + # You can use the endpoint on your machine by forwarding the port, eg: `kubectl port-forward -n ocis pod/auth-basic-8587dc9d64-fs24l 9147:9147` + # and then accessing the port on https://localhost:9147/debug/pprof or using the pprof command line tool: `go tool pprof -web http://localhost:9147/debug/pprof/symbol\?seconds\=10` + profiling: false + # -- Deployment strategy. deploymentStrategy: type: RollingUpdate From fec77512fdcdcfbec5eafe66574fb901a2461555 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 9 Nov 2022 08:31:39 +0100 Subject: [PATCH 4/4] change unused _DEBUG_ variables to comments --- charts/ocis/templates/idm/deployment.yaml | 8 ++++---- charts/ocis/templates/nats/deployment.yaml | 8 ++++---- charts/ocis/templates/notifications/deployment.yaml | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/charts/ocis/templates/idm/deployment.yaml b/charts/ocis/templates/idm/deployment.yaml index f6a00699f..b8b747983 100644 --- a/charts/ocis/templates/idm/deployment.yaml +++ b/charts/ocis/templates/idm/deployment.yaml @@ -68,13 +68,13 @@ spec: - name: IDM_LOG_PRETTY value: "{{ .Values.logging.pretty }}" - - name: IDM_DEBUG_PPROF - value: "{{ .Values.debug.profiling }}" + # - name: IDM_DEBUG_PPROF + # value: "{{ .Values.debug.profiling }}" - name: IDM_LDAPS_ADDR value: 0.0.0.0:9235 - - name: IDM_DEBUG_ADDR - value: 0.0.0.0:9239 + # - name: IDM_DEBUG_ADDR + # value: 0.0.0.0:9239 - name: IDM_CREATE_DEMO_USERS value: "{{ .Values.features.demoUsers }}" diff --git a/charts/ocis/templates/nats/deployment.yaml b/charts/ocis/templates/nats/deployment.yaml index 42bc398b4..801be4b0d 100644 --- a/charts/ocis/templates/nats/deployment.yaml +++ b/charts/ocis/templates/nats/deployment.yaml @@ -52,16 +52,16 @@ spec: - name: NATS_LOG_PRETTY value: "{{ .Values.logging.pretty }}" - - name: NATS_DEBUG_PPROF - value: "{{ .Values.debug.profiling }}" + # - name: NATS_DEBUG_PPROF + # value: "{{ .Values.debug.profiling }}" - name: NATS_NATS_HOST value: "0.0.0.0" - name: NATS_NATS_PORT value: "9233" - - name: NATS_DEBUG_ADDR - value: 0.0.0.0:9234 + # - name: NATS_DEBUG_ADDR + # value: 0.0.0.0:9234 livenessProbe: # TODO: NATS does not currently provide a debug port, re-enable this once that is implemented diff --git a/charts/ocis/templates/notifications/deployment.yaml b/charts/ocis/templates/notifications/deployment.yaml index bbf723331..e49781bec 100644 --- a/charts/ocis/templates/notifications/deployment.yaml +++ b/charts/ocis/templates/notifications/deployment.yaml @@ -44,11 +44,11 @@ spec: - name: NOTIFICATIONS_LOG_PRETTY value: "{{ .Values.logging.pretty }}" - - name: NOTIFICATIONS_DEBUG_PPROF - value: "{{ .Values.debug.profiling }}" + # - name: NOTIFICATIONS_DEBUG_PPROF + # value: "{{ .Values.debug.profiling }}" - - name: NOTIFICATIONS_DEBUG_ADDR - value: 0.0.0.0:9174 + # - name: NOTIFICATIONS_DEBUG_ADDR + # value: 0.0.0.0:9174 - name: NOTIFICATIONS_SMTP_HOST value: "{{ .Values.features.emailNotifications.smtp.host }}"