Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion livekit-server/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,14 @@ metadata:
labels:
{{- include "livekit-server.labels" . | nindent 4 }}
data:
{{ .Values.livekit.key_file }}: {{ toYaml .Values.storeKeysInSecret.keys | b64enc }}
{{- if and .Values.storeKeysInSecret.autoGenerateKeys (empty .Values.storeKeysInSecret.keys) (empty .Values.livekit.keys) }}
{{- $apiKey := "lk_api_key" }}
{{- $apiSecret := randAlphaNum 50 }}
{{- $keyData := dict $apiKey $apiSecret }}
{{ .Values.livekit.key_file }}: {{ toYaml $keyData | b64enc }}
api_key: {{ $apiKey | b64enc }}
api_secret: {{ $apiSecret | b64enc }}
{{- else }}
{{ .Values.livekit.key_file }}: {{ toYaml .Values.storeKeysInSecret.keys | b64enc }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions livekit-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ livekit:
# Set this option to true if you want to store your API keys in a secret instead of the config file
storeKeysInSecret:
enabled: false
# Set this option to true if you want to generate your API keys and store them in a secret instead of the config file.
# storeKeysInSecret.enabled needs to be true for this option to work.
autoGenerateKeys: false
# Use a pre existing secret, useful to combine with external secret managers
# as GCP External Secrets or Hashicorp Vault
existingSecret: ""
Expand Down
Loading