Skip to content

Commit eeb6b3a

Browse files
author
Michael Burke
committed
Automatically create KedaController during CMA Operator installation process
1 parent a4d1212 commit eeb6b3a

4 files changed

+68
-99
lines changed

modules/nodes-cma-autoscaling-custom-install.adoc

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -80,53 +80,3 @@ deployment.apps/custom-metrics-autoscaler-operator 1/1 1 1
8080
NAME DESIRED CURRENT READY AGE
8181
replicaset.apps/custom-metrics-autoscaler-operator-5fd8d9ffd8 1 1 1 18m
8282
----
83-
84-
. Install the `KedaController` custom resource, which creates the required CRDs:
85-
86-
.. In the {product-title} web console, click *Operators* -> *Installed Operators*.
87-
88-
.. Click *Custom Metrics Autoscaler*.
89-
90-
.. On the *Operator Details* page, click the *KedaController* tab.
91-
92-
.. On the *KedaController* tab, click *Create KedaController* and edit the file.
93-
+
94-
[source,yaml]
95-
----
96-
kind: KedaController
97-
apiVersion: keda.sh/v1alpha1
98-
metadata:
99-
name: keda
100-
namespace: openshift-keda
101-
spec:
102-
watchNamespace: '' <1>
103-
operator:
104-
logLevel: info <2>
105-
logEncoder: console <3>
106-
caConfigMaps: <4>
107-
- thanos-cert
108-
- kafka-cert
109-
metricsServer:
110-
logLevel: '0' <5>
111-
auditConfig: <6>
112-
logFormat: "json"
113-
logOutputVolumeClaim: "persistentVolumeClaimName"
114-
policy:
115-
rules:
116-
- level: Metadata
117-
omitStages: ["RequestReceived"]
118-
omitManagedFields: false
119-
lifetime:
120-
maxAge: "2"
121-
maxBackup: "1"
122-
maxSize: "50"
123-
serviceAccount: {}
124-
----
125-
<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.
126-
<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`.
127-
<3> Specifies the logging format for the Custom Metrics Autoscaler Operator log messages. The allowed values are `console` or `json`. The default is `console`.
128-
<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.
129-
<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`.
130-
<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.
131-
132-
.. Click *Create* to create the KEDA controller.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * nodes/cma/nodes-cma-autoscaling-custom-install.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="nodes-cma-autoscaling-keda-controller-edit_{context}"]
7+
= Editing the Keda Controller CR
8+
9+
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.
10+
11+
.Procedure
12+
13+
. In the {product-title} web console, click *Operators* -> *Installed Operators*.
14+
15+
. Click *Custom Metrics Autoscaler*.
16+
17+
. On the *Operator Details* page, click the *KedaController* tab.
18+
19+
. On the *KedaController* tab, click *Create KedaController* and edit the file.
20+
+
21+
[source,yaml]
22+
----
23+
kind: KedaController
24+
apiVersion: keda.sh/v1alpha1
25+
metadata:
26+
name: keda
27+
namespace: openshift-keda
28+
spec:
29+
watchNamespace: '' <1>
30+
operator:
31+
logLevel: info <2>
32+
logEncoder: console <3>
33+
caConfigMaps: <4>
34+
- thanos-cert
35+
- kafka-cert
36+
metricsServer:
37+
logLevel: '0' <5>
38+
auditConfig: <6>
39+
logFormat: "json"
40+
logOutputVolumeClaim: "persistentVolumeClaimName"
41+
policy:
42+
rules:
43+
- level: Metadata
44+
omitStages: ["RequestReceived"]
45+
omitManagedFields: false
46+
lifetime:
47+
maxAge: "2"
48+
maxBackup: "1"
49+
maxSize: "50"
50+
serviceAccount: {}
51+
----
52+
<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.
53+
<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`.
54+
<3> Specifies the logging format for the Custom Metrics Autoscaler Operator log messages. The allowed values are `console` or `json`. The default is `console`.
55+
<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.
56+
<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`.
57+
<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.
58+
59+
. Click *Save* to save the changes.

modules/sd-nodes-cma-autoscaling-custom-install.adoc

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -95,52 +95,3 @@ NAME DESIRED CURREN
9595
replicaset.apps/custom-metrics-autoscaler-operator-5fd8d9ffd8 1 1 1 18m
9696
----
9797

98-
. Install the `KedaController` custom resource, which creates the required CRDs:
99-
100-
.. In the {product-title} web console, click *Operators* -> *Installed Operators*.
101-
102-
.. Click *Custom Metrics Autoscaler*.
103-
104-
.. On the *Operator Details* page, click the *KedaController* tab.
105-
106-
.. On the *KedaController* tab, click *Create KedaController* and edit the file.
107-
+
108-
[source,yaml]
109-
----
110-
kind: KedaController
111-
apiVersion: keda.sh/v1alpha1
112-
metadata:
113-
name: keda
114-
namespace: keda
115-
spec:
116-
watchNamespace: '' <1>
117-
operator:
118-
logLevel: info <2>
119-
logEncoder: console <3>
120-
caConfigMaps: <4>
121-
- thanos-cert
122-
- kafka-cert
123-
metricsServer:
124-
logLevel: '0' <5>
125-
auditConfig: <6>
126-
logFormat: "json"
127-
logOutputVolumeClaim: "persistentVolumeClaimName"
128-
policy:
129-
rules:
130-
- level: Metadata
131-
omitStages: ["RequestReceived"]
132-
omitManagedFields: false
133-
lifetime:
134-
maxAge: "2"
135-
maxBackup: "1"
136-
maxSize: "50"
137-
serviceAccount: {}
138-
----
139-
<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.
140-
<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`.
141-
<3> Specifies the logging format for the Custom Metrics Autoscaler Operator log messages. The allowed values are `console` or `json`. The default is `console`.
142-
<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.
143-
<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`.
144-
<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.
145-
146-
.. Click *Create* to create the KEDA controller.

nodes/cma/nodes-cma-autoscaling-custom-install.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,19 @@ The installation creates the following five CRDs:
1717
* `ScaledObject`
1818
* `TriggerAuthentication`
1919
20+
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".
21+
22+
[NOTE]
23+
====
24+
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.
25+
====
26+
2027
ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
2128
include::modules/nodes-cma-autoscaling-custom-install.adoc[leveloffset=+1]
2229
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
2330

2431
ifdef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
2532
include::modules/sd-nodes-cma-autoscaling-custom-install.adoc[leveloffset=+1]
2633
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
34+
35+
include::modules/nodes-cma-autoscaling-keda-controller-edit.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)