From 1d1e16869ef4292726e4d7dfa00bd50a423a3804 Mon Sep 17 00:00:00 2001 From: Julien Redel Date: Tue, 9 Jun 2026 10:32:50 +0000 Subject: [PATCH] fix: keep cscli RBAC when online API is disabled --- charts/crowdsec/Chart.yaml | 2 +- charts/crowdsec/templates/role.yaml | 2 +- charts/crowdsec/templates/rolebinding.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/crowdsec/Chart.yaml b/charts/crowdsec/Chart.yaml index c2a5006..d6bca0a 100644 --- a/charts/crowdsec/Chart.yaml +++ b/charts/crowdsec/Chart.yaml @@ -14,7 +14,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.24.0 +version: 0.24.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/crowdsec/templates/role.yaml b/charts/crowdsec/templates/role.yaml index d07021d..18fb3d2 100644 --- a/charts/crowdsec/templates/role.yaml +++ b/charts/crowdsec/templates/role.yaml @@ -1,5 +1,5 @@ {{- if .Values.lapi.enabled }} -{{- if not (eq (include "IsOnlineAPIDisabled" .) "true") }} +{{- if or (not (eq (include "IsOnlineAPIDisabled" .) "true")) (eq (include "StoreLAPICscliCredentialsInSecret" .) "true") }} {{- if or (eq (include "StoreCAPICredentialsInSecret" .) "true") (eq (include "StoreLAPICscliCredentialsInSecret" .) "true") }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role diff --git a/charts/crowdsec/templates/rolebinding.yaml b/charts/crowdsec/templates/rolebinding.yaml index fbedd25..b752c54 100644 --- a/charts/crowdsec/templates/rolebinding.yaml +++ b/charts/crowdsec/templates/rolebinding.yaml @@ -1,5 +1,5 @@ {{- if .Values.lapi.enabled }} -{{- if not (eq (include "IsOnlineAPIDisabled" .) "true") }} +{{- if or (not (eq (include "IsOnlineAPIDisabled" .) "true")) (eq (include "StoreLAPICscliCredentialsInSecret" .) "true") }} {{- if or (eq (include "StoreCAPICredentialsInSecret" .) "true") (eq (include "StoreLAPICscliCredentialsInSecret" .) "true") }} apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding