helper-operator
by tjungbauer
A helper Chart to reduce code repetition. This Chart should be called as a dependency by other charts in order to install Operators.
About this chart
helper-operator
Description
A helper Chart to reduce code repetition. This Chart should be called as a dependency by other charts in order to install Operators.
This chart can be used to install Operators in OpenShift. It is best used with a GitOps approach such as Argo CD does. For example: https://github.com/tjungbauer/openshift-clusterconfig-gitops
This chart will create the objects: Namespace, Subscription, OperatorGroup and a Job, that will enable additional console plugins, if enabled.
NOTE: It is usually used as Subchart for other Charts and it works best with the second subchart helper-status-checker
NEW:
- 1.0.40: a possibility was added to define a custom OperatorGroup name. This might be useful when the Operator was already installed and such resource was created already with a special name and you want to keep this resource.
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/helper-operator
Parameters
Values
namespace
| Key | Type | Default | Description |
|---|---|---|---|
| console_plugins.additionalAnnotations | object | {} | Additional labels to add to the instance as key: value pairs. |
| console_plugins.additionalLabels | object | {} | Additional labels to add to the instance as key: value pairs. |
| operators.my-operator.additionalAnnotations | object | {} | Additional labels to add to the instance as key: value pairs. |
| operators.my-operator.additionalLabels | object | {} | Additional labels to add to the instance as key: value pairs. |
Other Values
| Key | Type | Default | Description |
|---|---|---|---|
| console_plugins | object | "" | Configure console plugins for OpenShift. |
| console_plugins.enabled | bool | false | Enable console plugin configuration. |
| console_plugins.job_namespace | string | kube-system | Optional: Namespace where kubernetes job shall be executed. |
| console_plugins.job_service_account | string | enable-console-plugin-sa | Optional: Name of the service account that will execute the Job. |
| console_plugins.job_service_account_crb | string | enable-console-plugin-crb | Optional: Name of the ClusterRoleBinding. |
| console_plugins.job_service_account_role | string | enable-console-plugin-role | Optional: Name of the role that will be assigned to the service account. |
| console_plugins.plugins | list | empty | List of console plugins to configure. Each list item will be added to the OpenShift UI. |
| console_plugins.syncwave | int | 5 | Optional: Syncwave for console plugin configuration. |
| console_plugins.ttlSecondsAfterFinished | int | 600 | Seconds to retain the finished console-plugin Job before Kubernetes deletes it |
| operators | object | "" | Define operators that you want to deploy. A key/value setup is used here. Each new operator is a new key (in this example "my-operator") |
| operators.my-operator.enabled | bool | false | Enabled yes/no |
| operators.my-operator.namespace.create | bool | false | Create the Namespace yes/no. |
| operators.my-operator.namespace.descr | string | "" | Description of the namespace. |
| operators.my-operator.namespace.displayname | string | "" | Displayname of the namespace. |
| operators.my-operator.namespace.name | string | "openshift-operators-redhat" | The Namespace the Operator should be installed in. |
| operators.my-operator.operatorgroup.create | bool | false | Create an Operatorgroup object |
| operators.my-operator.operatorgroup.notownnamespace | bool | false | Monitor own Namespace. For some Operators no targetNamespaces must be defined |
| operators.my-operator.subscription | object | "" | Definition of the Operator Subscription |
| operators.my-operator.subscription.approval | string | Automatic | Update behavior of the Operator. Manual/Automatic |
| operators.my-operator.subscription.channel | string | stable | Channel of the Subscription |
| operators.my-operator.subscription.config | object | "" | Optional additional configuration for the Operator subscription. |
| operators.my-operator.subscription.config.env | list | "" | Additional environment parameter, as a list: name/value |
| operators.my-operator.subscription.config.nodeSelector | object | "" | Optionally define a nodeSelector. |
| operators.my-operator.subscription.config.resources | object | "" | Optionally set resources (limits/requests) for the Operator. |
| operators.my-operator.subscription.config.tolerations | list | "" | Optionally set Tolerations for the Subscription. |
| operators.my-operator.subscription.config.trustedCA | object | {"configMap":"trusted-ca-bundle","configMapKey":"ca-bundle.crt","configMapPath":"ca-bundle.crt","enabled":false} | Optionally set trusted CA bundle for the Operator. |
| operators.my-operator.subscription.config.trustedCA.configMap | string | "trusted-ca-bundle" | Name of the ConfigMap containing the CA bundle. |
| operators.my-operator.subscription.config.trustedCA.configMapKey | string | "ca-bundle.crt" | Key of the CA bundle in the ConfigMap. |
| operators.my-operator.subscription.config.trustedCA.configMapPath | string | "ca-bundle.crt" | Path of the CA bundle in the ConfigMap. |
| operators.my-operator.subscription.config.trustedCA.enabled | bool | false | Enable or disable the trusted CA bundle for the Operator. |
| operators.my-operator.subscription.operatorName | string | "empty" | Name of the Operator |
| operators.my-operator.subscription.source | string | redhat-operators | Source of the Operator |
| operators.my-operator.subscription.sourceNamespace | string | openshift-marketplace | Namespace of the source |
| operators.my-operator.syncwave | int | 0 | Syncwave for the operator deployment |
Example
Installing the Operator "Loki"
TIP: Fetch the values for the subscription specification with oc get packagemanifest advanced-cluster-management -o yaml
---
console_plugins:
enabled: false
syncwave: 5
plugins:
- plugin_name
job_namespace: kube-system
operators:
loki-operator:
enabled: false
namespace:
name: openshift-operators-redhat
create: true
subscription:
channel: stable
approval: Automatic
operatorName: loki-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
config:
env:
- name: FIRST_ENV_PARAMENTER
value: ThisIsRequierd
- name: SECOND_ENV_PARAMETER
value: 'true'
resources:
limits:
cpu: 100m
memory: 1Gi
requests:
cpu: 400m
memory: 300Mi
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/infra
value: reserved
- effect: NoExecute
key: node-role.kubernetes.io/infra
value: reserved
nodeSelector:
key: node-role.kubernetes.io/infra
value: ""
operatorgroup:
create: true
name: my-custom-operatorgroup-name # optional value, default is the name of the $key (here loki-operator)
notownnamespace: true
Installing the Chart
To install the chart with the release name my-release:
helm install my-release tjungbauer/<chart-name>>
The command deploys the chart on the Kubernetes cluster in the default configuration.
Uninstalling the Chart
To uninstall/delete the my-release deployment:
helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Autogenerated from chart metadata using helm-docs v1.14.2
Deploy helper-operator with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has helper-operator 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 charthelper-operator is pinned at v1.0.45 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