helper-operator

by tjungbauer

Helm chartv1.0.45Apache-2.0Verified publisher

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

NameEmailUrl
tjungbauer[email protected]https://blog.stderr.at/

Sources

Source:

Source code: https://github.com/tjungbauer/helm-charts/tree/main/charts/helper-operator

Parameters

Values

namespace

KeyTypeDefaultDescription
console_plugins.additionalAnnotationsobject{}Additional labels to add to the instance as key: value pairs.
console_plugins.additionalLabelsobject{}Additional labels to add to the instance as key: value pairs.
operators.my-operator.additionalAnnotationsobject{}Additional labels to add to the instance as key: value pairs.
operators.my-operator.additionalLabelsobject{}Additional labels to add to the instance as key: value pairs.

Other Values

KeyTypeDefaultDescription
console_pluginsobject""Configure console plugins for OpenShift.
console_plugins.enabledboolfalseEnable console plugin configuration.
console_plugins.job_namespacestringkube-systemOptional: Namespace where kubernetes job shall be executed.
console_plugins.job_service_accountstringenable-console-plugin-saOptional: Name of the service account that will execute the Job.
console_plugins.job_service_account_crbstringenable-console-plugin-crbOptional: Name of the ClusterRoleBinding.
console_plugins.job_service_account_rolestringenable-console-plugin-roleOptional: Name of the role that will be assigned to the service account.
console_plugins.pluginslistemptyList of console plugins to configure. Each list item will be added to the OpenShift UI.
console_plugins.syncwaveint5Optional: Syncwave for console plugin configuration.
console_plugins.ttlSecondsAfterFinishedint600Seconds to retain the finished console-plugin Job before Kubernetes deletes it
operatorsobject""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.enabledboolfalseEnabled yes/no
operators.my-operator.namespace.createboolfalseCreate the Namespace yes/no.
operators.my-operator.namespace.descrstring""Description of the namespace.
operators.my-operator.namespace.displaynamestring""Displayname of the namespace.
operators.my-operator.namespace.namestring"openshift-operators-redhat"The Namespace the Operator should be installed in.
operators.my-operator.operatorgroup.createboolfalseCreate an Operatorgroup object
operators.my-operator.operatorgroup.notownnamespaceboolfalseMonitor own Namespace. For some Operators no targetNamespaces must be defined
operators.my-operator.subscriptionobject""Definition of the Operator Subscription
operators.my-operator.subscription.approvalstringAutomaticUpdate behavior of the Operator. Manual/Automatic
operators.my-operator.subscription.channelstringstableChannel of the Subscription
operators.my-operator.subscription.configobject""Optional additional configuration for the Operator subscription.
operators.my-operator.subscription.config.envlist""Additional environment parameter, as a list: name/value
operators.my-operator.subscription.config.nodeSelectorobject""Optionally define a nodeSelector.
operators.my-operator.subscription.config.resourcesobject""Optionally set resources (limits/requests) for the Operator.
operators.my-operator.subscription.config.tolerationslist""Optionally set Tolerations for the Subscription.
operators.my-operator.subscription.config.trustedCAobject{"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.configMapstring"trusted-ca-bundle"Name of the ConfigMap containing the CA bundle.
operators.my-operator.subscription.config.trustedCA.configMapKeystring"ca-bundle.crt"Key of the CA bundle in the ConfigMap.
operators.my-operator.subscription.config.trustedCA.configMapPathstring"ca-bundle.crt"Path of the CA bundle in the ConfigMap.
operators.my-operator.subscription.config.trustedCA.enabledboolfalseEnable or disable the trusted CA bundle for the Operator.
operators.my-operator.subscription.operatorNamestring"empty"Name of the Operator
operators.my-operator.subscription.sourcestringredhat-operatorsSource of the Operator
operators.my-operator.subscription.sourceNamespacestringopenshift-marketplaceNamespace of the source
operators.my-operator.syncwaveint0Syncwave 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the charthelper-operator is pinned at v1.0.45 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