fix: resolve CrowdSec Helm upgrade failure - remove duplicate DISABLE_ONLINE_API env and add metrics config
This commit is contained in:
@@ -55,3 +55,11 @@ lapi:
|
|||||||
limits:
|
limits:
|
||||||
cpu: 200m
|
cpu: 200m
|
||||||
memory: 500Mi
|
memory: 500Mi
|
||||||
|
|
||||||
|
metrics:
|
||||||
|
enabled: true
|
||||||
|
serviceMonitor:
|
||||||
|
additionalLabels:
|
||||||
|
release: prometheus-stack
|
||||||
|
enabled: true
|
||||||
|
namespace: prometheus
|
||||||
|
|||||||
Executable
+10
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
kubectl patch daemonset -n crowdsec crowdsec-agent --type='json' -p='[{
|
||||||
|
"op": "replace",
|
||||||
|
"path": "/spec/template/spec/initContainers/0/command",
|
||||||
|
"value": ["sh", "-c", "until nc \"$LAPI_HOST\" \"$LAPI_PORT\" -z; do echo waiting for lapi to start; sleep 5; done; ln -s /staging/etc/crowdsec /etc/crowdsec; cscli lapi register --machine \"$USERNAME\" -u \"$LAPI_URL\" --token \"$REGISTRATION_TOKEN\" 2>/dev/null || true; cp /etc/crowdsec/local_api_credentials.yaml /tmp_config/local_api_credentials.yaml 2>/dev/null || true"]
|
||||||
|
}]' 2>&1
|
||||||
|
|
||||||
|
kubectl rollout restart -n crowdsec daemonset/crowdsec-agent 2>&1
|
||||||
|
kubectl rollout status -n crowdsec daemonset/crowdsec-agent --timeout=120s 2>&1
|
||||||
Reference in New Issue
Block a user