Skip to content

Commit 54470f9

Browse files
authored
Merge pull request #24 from rackerlabs/rbac-manager
feat: Base configuration to deploy rbac-manager
2 parents 7dabd28 + fa829e9 commit 54470f9

File tree

6 files changed

+206
-0
lines changed

6 files changed

+206
-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: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
---
2+
# Hardened values for rbac-manager v1.21.1 (app version v1.9.2)
3+
# RBAC Manager for automated RBAC management
4+
# Based on official Fairwinds chart values and documentation
5+
6+
# Image configuration
7+
image:
8+
repository: quay.io/reactiveops/rbac-manager
9+
tag: v1.9.2
10+
digest: ""
11+
pullPolicy: Always
12+
imagePullSecrets: []
13+
14+
# Install CRDs
15+
installCRDs: true
16+
17+
# CRD configuration
18+
crds:
19+
additionalLabels:
20+
app.kubernetes.io/component: rbac-manager
21+
app.kubernetes.io/part-of: openCenter
22+
23+
# RBAC configuration
24+
rbac:
25+
additionalLabels:
26+
app.kubernetes.io/component: rbac-manager
27+
app.kubernetes.io/part-of: openCenter
28+
29+
# Resource management - aligned with official defaults but with hardened limits
30+
resources:
31+
requests:
32+
cpu: 100m
33+
memory: 128Mi
34+
limits:
35+
cpu: 200m
36+
memory: 256Mi
37+
38+
# Priority class for system-critical workload
39+
priorityClassName: "system-cluster-critical"
40+
41+
# Node scheduling
42+
nodeSelector:
43+
kubernetes.io/os: linux
44+
45+
# Tolerations for system nodes
46+
tolerations:
47+
- key: node-role.kubernetes.io/control-plane
48+
operator: Exists
49+
effect: NoSchedule
50+
- key: node-role.kubernetes.io/master
51+
operator: Exists
52+
effect: NoSchedule
53+
54+
# Affinity for better distribution
55+
affinity:
56+
podAntiAffinity:
57+
preferredDuringSchedulingIgnoredDuringExecution:
58+
- weight: 100
59+
podAffinityTerm:
60+
labelSelector:
61+
matchExpressions:
62+
- key: app.kubernetes.io/name
63+
operator: In
64+
values:
65+
- rbac-manager
66+
topologyKey: kubernetes.io/hostname
67+
68+
# Pod annotations for enhanced monitoring
69+
podAnnotations:
70+
cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
71+
prometheus.io/scrape: "true"
72+
prometheus.io/port: "8080"
73+
prometheus.io/path: "/metrics"
74+
75+
# Pod labels
76+
podLabels:
77+
app.kubernetes.io/component: rbac-manager
78+
app.kubernetes.io/part-of: openCenter
79+
80+
# Pod security context - enhanced security
81+
podSecurityContext:
82+
runAsNonRoot: true
83+
runAsUser: 65534
84+
runAsGroup: 65534
85+
fsGroup: 65534
86+
seccompProfile:
87+
type: RuntimeDefault
88+
89+
# Container security context - official recommendations with enhancements
90+
securityContext:
91+
allowPrivilegeEscalation: false
92+
privileged: false
93+
readOnlyRootFilesystem: true
94+
runAsNonRoot: true
95+
capabilities:
96+
drop:
97+
- ALL
98+
99+
# Deployment labels
100+
deploymentLabels:
101+
app.kubernetes.io/component: rbac-manager
102+
app.kubernetes.io/part-of: openCenter
103+
104+
# Service Monitor for Prometheus - enabled with proper configuration
105+
serviceMonitor:
106+
enabled: true
107+
additionalLabels:
108+
app.kubernetes.io/component: rbac-manager
109+
app.kubernetes.io/part-of: openCenter
110+
annotations:
111+
prometheus.io/scrape: "true"
112+
namespace: rbac-system
113+
interval: 30s
114+
relabelings:
115+
- sourceLabels: [__meta_kubernetes_pod_name]
116+
targetLabel: pod
117+
- sourceLabels: [__meta_kubernetes_namespace]
118+
targetLabel: namespace
119+
120+
# Extra arguments for enhanced functionality
121+
extraArgs:
122+
# Enable metrics endpoint
123+
metrics-address: "0.0.0.0:8042"
124+
# Set log level
125+
v: "2"
126+
# Enable leader election for HA
127+
# leader-elect: "true"
128+
# Set reconcile period
129+
# 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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
apiVersion: source.toolkit.fluxcd.io/v1
3+
kind: HelmRepository
4+
metadata:
5+
name: fairwinds-stable
6+
spec:
7+
url: https://charts.fairwinds.com/stable
8+
interval: 1h

0 commit comments

Comments
 (0)