roles
by Adeptia Inc
Kubernetes RBAC and CRD prerequisites for Adeptia.
About this chart
adeptia-connect-roles
A Helm chart that installs the Kubernetes permissions (RBAC), custom resource definitions (CRDs), and storage objects that Adeptia Connect needs before the Adeptia Connect application itself is installed.
The chart is built around five independent components. Each component has its own on/off switch in values.yaml — turn on only the ones you need. Nothing else is installed.
The five components are:
Component name (in values.yaml) | What it sets up on the cluster |
|---|---|
adeptiaConnect | Permissions that let the Adeptia Connect application operate inside its namespace |
rabbitmq | Permissions for the RabbitMQ operator (which Adeptia uses as its message broker), plus 14 RabbitMQ CRDs |
externalSecrets | Permissions and a CRD for Kubernetes External Secrets (KES), used when Adeptia pulls credentials from an external vault |
lanPv | An NFS-backed PersistentVolume for Adeptia's LAN share |
openshiftLogging | Permissions that let the OpenShift cluster-logging operator forward Adeptia's logs (OpenShift-only) |
Requirements
- Kubernetes 1.16 or later
- Helm version 3 or 4
- For every component you turn on, the namespace it points at must already exist — the chart does not create namespaces
- For
rabbitmq: you'll install the actual RabbitMQ cluster-operator and messaging-topology-operator separately (this chart only sets up the permissions and CRDs they need) - For
openshiftLogging: the OpenShift cluster-logging operator must already be installed on the cluster - For
lanPv: an NFS server reachable from cluster nodes
How configuration works
The chart has one configuration file: values.yaml. Every option in it carries an inline comment explaining what it does and when it's required.
To use the chart, you edit values.yaml (or copy it to a new file) and turn on the components you want. Three rules apply to every install:
- Components default to off. Each component has an
enabledfield set tofalse. Until you change it totrue, nothing for that component gets installed. - Each component carries its own settings. When you turn a component on, fill in its
namespace(anddeploymentUserif the component needs one) directly inside that component's block. There is no shared/global settings section. - The install fails immediately if a required setting is empty. If you turn a component on but leave one of its required values blank,
helm installaborts with an error naming the exact value to fill in.
What each component needs
| Component | Required values when enabled: true |
|---|---|
adeptiaConnect | namespace, deploymentUser |
rabbitmq | namespace always. When permissions: "restricted": also deploymentUser and applicationNamespace. |
externalSecrets | namespace, deploymentUser, serviceAccountName (default adeptia-es) |
lanPv | claimRef.namespace, nfs.server, nfs.path |
openshiftLogging | namespace, serviceAccount.name (default openshift-logging-forwarder) |
deploymentUser is the name of the cluster user (or CI account) that will run helm install.
The --namespace flag
Always pass --namespace <namespace> on every helm command for this chart. The <namespace> value must match the namespace the component(s) in that release use. Use the same --namespace value on every later helm upgrade, helm uninstall, and helm list for that release.
Scenario 1 covers per-component installs (each component in its own namespace, its own release). Scenario 2 covers one shared namespace for everything in a single release.
RabbitMQ install modes
The rabbitmq component supports two install modes, selected by rabbitmq.permissions in values.yaml. Pick exactly one — they are mutually exclusive.
permissions value | What it installs | When to use |
|---|---|---|
"cluster-wide" (default) | Cluster-wide RBAC for both RabbitMQ operators (cluster-operator + messaging-topology-operator), plus the RabbitMQ CRDs. The cluster-operator pod can manage RabbitmqCluster resources in any namespace. | Standard install. |
"restricted" | Permissions for the deployment user (so they can install the upstream RabbitMQ operator chart); the RabbitMQ CRDs; a namespace-scoped Role + RoleBinding in applicationNamespace granting the cluster-operator's ServiceAccount runtime permissions in that namespace; and the messaging-topology-operator's cluster-wide ClusterRole + ClusterRoleBinding (kept cluster-wide in both modes). No cluster-wide permissions for the cluster-operator. | The customer is uncomfortable granting cluster-wide RBAC to the cluster-operator. Configure the upstream RabbitMQ operator chart with WATCH_NAMESPACES=<applicationNamespace> to limit the cluster-operator to that namespace. |
Any other value for rabbitmq.permissions aborts the install with a clear error. deploymentUser and applicationNamespace are required only in restricted mode.
Note: the messaging-topology-operator's ClusterRole + ClusterRoleBinding are installed in both modes. Only the cluster-operator's RBAC differs between modes (cluster-wide ClusterRole/ClusterRoleBinding in cluster-wide mode; namespace-scoped Role/RoleBinding in applicationNamespace in restricted mode).
Install scenarios
Note: install only the components you actually need. Skip any sub-scenario you don't use.
The helm command shape is the same everywhere:
helm install <releaseName> ./roles \
--namespace <namespace> \
-f values.yaml
<releaseName> is any name you choose. <namespace> is the namespace the enabled component(s) in this release use.
Scenario 1 — Each component in its own namespace (one release per component)
Use this pattern when components live in different namespaces. Run one helm install per component you want, each with its own values file and --namespace.
1A — Adeptia application
Installs the in-namespace permissions (Role + RoleBinding) the Adeptia Connect application needs to operate inside its namespace. This is the minimum for any Adeptia install.
values.yaml
adeptiaConnect:
enabled: true
namespace: adeptia-prod
deploymentUser: ci-deployer
Commands
kubectl create namespace adeptia-prod
helm install adeptia-roles-app ./roles \
--namespace adeptia-prod \
-f values.yaml
1B — RabbitMQ (cluster-wide mode)
Installs cluster-wide permissions for both RabbitMQ operators (cluster-operator + messaging-topology-operator) plus the RabbitMQ CRDs. Once you separately install the upstream RabbitMQ operator chart, the cluster-operator can manage RabbitmqCluster resources in any namespace on the cluster.
values.yaml
rabbitmq:
enabled: true
namespace: rabbitmq-system
permissions: cluster-wide # default; this line is optional
Commands
kubectl create namespace rabbitmq-system
helm install adeptia-roles-rmq ./roles \
--namespace rabbitmq-system \
-f values.yaml
Note: install either 1B or 1C — not both. They are two mutually exclusive RabbitMQ install modes.
1C — RabbitMQ (restricted mode)
Installs four things: the deployment user's permissions (so the user can install the upstream RabbitMQ operator chart); the RabbitMQ CRDs; a namespace-scoped Role + RoleBinding in applicationNamespace that grants the cluster-operator's ServiceAccount the runtime permissions it needs to manage RabbitmqCluster resources in that one namespace; and the messaging-topology-operator's cluster-wide ClusterRole + ClusterRoleBinding (the messaging-topology operator stays cluster-wide in both modes — only the cluster-operator's scope changes).
No cluster-wide permissions are granted to the cluster-operator. It will only see CRs in applicationNamespace, which you must mirror via WATCH_NAMESPACES in the upstream operator chart.
namespace is where the operator pods / ServiceAccounts live; applicationNamespace is where the cluster-operator manages resources. They can be the same namespace or different.
values.yaml
rabbitmq:
enabled: true
namespace: rabbitmq-system # where the operator's ServiceAccount lives
permissions: restricted
deploymentUser: ci-deployer
applicationNamespace: adeptia-prod # where the operator will manage RabbitmqCluster resources
Commands
kubectl create namespace rabbitmq-system
helm install adeptia-roles-rmq ./roles \
--namespace rabbitmq-system \
-f values.yaml
1D — External Secrets (KES)
Installs the ServiceAccount, the ClusterRole + ClusterRoleBindings, and the ExternalSecret CRD that Adeptia needs to interact with Kubernetes External Secrets (KES).
values.yaml
externalSecrets:
enabled: true
namespace: adeptia-prod
deploymentUser: ci-deployer
# serviceAccountName: adeptia-es # default; override only if KES was installed with a renamed SA
Commands
kubectl create namespace adeptia-prod
helm install adeptia-roles-kes ./roles \
--namespace adeptia-prod \
-f values.yaml
1E — NFS PersistentVolume
Creates a cluster-scoped, NFS-backed PersistentVolume that Adeptia's LAN-share PVC will bind to.
values.yaml
lanPv:
enabled: true
claimRef:
namespace: adeptia-prod # where the PVC binding to this PV will live
nfs:
server: 10.0.0.5
path: /exports/adeptia
Commands
kubectl create namespace adeptia-prod
helm install adeptia-roles-pv ./roles \
--namespace adeptia-prod \
-f values.yaml
1F — OpenShift logging
Installs the bindings that let the OpenShift cluster-logging operator's ServiceAccount collect and forward Adeptia's pod logs. The bindings reference OpenShift-shipped ClusterRoles (privileged SCC + the three collect-*-logs roles) — this scenario only adds the bindings, not those ClusterRoles themselves.
values.yaml
openshiftLogging:
enabled: true
namespace: openshift-logging
# serviceAccount.name: openshift-logging-forwarder # default
Commands
# openshift-logging usually exists already on OpenShift
kubectl create namespace openshift-logging 2>/dev/null || true
helm install adeptia-roles-logging ./roles \
--namespace openshift-logging \
-f values.yaml
Scenario 2 — All components in one shared namespace (single release)
Use this pattern when every component you want shares one namespace. Turn them all on in one values file and install once.
openshiftLoggingtypically lives inopenshift-loggingand can't share a namespace with the others — install it separately following Scenario 1F.
2A — Combined install with RabbitMQ in cluster-wide mode
Installs Adeptia + RabbitMQ (cluster-wide) + KES + lanPv in one go, all sharing the same namespace, in a single helm release. The RabbitMQ operator will manage RabbitmqCluster resources cluster-wide once the upstream operator chart is installed.
values.yaml
adeptiaConnect:
enabled: true
namespace: adeptia-prod
deploymentUser: ci-deployer
rabbitmq:
enabled: true
namespace: adeptia-prod
permissions: cluster-wide # default; this line is optional
externalSecrets:
enabled: true
namespace: adeptia-prod
deploymentUser: ci-deployer
lanPv:
enabled: true
claimRef:
namespace: adeptia-prod
nfs:
server: 10.0.0.5
path: /exports/adeptia
Commands
kubectl create namespace adeptia-prod
helm install adeptia-roles ./roles \
--namespace adeptia-prod \
-f values.yaml
Note: install either 2A or 2B — not both. They differ only in the RabbitMQ install mode, and that mode must be picked once per cluster.
2B — Combined install with RabbitMQ in restricted mode
Same as 2A but with the cluster-operator's RBAC scoped to applicationNamespace instead of cluster-wide. The chart adds a Role + RoleBinding in applicationNamespace granting the cluster-operator's ServiceAccount runtime perms in that namespace. The messaging-topology-operator's cluster-wide RBAC is installed unchanged. The customer must configure the upstream RabbitMQ operator chart with WATCH_NAMESPACES=adeptia-prod after this is installed.
Since everything shares one namespace here, rabbitmq.applicationNamespace is set to the same value as rabbitmq.namespace.
values.yaml
adeptiaConnect:
enabled: true
namespace: adeptia-prod
deploymentUser: ci-deployer
rabbitmq:
enabled: true
namespace: adeptia-prod # operator SA lives here
permissions: restricted
deploymentUser: ci-deployer
applicationNamespace: adeptia-prod # operator manages resources here (same namespace in this scenario)
externalSecrets:
enabled: true
namespace: adeptia-prod
deploymentUser: ci-deployer
lanPv:
enabled: true
claimRef:
namespace: adeptia-prod
nfs:
server: 10.0.0.5
path: /exports/adeptia
Commands
kubectl create namespace adeptia-prod
helm install adeptia-roles ./roles \
--namespace adeptia-prod \
-f values.yaml
Verify the install
After any install:
helm list -A # all releases on the cluster
helm get manifest <releaseName> --namespace <namespace> # objects this specific release created
kubectl get role,rolebinding -A | grep -E 'adeptia|operator-deployment'
kubectl get clusterrole,clusterrolebinding | grep -E 'adeptia|rabbitmq|collect-'
kubectl get crd | grep -E 'rabbitmq.com|kubernetes-client.io'
kubectl get pv | grep nfs-pv
Upgrade
Edit the values file, then re-run with the same release name and same --namespace:
helm upgrade <releaseName> ./roles \
--namespace <namespace> \
-f values.yaml
For Scenario 1 (per-component releases),
Deploy roles with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has roles 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartroles is pinned at v4.8.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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