rhacs-setup
by tjungbauer
Master chart to deploy RHACS operator, initialize it and do some configuration using API Calls
About this chart
rhacs-setup
Description
Master chart to deploy RHACS operator, initialize it and do some configuration using API Calls
This Helm Chart is installing and configuring Advanced Cluster Security, using the following workflow:
- Create required Namespace for the operator.
- Installing the ACS operator by applying the Subscription and OperatorGroup object. (In addition, the InstallPlan can be approved if required)
- Verifying if the operator is ready to use Install and configure the compliance operator.
- Create the Namespace for Stackrox instance.
- Deploy the Central
- Create an init-Bundle for the Secured Cluster
- Deploy the Secured Cluster instance on the Central cluster.
- Job: Create a ConsoleLink for eady access of ACS.
- Job: Configure ACS with OpenShift Authentication for the user kubeadmin
The whole process has multiple hooks and waves, which are illustrated in the image:
Dependencies
This chart has the following dependencies:
| Repository | Name | Version |
|---|---|---|
| https://charts.stderr.at/ | tpl | ~1.0.31 |
It is best used with a full GitOps approach such as Argo CD does. For example, https://github.com/tjungbauer/openshift-clusterconfig-gitops (folder: clusters/management-cluster/setup-acs)
Maintainers
| Name | Url | |
|---|---|---|
| tjungbauer | [email protected] | https://blog.stderr.at/ |
Sources
Source:
- https://github.com/tjungbauer/helm-charts
- https://charts.stderr.at/
- https://github.com/tjungbauer/openshift-clusterconfig-gitops
Source code: https://github.com/tjungbauer/helm-charts/tree/main/charts/rhacs-setup
Parameters
Verify the subcharts for additional settings:
Values
| Key | Type | Default | Description |
|---|---|---|---|
| clustername | string | "local-cluster" | |
| helper-operator.operators.rhacs-operator.enabled | bool | false | |
| helper-operator.operators.rhacs-operator.namespace.create | bool | false | |
| helper-operator.operators.rhacs-operator.namespace.name | string | "rhacs-operator" | |
| helper-operator.operators.rhacs-operator.operatorgroup.create | bool | true | |
| helper-operator.operators.rhacs-operator.operatorgroup.notownnamespace | bool | true | |
| helper-operator.operators.rhacs-operator.subscription.approval | string | "Automatic" | |
| helper-operator.operators.rhacs-operator.subscription.channel | string | "stable" | |
| helper-operator.operators.rhacs-operator.subscription.operatorName | string | "rhacs-operator" | |
| helper-operator.operators.rhacs-operator.subscription.source | string | "redhat-operators" | |
| helper-operator.operators.rhacs-operator.subscription.sourceNamespace | string | "openshift-marketplace" | |
| helper-operator.operators.rhacs-operator.syncwave | string | "0" | |
| helper-status-checker.checks[0].namespace.name | string | "rhacs-operator" | |
| helper-status-checker.checks[0].operatorName | string | "rhacs-operator" | |
| helper-status-checker.checks[0].serviceAccount.name | string | "status-checker-acs" | |
| helper-status-checker.checks[0].syncwave | int | 3 | |
| helper-status-checker.enabled | bool | false | |
| operatornamespace | string | "rhacs-operator" | |
| override-rhacs-operator-version | string | "stable" | |
| rhacs.basic_acs_settings | object | {"additionalAnnotations":{},"additionalLabels":{},"auth_provider":"OpenShift","auth_provider_type":"openshift","min_access_role":"None","syncwave":5} | Basic settings for ACS authentication This configuration is done by a Job, that will configure the OpenShift oauth for ACS. |
| rhacs.central.additionalAnnotations | object | {} | |
| rhacs.central.additionalLabels | object | {} | |
| rhacs.central.adminPasswordSecret | string | omitted | Specify a secret that contains the administrator password in the "password" data item. If omitted, the operator will auto-generate a password and store it in the "password" item in the "central-htpasswd" secret. The Secret must exist. |
| rhacs.central.db | object | {"nodeSelector":{"key":"node-role.kubernetes.io/infra","value":""},"passwordSecret":"secretname","pvc":"central-db","pvc_size":"100Gi","pvc_storageclass":"storageclass","resources":{"limits":{"cpu":8,"ephemeral-storage":"500Mi","memory":"16Gi"},"requests":{"cpu":4,"ephemeral-storage":"50Mi","memory":"8Gi"}},"tolerations":[{"effect":"NoSchedule","key":"infra","operator":"Equal","value":"reserved"},{"effect":"NoSchedule","key":"infra","operator":"Equal","value":"reserved"}]} | Settings for Central DB, which is responsible for data persistence. |
| rhacs.central.db.nodeSelector | object | empty | Define nodeSelector for Sensor. |
| rhacs.central.db.passwordSecret | string | omitted | Specify a secret that contains the password in the "password" data item. This can only be used when specifying a connection string manually. When omitted, the operator will auto-generate a DB password and store it in the "password" item in the "central-db-password" secret. |
| rhacs.central.db.pvc | string | central-db | Configures how Central DB should store its persistent data. The name of the PVC to manage persistent data. If no PVC with the given name exists, it will be created. Defaults to "central-db" if not set. |
| rhacs.central.db.pvc_size | string | empty | The size of the persistent volume when created through the claim. If a claim was automatically created, this can be used after the initial deployment to resize (grow) the volume (only supported by some storage class controllers). |
| rhacs.central.db.pvc_storageclass | string | empty | The name of the storage class to use for the PVC. If your cluster is not configured with a default storage class, you must select a value here. |
| rhacs.central.db.resources | object | {"limits":{"cpu":8,"ephemeral-storage":"500Mi","memory":"16Gi"},"requests":{"cpu":4,"ephemeral-storage":"50Mi","memory":"8Gi"}} | Set Central DB resources.requests and resources.limits. Per default this block can be omitted. |
| rhacs.central.db.resources.limits.cpu | int | 4 | CPU limits. |
| rhacs.central.db.resources.limits.ephemeral-storage | string | empty | Storage limits |
| rhacs.central.db.resources.limits.memory | string | 8Gi | Memory limits. |
| rhacs.central.db.resources.requests.cpu | int | 4 | CPU requests. |
| rhacs.central.db.resources.requests.ephemeral-storage | string | empty | Storage requests |
| rhacs.central.db.resources.requests.memory | string | 8Gi | Memory requests. |
| rhacs.central.db.tolerations | list | [{"effect":"NoSchedule","key":"infra","operator":"Equal","value":"reserved"},{"effect":"NoSchedule","key":"infra","operator":"Equal","value":"reserved"}] | If you want this component to only run on specific nodes, you can configure tolerations of tainted nodes. |
| rhacs.central.declarativeConfiguration | object | emtpy | Define ConfigMaps with DeclerativeConfiguration |
| rhacs.central.defaultsslsecret | string | "secretname" | By default, Central will only serve an internal TLS certificate, which means that you will need to handle TLS termination at the ingress or load balancer level. If you want to terminate TLS in Central and serve a custom server certificate, you can specify a secret containing the certificate and private key here. Define here the name of the secret If you would like to set it. The secret must exist. |
| rhacs.central.egress | object | {"connectivityPolicy":"Online"} | Configures whether Red Hat Advanced Cluster Security should run in online or offline (disconnected) mode. In offline mode, automatic updates of vulnerability definitions and kernel modules are disabled. This parameter is MANDATORY default -- Online |
| rhacs.central.enabled | bool | false | Enabled yes or not. Typically, a Central is installed only once (maybe on the management cluster) and will manage different external clusters. |
| rhacs.central.loadBalancer | object | {"enabled":false,"ip":"127.0.0.1","port":443} | Expose Central through a load balancer service. |
| rhacs.central.loadBalancer.enabled | bool | false | Enable load balancer services. |
| rhacs.central.loadBalancer.ip | string | "127.0.0.1" | IP Address of the loadbalancer services. |
| rhacs.central.loadBalancer.port | int | 443 | Port of the load balancer service |
| rhacs.central.monitoring | string | Disabled | Enables monitoring endpoint for Central to allow other services to collect metrics from the Central. Can be either Enabled of Disabled. |
| rhacs.central.nodePort | object | {"enabled":false} | Expose Central through a node port. |
| rhacs.central.nodeSelector | object | empty | Define nodeSelector for Sensor. |
| rhacs.central.pvc | string | stackrox-db | The name of the PVC to manage persistent data. If no PVC with the given name exists, it will be created. Defaults to "stackrox-db" if not set. |
| rhacs.central.pvc_size | string | empty | The size of the persistent volume when created through the claim. If a claim was automatically created, this can be used after the initial deployment to resize (grow) the volume (only supported by some storage class controllers). |
| rhacs.central.pvc_storageclass | string | default storage class will be used | The name of the storage class to use for the PVC. If your cluster is not configured with a default storage class, you must select a value here. |
| rhacs.central.resources | object | {"limits":{"cpu":4,"ephemeral-storage":"500Mi","memory":"8Gi"},"requests":{"cpu":"500m","ephemeral-storage":"50Mi","memory":"1Gi"}} | Set resources.requests and resources.limits. Per default this block can be omitted. |
| rhacs.central.resources.limits.cpu | int | 4 | CPU limits. |
| rhacs.central.resources.limits.ephemeral-storage | string | empty | Storage limits |
| rhacs.central.resources.limits.memory | string | 8Gi | Memory limits. |
| rhacs.central.resources.requests.cpu | string | 1500m | CPU requests. |
| rhacs.central.resources.requests.ephemeral-storage | string | empty | Storage requests |
| rhacs.central.resources.requests.memory | string | 4Gi | Memory requests. |
| rhacs.central.route | object | {"enabled":true} | Expose Central through an OpenShift route. This is the default setting |
| rhacs.central.syncwave | string | 3 | Syncwave for Argo CD to create the Central |
| rhacs.central.tolerations | list | [{"effect":"NoSchedule","key":"infra","operator":"Equal","value":"reserved"},{"effect":"NoSchedule","key":"infra","operator":"Equal","value":"reserved"}] | If you want this component to only run on specific nodes, you can configure tolerations of tainted nodes. |
| rhacs.consolelink | object | {"additionalAnnotations":{},"additionalLabels":{},"enabled":true,"location":"ApplicationMenu","section":"Observability","syncwave":"3","text":"Advanced Cluster Security"} | Job that creates a console link in OpenShift |
| rhacs.consolelink.enabled | bool | false | Enable this Job |
| rhacs.consolelink.location | string | "ApplicationMenu" | Location of the ConsoleLink |
| rhacs.consolelink.section | string | "Observability" | Section of the ConsoleLink |
| rhacs.consolelink.syncwave | string | 3 | Syncwave for Argo CD to create this Job. |
| rhacs.consolelink.text | string | "Advanced Cluster Security" | Text of the ConsoleLink |
| rhacs.job_init_bundle | object | {"additionalAnnotations":{},"additionalLabels":{},"enabled":true,"syncwave":"3"} | Run the Job to initialze an ACS secrued cluster and creates a init bundle. |
| rhacs.job_init_bundle.enabled | bool | false | Enable this Job |
| rhacs.job_init_bundle.syncwave | string | 3 | Syncwave for Argo CD to create this Job. |
| rhacs.job_vars | object | {"max_attempts":20} | Variables for Jobs |
| rhacs.job_vars.max_attempts | int | 20 | Maximum retries for Jobs that need to check a certain state. |
| rhacs.namespace.additionalAnnotations | object | {} | |
| rhacs.namespace.additionalLabels | object | {} | |
| rhacs.namespace.descr | string | "Red Hat Advanced Cluster Security" | Description of the Namespace. |
| rhacs.namespace.name | string | "stackrox" | Namespace where ACS shall be deployed. Typicall, this is stackrox. This is not the Operator itself, that is usually deployed in "rhacs-operator". |
| rhacs.namespace.syncwave | string | 0 | Syncwave to deploy the ACS namespace. |
| rhacs.scanner.analyzer.autoscaling | object | {"max":3,"min":2,"replicas":3,"status":"Enabled"} | Automatically scale the Scanner |
| rhacs.scanner.analyzer.autoscaling.max | int | 3 | Max number of Pods |
| rhacs.scanner.analyzer.autoscaling.min | int | 2 | Minimum number of Pods |
| rhacs.scanner.analyzer.autoscaling.replicas | int | 3 | When autoscaling is disabled, the number of replicas will always be configured to match this value. |
| rhacs.scanner.analyzer.autoscaling.status | string | Enabled | Is austoscaling enabled? |
| rhacs.scanner.analyzer.nodeSelector | object | empty | De |
Deploy rhacs-setup with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has rhacs-setup 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 chartrhacs-setup is pinned at v1.0.52 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