Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Add missing RBAC to k8s Missing RBAC for service accounts
Maidul Islam56506b5a47f1
diff --git a/helm-charts/secrets-operator/templates/manager-rbac.yaml b/helm-charts/secrets-operator/templates/manager-rbac.yamlindex 758bc7dfe7..ca6fd36e13 100644--- a/helm-charts/secrets-operator/templates/manager-rbac.yaml+++ b/helm-charts/secrets-operator/templates/manager-rbac.yaml@@ -27,6 +27,14 @@ rules:- list- update- watch+- apiGroups:+ - ""+ resources:+ - serviceaccounts+ verbs:+ - get+ - list+ - watch- apiGroups:- appsresources:diff --git a/k8-operator/config/rbac/role.yaml b/k8-operator/config/rbac/role.yamlindex 68ea375b7e..10c2af414a 100644--- a/k8-operator/config/rbac/role.yaml+++ b/k8-operator/config/rbac/role.yaml@@ -27,6 +27,14 @@ rules:- list- update- watch+- apiGroups:+ - ""+ resources:+ - serviceaccounts+ verbs:+ - get+ - list+ - watch- apiGroups:- appsresources:diff --git a/k8-operator/config/samples/k8s-auth/sample.yaml b/k8-operator/config/samples/k8s-auth/sample.yamlindex 6dcbae13aa..44f2d86ee8 100644--- a/k8-operator/config/samples/k8s-auth/sample.yaml+++ b/k8-operator/config/samples/k8s-auth/sample.yaml@@ -12,7 +12,7 @@ spec:authentication:# Native Kubernetes AuthkubernetesAuth:- identityId: <>+ identityId: 8c0c9823-7249-4043-b292-a861fb9b1b50serviceAccountRef:name: infisical-authnamespace: defaultdiff --git a/k8-operator/controllers/infisicalsecret_controller.go b/k8-operator/controllers/infisicalsecret_controller.goindex 73da450343..2078341d87 100644--- a/k8-operator/controllers/infisicalsecret_controller.go+++ b/k8-operator/controllers/infisicalsecret_controller.go@@ -28,6 +28,7 @@ type InfisicalSecretReconciler struct {//+kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch;create;update;delete//+kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;delete//+kubebuilder:rbac:groups=apps,resources=deployments,verbs=list;watch;get;update+//+kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;list;watch// Reconcile is part of the main kubernetes reconciliation loop which aims to// move the current state of the cluster closer to the desired state.@@ -75,7 +76,6 @@ func (r *InfisicalSecretReconciler) Reconcile(ctx context.Context, req ctrl.Requerr := r.Get(ctx, req.NamespacedName, &infisicalSecretCR)if err != nil {if errors.IsNotFound(err) {- fmt.Printf("\nInfisical Secret CRD not found [err=%v]", err)return ctrl.Result{Requeue: false,}, nil