rbac-manager

by Fairwinds

Helm chartv2.0.0App 1.10.0Verified publisher

A Kubernetes operator that simplifies the management of Role Bindings and Service Accounts.

About this chart

RBAC Manager

RBAC Manager was designed to simplify authorization in Kubernetes. This is an operator that supports declarative configuration for RBAC with new custom resources. Instead of managing role bindings or service accounts directly, you can specify a desired state and RBAC Manager will make the necessary changes to achieve that state.

This project has three main goals:

  1. Provide a declarative approach to RBAC that is more approachable and scalable.
  2. Reduce the amount of configuration required for great auth.
  3. Enable automation of RBAC configuration updates with CI/CD.

More information about RBAC Manager is available on GitHub as well as from the official documentation.

Installation

We recommend installing rbac-manager in its own namespace and a simple release name:

helm repo add fairwinds-stable https://charts.fairwinds.com/stable
helm install rbac-manager fairwinds-stable/rbac-manager --namespace rbac-manager

Prerequisites

As of chart version 1.6.0 Kubernetes 1.16+, Helm 2.10+

Helm 3 will be made mandatory in the future.

Upgrading to Chart Version 2.0.0

Breaking: The default container image is now us-docker.pkg.dev/fairwinds-ops/oss/rbac-manager. The previous default, quay.io/reactiveops/rbac-manager, is deprecated.

To remain on Quay during migration, set image.repository (and image.tag if needed) in your values.

Upgrading to Chart Version 1.0.0

The upgrade to version 1.0.0 of this chart removes support for installing RBAC Definitions as part of the chart values. This change was made to simplify CRD installation with Helm. We recommend installing RBAC Definitions separately from the chart.

For backwards compatibility with the chart originally included in the rbac-manager repository, we've removed the Helm install-crd hook from this chart. Unfortunately as part of improving backwards compatibility with the chart in the rbac-manager repository, we have made it more difficult to upgrade from the inital versions of the charts here.

Some quirks in Helm make the upgrade process from 0.x of this chart to 1.x challenging due to the potential of the RBAC Definition CRD getting deleted. In most cases, reinstalling the chart will be the best path forward.

If either of the following apply and you are upgrading from an earlier version of the chart found in this repository, keep on reading:

  1. A momentary lapse in access granted by RBAC Definitions is unacceptable
  2. You're using auth tokens from Service Accounts created by RBAC Manager

The following process has worked repeatedly for us to upgrade from an older version of this chart to 1.0.0. These steps worked with Helm and Tiller 2.12.3 for us, but due to the absurdity of this process, we can't guarantee it will work for you.

  1. Install rbac-manager with chart that uses install-crd hook (fairwinds-stable/[email protected])
  2. Upgrade to rbac-manager chart that doesn't use install-crd hook (fairwinds-stable/[email protected]) - this upgrade fails but is important later
  3. Upgrade to original rbac-manager chart that uses install-crd hook (fairwinds-stable/[email protected]) - this works
  4. Rollback to revision 2 - this fails
  5. Rollback to revision 2 - this works

In the above workflow, an RBAC Definition installed between revision 1 and 2 should persist through to revision 5. This process is admittedly quite strange, and in our testing the second rollback (step 5) is indeed required for this process to work.

Values

KeyTypeDefaultDescription
image.repositorystring"us-docker.pkg.dev/fairwinds-ops/oss/rbac-manager"The image to run for rbac manager
image.tagstring""The tag of the image to run. Defaults to the Chart's AppVersion
image.digeststring""The digest of the image to run
image.pullPolicystring"Always"The image pullPolicy. Recommend not changing this
image.imagePullSecretslist[]
extraArgsobject{}A map of flag=value to pass to rbac-manager
installCRDsbooltrueIf true, install and upgrade CRDs. See the Helm documentation for best practices regarding CRDs.
crds.additionalLabelsobject{}add additional labels to the installed CRDs
rbac.additionalLabelsobject{}add additional labels to the installed RBAC resources
resourcesobject{"limits":{"cpu":"100m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}A resources block for the rbac-manager pods
priorityClassNamestring""The name of a priorityClass to use
nodeSelectorobject{}Deployment nodeSelector
tolerationslist[]Deployment tolerations
affinityobject{}Deployment affinity
podAnnotationsobject{}Annotations to apply to the pods
podLabelsobject{}Labels to apply to the pod
podSecurityContextobject{}securityContext to apply to the whole pod
securityContextobject{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsNonRoot":true}securityContext to apply to the rbac-manager container
deploymentLabelsobject{}Labels to apply to the Deployment resource
serviceMonitor.enabledboolfalseIf true, a ServiceMonitor will be created for Prometheus
serviceMonitor.additionalLabelslist[]Additional labels to ServiceMonitor
serviceMonitor.annotationsobject{}Annotations to apply to the serviceMonitor and headless service
serviceMonitor.namespacestring""The namespace to deploy the serviceMonitor into
serviceMonitor.intervalstring"60s"How often to scrape the metrics endpoint
serviceMonitor.relabelingslist[]RelabelConfigs to apply to samples before scraping

Deploy rbac-manager with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has rbac-manager on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartrbac-manager is pinned at v2.0.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply