Skip to content

OSDOCS 15419 CMA Automatically create KedaController during CMA Operator installation process #96337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 0 additions & 50 deletions modules/nodes-cma-autoscaling-custom-install.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -80,53 +80,3 @@ deployment.apps/custom-metrics-autoscaler-operator 1/1 1 1
NAME DESIRED CURRENT READY AGE
replicaset.apps/custom-metrics-autoscaler-operator-5fd8d9ffd8 1 1 1 18m
----

. Install the `KedaController` custom resource, which creates the required CRDs:

.. In the {product-title} web console, click *Operators* -> *Installed Operators*.

.. Click *Custom Metrics Autoscaler*.

.. On the *Operator Details* page, click the *KedaController* tab.

.. On the *KedaController* tab, click *Create KedaController* and edit the file.
+
[source,yaml]
----
kind: KedaController
apiVersion: keda.sh/v1alpha1
metadata:
name: keda
namespace: openshift-keda
spec:
watchNamespace: '' <1>
operator:
logLevel: info <2>
logEncoder: console <3>
caConfigMaps: <4>
- thanos-cert
- kafka-cert
metricsServer:
logLevel: '0' <5>
auditConfig: <6>
logFormat: "json"
logOutputVolumeClaim: "persistentVolumeClaimName"
policy:
rules:
- level: Metadata
omitStages: ["RequestReceived"]
omitManagedFields: false
lifetime:
maxAge: "2"
maxBackup: "1"
maxSize: "50"
serviceAccount: {}
----
<1> Specifies a single namespace in which the Custom Metrics Autoscaler Operator should scale applications. Leave it blank or leave it empty to scale applications in all namespaces. This field should have a namespace or be empty. The default value is empty.
<2> Specifies the level of verbosity for the Custom Metrics Autoscaler Operator log messages. The allowed values are `debug`, `info`, `error`. The default is `info`.
<3> Specifies the logging format for the Custom Metrics Autoscaler Operator log messages. The allowed values are `console` or `json`. The default is `console`.
<4> Optional: Specifies one or more config maps with CA certificates, which the Custom Metrics Autoscaler Operator can use to connect securely to TLS-enabled metrics sources.
<5> Specifies the logging level for the Custom Metrics Autoscaler Metrics Server. The allowed values are `0` for `info` and `4` for `debug`. The default is `0`.
<6> Activates audit logging for the Custom Metrics Autoscaler Operator and specifies the audit policy to use, as described in the "Configuring audit logging" section.

.. Click *Create* to create the KEDA controller.
59 changes: 59 additions & 0 deletions modules/nodes-cma-autoscaling-keda-controller-edit.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// Module included in the following assemblies:
//
// * nodes/cma/nodes-cma-autoscaling-custom-install.adoc

:_mod-docs-content-type: PROCEDURE
[id="nodes-cma-autoscaling-keda-controller-edit_{context}"]
= Editing the Keda Controller CR

You can use the following procedure to modify the `KedaController` custom resource (CR), which is automatically installed during the installation of the Custom Metrics Autoscaler Operator.

.Procedure

. In the {product-title} web console, click *Operators* -> *Installed Operators*.

. Click *Custom Metrics Autoscaler*.

. On the *Operator Details* page, click the *KedaController* tab.

. On the *KedaController* tab, click *Create KedaController* and edit the file.
+
[source,yaml]
----
kind: KedaController
apiVersion: keda.sh/v1alpha1
metadata:
name: keda
namespace: openshift-keda
spec:
watchNamespace: '' <1>
operator:
logLevel: info <2>
logEncoder: console <3>
caConfigMaps: <4>
- thanos-cert
- kafka-cert
metricsServer:
logLevel: '0' <5>
auditConfig: <6>
logFormat: "json"
logOutputVolumeClaim: "persistentVolumeClaimName"
policy:
rules:
- level: Metadata
omitStages: ["RequestReceived"]
omitManagedFields: false
lifetime:
maxAge: "2"
maxBackup: "1"
maxSize: "50"
serviceAccount: {}
----
<1> Specifies a single namespace in which the Custom Metrics Autoscaler Operator scales applications. Leave it blank or leave it empty to scale applications in all namespaces. This field should have a namespace or be empty. The default value is empty.
<2> Specifies the level of verbosity for the Custom Metrics Autoscaler Operator log messages. The allowed values are `debug`, `info`, `error`. The default is `info`.
<3> Specifies the logging format for the Custom Metrics Autoscaler Operator log messages. The allowed values are `console` or `json`. The default is `console`.
<4> Optional: Specifies one or more config maps with CA certificates, which the Custom Metrics Autoscaler Operator can use to connect securely to TLS-enabled metrics sources.
<5> Specifies the logging level for the Custom Metrics Autoscaler Metrics Server. The allowed values are `0` for `info` and `4` for `debug`. The default is `0`.
<6> Activates audit logging for the Custom Metrics Autoscaler Operator and specifies the audit policy to use, as described in the "Configuring audit logging" section.

. Click *Save* to save the changes.
49 changes: 0 additions & 49 deletions modules/sd-nodes-cma-autoscaling-custom-install.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -95,52 +95,3 @@ NAME DESIRED CURREN
replicaset.apps/custom-metrics-autoscaler-operator-5fd8d9ffd8 1 1 1 18m
----

. Install the `KedaController` custom resource, which creates the required CRDs:

.. In the {product-title} web console, click *Operators* -> *Installed Operators*.

.. Click *Custom Metrics Autoscaler*.

.. On the *Operator Details* page, click the *KedaController* tab.

.. On the *KedaController* tab, click *Create KedaController* and edit the file.
+
[source,yaml]
----
kind: KedaController
apiVersion: keda.sh/v1alpha1
metadata:
name: keda
namespace: keda
spec:
watchNamespace: '' <1>
operator:
logLevel: info <2>
logEncoder: console <3>
caConfigMaps: <4>
- thanos-cert
- kafka-cert
metricsServer:
logLevel: '0' <5>
auditConfig: <6>
logFormat: "json"
logOutputVolumeClaim: "persistentVolumeClaimName"
policy:
rules:
- level: Metadata
omitStages: ["RequestReceived"]
omitManagedFields: false
lifetime:
maxAge: "2"
maxBackup: "1"
maxSize: "50"
serviceAccount: {}
----
<1> Specifies a single namespace in which the Custom Metrics Autoscaler Operator should scale applications. Leave it blank or leave it empty to scale applications in all namespaces. This field should have a namespace or be empty. The default value is empty.
<2> Specifies the level of verbosity for the Custom Metrics Autoscaler Operator log messages. The allowed values are `debug`, `info`, `error`. The default is `info`.
<3> Specifies the logging format for the Custom Metrics Autoscaler Operator log messages. The allowed values are `console` or `json`. The default is `console`.
<4> Optional: Specifies one or more config maps with CA certificates, which the Custom Metrics Autoscaler Operator can use to connect securely to TLS-enabled metrics sources.
<5> Specifies the logging level for the Custom Metrics Autoscaler Metrics Server. The allowed values are `0` for `info` and `4` for `debug`. The default is `0`.
<6> Activates audit logging for the Custom Metrics Autoscaler Operator and specifies the audit policy to use, as described in the "Configuring audit logging" section.

.. Click *Create* to create the KEDA controller.
9 changes: 9 additions & 0 deletions nodes/cma/nodes-cma-autoscaling-custom-install.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,19 @@ The installation creates the following five CRDs:
* `ScaledObject`
* `TriggerAuthentication`

The installation process also creates the `KedaController` custom resource (CR). You can modify the default `KedaController` CR, if needed. For more information, see "Editing the Keda Controller CR".

[NOTE]
====
If you are installing a Custom Metrics Autoscaler Operator version lower than 2.17.2, you must manually create the Keda Controller CR. You can use the procedure described in "Editing the Keda Controller CR" to create the CR.
====

ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
include::modules/nodes-cma-autoscaling-custom-install.adoc[leveloffset=+1]
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]

ifdef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
include::modules/sd-nodes-cma-autoscaling-custom-install.adoc[leveloffset=+1]
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]

include::modules/nodes-cma-autoscaling-keda-controller-edit.adoc[leveloffset=+1]