fix: Crowdsec lookup chart workaround

This commit is contained in:
Vincent BRIDIER 2026-07-27 14:36:19 +02:00
parent c3b21c920d
commit 62cbd2ef1e
2 changed files with 12 additions and 29 deletions

View file

@ -28,6 +28,12 @@ spec:
- name: COLLECTIONS
value: "crowdsecurity/traefik"
secrets:
externalSecret:
name: crowdsec-lapi-secret
csLapiSecretKey: "CS_LAPI_SECRET"
registrationTokenKey: "REGISTRATION_TOKEN"
lapi:
replicas: 2
storeCAPICredentialsInSecret: true
@ -52,7 +58,7 @@ spec:
server:
auto_registration: # Activate if not using TLS for authentication
enabled: true
token: "${REGISTRATION_TOKEN}" # /!\ Do not modify this variable (auto-generated and handled by the chart)
token: "${CROWDSEC_REGISTRATION_TOKEN}" # /!\ Do not modify this variable (Cluster K8S gitlab var)
allowed_ranges: # /!\ Make sure to adapt to the pod IP ranges used by your cluster
- "127.0.0.1/32"
- "192.168.0.0/16"
@ -61,7 +67,7 @@ spec:
db_config:
type: mysql
user: crowdsec
password: ${DB_PWD}
password: ${CROWDSEC_DB_PWD}
db_name: crowdsec
host: ${DB_HOST}
port: ${DB_PORT}

View file

@ -12,6 +12,10 @@ spec:
name: crowdsec-lapi-secret
creationPolicy: Owner
data:
- secretKey: CS_LAPI_SECRET
remoteRef:
key: secret/data/crowdsec/lapi
property: CS_LAPI_SECRET
- secretKey: REGISTRATION_TOKEN
remoteRef:
key: secret/data/crowdsec/lapi
@ -32,30 +36,3 @@ spec:
remoteRef:
key: secret/data/crowdsec/lapi
property: BOUNCER_KEY_traefik
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: crowdsec-db-secret
namespace: common-services
spec:
refreshInterval: 15s
secretStoreRef:
name: vault-secret-store
kind: ClusterSecretStore
target:
name: crowdsec-db-secret
creationPolicy: Owner
data:
- secretKey: DB_HOST
remoteRef:
key: secret/data/crowdsec/db
property: DB_HOST
- secretKey: DB_PORT
remoteRef:
key: secret/data/crowdsec/db
property: DB_PORT
- secretKey: DB_PWD
remoteRef:
key: secret/data/crowdsec/db
property: DB_PWD