Crowsec uses external LAPI.
This commit is contained in:
@@ -60,7 +60,7 @@ spec:
|
|||||||
- name: LEVEL_INFO
|
- name: LEVEL_INFO
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: AGENT_USERNAME
|
- name: AGENT_USERNAME
|
||||||
value: "kubernetes-cluster"
|
value: "{{ if .agentUsername }}{{ .agentUsername }}{{ else }}kubernetes-cluster{{ end }}"
|
||||||
- name: AGENT_PASSWORD
|
- name: AGENT_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
@@ -72,6 +72,12 @@ spec:
|
|||||||
name: crowdsec-secrets
|
name: crowdsec-secrets
|
||||||
key: bouncerApiKey
|
key: bouncerApiKey
|
||||||
optional: true
|
optional: true
|
||||||
|
{{ if .centralLapiUrl }}
|
||||||
|
- name: DISABLE_LOCAL_API
|
||||||
|
value: "true"
|
||||||
|
- name: LOCAL_API_URL
|
||||||
|
value: "{{ .centralLapiUrl }}"
|
||||||
|
{{ end }}
|
||||||
ports:
|
ports:
|
||||||
- name: lapi
|
- name: lapi
|
||||||
containerPort: 8080
|
containerPort: 8080
|
||||||
@@ -79,6 +85,7 @@ spec:
|
|||||||
- name: prometheus
|
- name: prometheus
|
||||||
containerPort: 6060
|
containerPort: 6060
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
{{ if not .centralLapiUrl }}
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /health
|
path: /health
|
||||||
@@ -91,6 +98,7 @@ spec:
|
|||||||
port: 8080
|
port: 8080
|
||||||
initialDelaySeconds: 10
|
initialDelaySeconds: 10
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
|
{{ end }}
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 50m
|
cpu: 50m
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: v1.7.8-1
|
version: v1.7.8-4
|
||||||
requires:
|
requires:
|
||||||
- name: longhorn
|
- name: longhorn
|
||||||
- name: traefik
|
- name: traefik
|
||||||
@@ -6,6 +6,8 @@ defaultConfig:
|
|||||||
namespace: crowdsec
|
namespace: crowdsec
|
||||||
rateLimitAverage: "100"
|
rateLimitAverage: "100"
|
||||||
rateLimitBurst: "100"
|
rateLimitBurst: "100"
|
||||||
|
centralLapiUrl: ""
|
||||||
|
agentUsername: ""
|
||||||
defaultSecrets:
|
defaultSecrets:
|
||||||
- key: agentPassword
|
- key: agentPassword
|
||||||
- key: bouncerApiKey
|
- key: bouncerApiKey
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ spec:
|
|||||||
plugin:
|
plugin:
|
||||||
bouncer:
|
bouncer:
|
||||||
crowdsecLapiScheme: http
|
crowdsecLapiScheme: http
|
||||||
crowdsecLapiHost: crowdsec-lapi.crowdsec.svc.cluster.local:8080
|
crowdsecLapiHost: {{ if .centralLapiUrl }}{{ strings.TrimPrefix "http://" .centralLapiUrl }}{{ else }}crowdsec-lapi.crowdsec.svc.cluster.local:8080{{ end }}
|
||||||
crowdsecLapiKeyFile: /etc/traefik/crowdsec/api-key
|
crowdsecLapiKeyFile: /etc/traefik/crowdsec/api-key
|
||||||
crowdsecMode: stream
|
crowdsecMode: stream
|
||||||
updateIntervalSeconds: 15
|
updateIntervalSeconds: 15
|
||||||
|
|||||||
Reference in New Issue
Block a user