From a973f1a80899a198636e243fabc1a323a5e01365 Mon Sep 17 00:00:00 2001 From: Joris Coenen Date: Fri, 14 Jul 2023 14:31:50 +0200 Subject: [PATCH 1/2] Update Connect to v1.7.1 --- charts/connect/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/connect/Chart.yaml b/charts/connect/Chart.yaml index 2aa3ed5..6706f9a 100644 --- a/charts/connect/Chart.yaml +++ b/charts/connect/Chart.yaml @@ -11,4 +11,4 @@ maintainers: - name: 1Password Secrets Integrations Team email: support+business@1password.com icon: https://avatars.githubusercontent.com/u/38230737 -appVersion: "1.7.0" +appVersion: "1.7.1" From a2185057ae97e731b0d09f72c58d083d1b3ed9ae Mon Sep 17 00:00:00 2001 From: Joris Coenen Date: Fri, 14 Jul 2023 14:36:40 +0200 Subject: [PATCH 2/2] Introduce option to enable profiler This can be used to help the 1Password debug memory and performance issues. If enabled, data can be exported by running: ``` kubectl cp -c profiler-data :/data profiler ``` --- charts/connect/templates/_helpers.tpl | 14 ++++++++++++++ charts/connect/templates/connect-deployment.yaml | 11 +++++++++++ charts/connect/values.yaml | 9 +++++++++ 3 files changed, 34 insertions(+) diff --git a/charts/connect/templates/_helpers.tpl b/charts/connect/templates/_helpers.tpl index 2c1bc0d..9488dd6 100644 --- a/charts/connect/templates/_helpers.tpl +++ b/charts/connect/templates/_helpers.tpl @@ -102,3 +102,17 @@ Sets extra service annotations {{- end }} {{- end }} {{- end -}} + +{{/* +Sets environment variables when profiler is enabled +*/}} +{{- define "onepassword-connect.profilerConfig" -}} + {{- if .Values.connect.profiler.enabled}} +- name: OP_PROFILER_OUTPUT_DIR + value: "/home/opuser/.op/data/profiler" +- name: OP_PROFILER_INTERVAL + value: "{{ .Values.connect.profiler.interval }}" +- name: OP_PROFILER_KEEP_LAST + value: "{{ .Values.connect.profiler.keepLast }}" + {{- end -}} +{{- end -}} diff --git a/charts/connect/templates/connect-deployment.yaml b/charts/connect/templates/connect-deployment.yaml index 878df1f..cf4057a 100644 --- a/charts/connect/templates/connect-deployment.yaml +++ b/charts/connect/templates/connect-deployment.yaml @@ -83,6 +83,7 @@ spec: {{- end }} - name: OP_LOG_LEVEL value: "{{ .Values.connect.api.logLevel }}" + {{- include "onepassword-connect.profilerConfig" . | indent 12 -}} {{- if .Values.connect.probes.readiness }} readinessProbe: httpGet: @@ -131,6 +132,7 @@ spec: value: localhost:11220 - name: OP_LOG_LEVEL value: "{{ .Values.connect.sync.logLevel }}" + {{- include "onepassword-connect.profilerConfig" . | indent 12 }} {{- if .Values.connect.probes.readiness }} readinessProbe: httpGet: @@ -151,4 +153,13 @@ spec: volumeMounts: - mountPath: /home/opuser/.op/data name: {{ .Values.connect.dataVolume.name }} + {{- if .Values.connect.profiler.enabled }} + - name: profiler-data + image: alpine + command: [ 'sleep', 'infinity' ] + volumeMounts: + - name: {{ .Values.connect.dataVolume.name }} + mountPath: /data + subPath: profiler + {{- end }} {{- end }} diff --git a/charts/connect/values.yaml b/charts/connect/values.yaml index 40256c6..5d8849c 100644 --- a/charts/connect/values.yaml +++ b/charts/connect/values.yaml @@ -155,6 +155,15 @@ connect: # hosts: # - chart-example.local + # Optionally the internal profiler can be enabled to debug memory or performance issues. + # For normal operation of Connect this does not have to enabled. + profiler: + enabled: false + # The interval at which profiler snapshots are taken. + interval: 6h + # Number of profiler snapshots to keep. + keepLast: 12 + # This section of values is for 1Password Operator Configuration operator: # Denotes whether the 1Password Operator will be deployed