Skip to content

Commit b29b59a

Browse files
committed
feat: Base configuration to deploy rbac-manager
1 parent 5b80702 commit b29b59a

File tree

8 files changed

+503
-0
lines changed

8 files changed

+503
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# RBAC Manager – Base Configuration
2+
3+
This directory contains the **base manifests** for deploying [RBAC Manager](https://github.com/FairwindsOps/rbac-manager), a Kubernetes operator that simplifies the management of RoleBindings and ClusterRoleBindings.
4+
It is designed to be **consumed by cluster repositories** as a remote base, allowing each cluster to apply **custom overrides** as needed.
5+
6+
**About RBAC Manager:**
7+
8+
- Automates the creation and maintenance of **Kubernetes RBAC roles and bindings** using declarative configurations.
9+
- Introduces the `RBACDefinition` custom resource to manage multiple roles and bindings in a single YAML file.
10+
- Simplifies access control management for users, groups, and service accounts across namespaces.
11+
- Reduces manual errors and configuration drift by keeping RBAC resources consistent and version-controlled.
12+
- Supports both **namespaced** and **cluster-wide** role management, making it suitable for multi-team or multi-tenant clusters.
13+
- Commonly used to manage platform-level access, application team permissions, and read-only auditor roles.
14+
- Improves security and governance by providing a consistent and automated approach to RBAC configuration.
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Hardened values for rbac-manager v1.21.1 (app version v1.9.2)
2+
# RBAC Manager for automated RBAC management
3+
# Based on official Fairwinds chart values and documentation
4+
5+
# Image configuration
6+
image:
7+
repository: quay.io/reactiveops/rbac-manager
8+
tag: v1.9.2
9+
digest: ""
10+
pullPolicy: Always
11+
imagePullSecrets: []
12+
13+
# Install CRDs
14+
installCRDs: true
15+
16+
# CRD configuration
17+
crds:
18+
additionalLabels:
19+
app.kubernetes.io/component: rbac-manager
20+
app.kubernetes.io/part-of: openCenter
21+
22+
# RBAC configuration
23+
rbac:
24+
additionalLabels:
25+
app.kubernetes.io/component: rbac-manager
26+
app.kubernetes.io/part-of: openCenter
27+
28+
# Resource management - aligned with official defaults but with hardened limits
29+
resources:
30+
requests:
31+
cpu: 100m
32+
memory: 128Mi
33+
limits:
34+
cpu: 200m # Increased from default 100m for better performance
35+
memory: 256Mi # Increased from default 128Mi for stability
36+
37+
# Priority class for system-critical workload
38+
priorityClassName: "system-cluster-critical"
39+
40+
# Node scheduling
41+
nodeSelector:
42+
kubernetes.io/os: linux
43+
44+
# Tolerations for system nodes
45+
tolerations:
46+
- key: node-role.kubernetes.io/control-plane
47+
operator: Exists
48+
effect: NoSchedule
49+
- key: node-role.kubernetes.io/master
50+
operator: Exists
51+
effect: NoSchedule
52+
53+
# Affinity for better distribution
54+
affinity:
55+
podAntiAffinity:
56+
preferredDuringSchedulingIgnoredDuringExecution:
57+
- weight: 100
58+
podAffinityTerm:
59+
labelSelector:
60+
matchExpressions:
61+
- key: app.kubernetes.io/name
62+
operator: In
63+
values:
64+
- rbac-manager
65+
topologyKey: kubernetes.io/hostname
66+
67+
# Pod annotations for enhanced monitoring
68+
podAnnotations:
69+
cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
70+
prometheus.io/scrape: "true"
71+
prometheus.io/port: "8080"
72+
prometheus.io/path: "/metrics"
73+
74+
# Pod labels
75+
podLabels:
76+
app.kubernetes.io/component: rbac-manager
77+
app.kubernetes.io/part-of: openCenter
78+
79+
# Pod security context - enhanced security
80+
podSecurityContext:
81+
runAsNonRoot: true
82+
runAsUser: 65534
83+
runAsGroup: 65534
84+
fsGroup: 65534
85+
seccompProfile:
86+
type: RuntimeDefault
87+
88+
# Container security context - official recommendations with enhancements
89+
securityContext:
90+
allowPrivilegeEscalation: false
91+
privileged: false
92+
readOnlyRootFilesystem: true
93+
runAsNonRoot: true
94+
capabilities:
95+
drop:
96+
- ALL
97+
98+
# Deployment labels
99+
deploymentLabels:
100+
app.kubernetes.io/component: rbac-manager
101+
app.kubernetes.io/part-of: openCenter
102+
103+
# Service Monitor for Prometheus - enabled with proper configuration
104+
serviceMonitor:
105+
enabled: true
106+
additionalLabels:
107+
app.kubernetes.io/component: rbac-manager
108+
app.kubernetes.io/part-of: openCenter
109+
annotations:
110+
prometheus.io/scrape: "true"
111+
namespace: rbac-system
112+
interval: 30s
113+
relabelings:
114+
- sourceLabels: [__meta_kubernetes_pod_name]
115+
targetLabel: pod
116+
- sourceLabels: [__meta_kubernetes_namespace]
117+
targetLabel: namespace
118+
119+
# Extra arguments for enhanced functionality
120+
extraArgs:
121+
# Enable metrics endpoint
122+
metrics-address: "0.0.0.0:8042"
123+
# Set log level
124+
v: "2"
125+
# Enable leader election for HA
126+
# leader-elect: "true"
127+
# Set reconcile period
128+
# sync-period: "30s"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
apiVersion: helm.toolkit.fluxcd.io/v2
3+
kind: HelmRelease
4+
metadata:
5+
name: rbac-manager
6+
namespace: rbac-system
7+
spec:
8+
releaseName: rbac-manager
9+
interval: 5m
10+
timeout: 10m
11+
driftDetection:
12+
mode: enabled
13+
install:
14+
remediation:
15+
retries: 3
16+
remediateLastFailure: true
17+
upgrade:
18+
remediation:
19+
retries: 0
20+
remediateLastFailure: false
21+
targetNamespace: rbac-system
22+
chart:
23+
spec:
24+
chart: rbac-manager
25+
version: 1.21.1
26+
sourceRef:
27+
kind: HelmRepository
28+
name: fairwinds-stable
29+
namespace: rbac-system
30+
valuesFrom:
31+
- kind: Secret
32+
name: rbac-manager-values-base
33+
valuesKey: hardened.yaml
34+
- kind: Secret
35+
name: rbac-manager-values-override
36+
valuesKey: override.yaml
37+
optional: true
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
resources:
5+
- "namespace.yaml"
6+
- "source.yaml"
7+
- "helmrelease.yaml"
8+
secretGenerator:
9+
- name: rbac-manager-values-base
10+
type: Opaque
11+
files: [hardened.yaml=helm-values/hardened-values-1.21.1.yaml]
12+
options:
13+
disableNameSuffixHash: true
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
apiVersion: v1
3+
kind: Namespace
4+
metadata:
5+
name: rbac-system
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
resources:
5+
- oidc-rbac-templates.yaml

0 commit comments

Comments
 (0)