Skip to content

Commit

Permalink
fix: rename a bunch of values
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyannn committed Jan 6, 2024
1 parent 43c93a5 commit bc2ccd9
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
8 changes: 4 additions & 4 deletions langfuse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ secrets:

## Notes on Uninstalling

The usual `helm uninstall RELEASE_NAME` should work, but note that the following objects are not deleted automatically:
The usual `helm uninstall RELEASE_NAME` should work,
but note that the following objects are not deleted automatically with the default values:

- the `-internal-secret` secret
- the `-postgres-secret` secret (unless `postgresql.secret.alwaysKeepWhenUninstalled` is unset)
- the data PVC of the `postgres` subchart (if the subchart was enabled)
- the TLS secret of the ingress (if the ingress was enabled)
- the `-postgres-secret` secret (if the subchart was enabled, controlled by `secrets.postgresql.keepWhenUninstalled`)
- the `-internal-secret` secret (controlled by `secrets.internal.keepWhenUninstalled`)

This means that you can reinstall the chart and continue accessing the same data.

Expand Down
3 changes: 2 additions & 1 deletion langfuse/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ If release name contains chart name it will be used as a full name.
{{- define "langfuse.internalSecret.annotations" -}}
{{- if .Values.secrets.internal.keepWhenUninstalled -}}
"helm.sh/resource-policy": "keep"
"argocd.argoproj.io/sync-options": "Prune=false"
{{- end }}
{{- end }}

Expand All @@ -42,7 +43,7 @@ If release name contains chart name it will be used as a full name.
{{- end }}

{{- define "langfuse.postgresqlSecret.annotations" -}}
{{- if .Values.secrets.postgres.keepWhenUninstalled -}}
{{- if .Values.secrets.postgresql.keepWhenUninstalled -}}
"helm.sh/resource-policy": "keep"
"argocd.argoproj.io/sync-options": "Prune=false"
{{- end }}
Expand Down
8 changes: 5 additions & 3 deletions langfuse/templates/internal-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{{- $secretName := (include "langfuse.internalSecret" .) -}}
{{- if .Values.secrets.internal.automaticallyManage -}}

{{- include "langfuse.mergeSecretWithRandomForKeys" (dict
"name" $secretName
"name" (include "langfuse.internalSecret" .)
"annotations" (include "langfuse.internalSecret.annotations" .)
"keys" (list "salt" "auth-secret")
"context" .
) -}}
) -}}

{{- end }}
2 changes: 1 addition & 1 deletion langfuse/templates/postgres-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if (and .Values.postgresql.enabled .Values.secrets.postgres.createIfMissing) -}}
{{- if (and .Values.postgresql.enabled .Values.secrets.postgresql.automaticallyManage) -}}

{{- include "langfuse.mergeSecretWithRandomForKeys" (dict
"name" (include "langfuse.postgresqlSecret" .)
Expand Down
13 changes: 9 additions & 4 deletions langfuse/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This URL must agree with the app's URL for OAuth to work
nextauthURL: http://localhost:3000

# By default, the postgres subchart will be installed and the connection value overridden.
# By default, the postgresql subchart will be installed and the connection value overridden.
# Disable the bundled subchart using postgresql.enabled if you want to use this setting.
databaseURL: "postgresql://postgres:postgres@localhost:5432/postgres"

Expand All @@ -18,20 +18,25 @@ toggles:

# Where the non-public Langfuse configuration is stored
secrets:
postgres:
# This group of settings is only relevant if postgresql.enabled is set.
postgresql:
# If set (default), random values are saved in the postgresql.auth.existingSecret secret
# for all the missing keys (existing values for these keys are preserved).
# If unset, you are expected to create the secret yourself before installing the chart.
createIfMissing: true
automaticallyManage: true
# If set, the secret will be annotated so that it is kept with `helm uninstall`
# If unset, the secret will be deleted with `helm uninstall`
# This has no effect unless createIfMissing is also true.
# This has no effect unless automaticallyManage is also true.
# Warning: reinstalling the chart with this value unset will generate a new password,
# but Postgres will continue to use an old password since it's stored on the PVC.
keepWhenUninstalled: true
internal:
# You can change the name to make several installations share the API keys.
name: "{{ .Release.Name }}-internal-secret"
# If set (default), random values are saved in the secrets.internal.name secret
# for all the missing keys (existing values for these keys are preserved).
# If unset, you are expected to create the secret yourself before installing the chart.
automaticallyManage: true
# If set, the secret will be annotated so that it is kept with `helm uninstall`
# If unset, the secret will be deleted with `helm uninstall`
# Warning: reinstalling the chart with this value unset will generate a new salt thus
Expand Down

0 comments on commit bc2ccd9

Please sign in to comment.