Fix Gitea Valkey auth: inject password via env var interpolation
Valkey requires authentication. Use additionalConfigFromEnvs to read the password from valkey-credentials secret and interpolate it into the Redis URLs for cache and session config.
This commit is contained in:
@@ -32,6 +32,15 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: gitea-pg-credentials
|
name: gitea-pg-credentials
|
||||||
key: password
|
key: password
|
||||||
|
- name: VALKEY_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: valkey-credentials
|
||||||
|
key: password
|
||||||
|
- name: GITEA__cache__HOST
|
||||||
|
value: redis://:$(VALKEY_PASSWORD)@valkey.platform.svc:6379/0
|
||||||
|
- name: GITEA__session__PROVIDER_CONFIG
|
||||||
|
value: redis://:$(VALKEY_PASSWORD)@valkey.platform.svc:6379/1
|
||||||
config:
|
config:
|
||||||
database:
|
database:
|
||||||
DB_TYPE: postgres
|
DB_TYPE: postgres
|
||||||
@@ -40,10 +49,8 @@ spec:
|
|||||||
USER: gitea
|
USER: gitea
|
||||||
cache:
|
cache:
|
||||||
ADAPTER: redis
|
ADAPTER: redis
|
||||||
HOST: redis://valkey.platform.svc:6379/0
|
|
||||||
session:
|
session:
|
||||||
PROVIDER: redis
|
PROVIDER: redis
|
||||||
PROVIDER_CONFIG: redis://valkey.platform.svc:6379/1
|
|
||||||
server:
|
server:
|
||||||
DOMAIN: gitea.coreworlds.io
|
DOMAIN: gitea.coreworlds.io
|
||||||
ROOT_URL: https://gitea.coreworlds.io
|
ROOT_URL: https://gitea.coreworlds.io
|
||||||
|
|||||||
Reference in New Issue
Block a user