Skip to content
Open
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
9 changes: 6 additions & 3 deletions charts/exivity/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ metadata:
labels:
{{- include "exivity.labels" $ | indent 4 }}
data:
{{- if .Release.IsUpgrade }}
EXIVITY_APP_KEY: {{ index (lookup "v1" "Secret" .Release.Namespace (printf "%s-app-key" (include "exivity.fullname" $))).data "EXIVITY_APP_KEY" }}
{{- else if not (empty .Values.secret.appKey) }}
{{- if and .Values.secret.appKey (ne .Values.secret.appKey "") }}
{{/* Use provided APP_KEY (validation handled by values.schema.json) */}}
EXIVITY_APP_KEY: {{ .Values.secret.appKey | b64enc }}
{{- else if .Release.IsUpgrade }}
{{/* Reuse existing secret during upgrade when no new key provided */}}
EXIVITY_APP_KEY: {{ index (lookup "v1" "Secret" .Release.Namespace (printf "%s-app-key" (include "exivity.fullname" $))).data "EXIVITY_APP_KEY" }}
{{- else }}
{{/* Generate secure random 32-character APP_KEY for new installations */}}
EXIVITY_APP_KEY: {{ randAlphaNum 32 | b64enc }}
{{- end }}

Expand Down
9 changes: 6 additions & 3 deletions charts/exivity/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,14 @@
"appKey": {
"type": "string",
"default": "",
"title": "The appKey Schema",
"title": "Laravel Application Key",
"description": "The application encryption key used by Laravel for encrypting and decrypting sensitive data with AES-256-CBC cipher. This value can be left empty for automatic generation during installation or specified as a base64-encoded key with the 'base64:' prefix (standard Laravel format). If an invalid or incorrectly formatted key is provided, a Laravel RuntimeException will be thrown. A valid key can be generated using: php artisan key:generate --show",
"examples": [
"ieR3rai9aijeghingo9LeaCaipah4lohxiliekaem3chahph0iemeeghai3ohfah"
"",
"ZC9GxTNHyDyYOZYidN240FuhsB0QJxZs",
"base64:MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI="
],
"maxLength": 64
"pattern": "^(|[a-zA-Z0-9]{32}|base64:[A-Za-z0-9+/]{16,88}={0,2})$"
},
"jwtSecret": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion charts/exivity/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ licence: "demo"
# Secret keys used for application security. Random values are generated on installation if not set.
# Random values are generated on installation if not set, but it's recommended to specify values for production.
secret:
appKey: "" # Used to encrypt application data. Specify a value for production. Max length: 64 characters.
appKey: "" # Laravel encryption key. Must be 32 characters (plain) or base64-encoded with 'base64:' prefix. Validated by values.schema.json. Generate with: php artisan key:generate --show
jwtSecret: "" # Used for signing JWTs. Specify a value for production.

ingress:
Expand Down