Skip to content

Commit 606ec50

Browse files
authored
Merge pull request #65703 from mburke5678/cma-2112
OSDOCS_8148: Support CMA on OSD/ROSA
2 parents 95ab710 + e5b553d commit 606ec50

11 files changed

+383
-1
lines changed

_topic_maps/_topic_map_osd.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,37 @@ Topics:
607607
- Name: Custom domains for applications
608608
File: osd-config-custom-domains-applications
609609
---
610+
Name: Nodes
611+
Dir: nodes
612+
Distros: openshift-dedicated
613+
Topics:
614+
- Name: Automatically scaling pods with the Custom Metrics Autoscaler Operator
615+
Dir: cma
616+
Distros: openshift-dedicated
617+
Topics:
618+
- Name: Custom Metrics Autoscaler Operator overview
619+
File: nodes-cma-autoscaling-custom
620+
- Name: Custom Metrics Autoscaler Operator release notes
621+
File: nodes-cma-autoscaling-custom-rn
622+
- Name: Installing the custom metrics autoscaler
623+
File: nodes-cma-autoscaling-custom-install
624+
- Name: Understanding the custom metrics autoscaler triggers
625+
File: nodes-cma-autoscaling-custom-trigger
626+
- Name: Understanding the custom metrics autoscaler trigger authentications
627+
File: nodes-cma-autoscaling-custom-trigger-auth
628+
- Name: Pausing the custom metrics autoscaler
629+
File: nodes-cma-autoscaling-custom-pausing
630+
- Name: Gathering audit logs
631+
File: nodes-cma-autoscaling-custom-audit-log
632+
- Name: Gathering debugging data
633+
File: nodes-cma-autoscaling-custom-debugging
634+
- Name: Viewing Operator metrics
635+
File: nodes-cma-autoscaling-custom-metrics
636+
- Name: Understanding how to add custom metrics autoscalers
637+
File: nodes-cma-autoscaling-custom-adding
638+
- Name: Removing the Custom Metrics Autoscaler Operator
639+
File: nodes-cma-autoscaling-custom-removing
640+
---
610641
Name: Logging
611642
Dir: logging
612643
Distros: openshift-dedicated

_topic_maps/_topic_map_rosa.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,37 @@ Topics:
775775
- Name: Installing OADP on ROSA with STS
776776
File: backing-up-applications
777777
---
778+
Name: Nodes
779+
Dir: nodes
780+
Distros: openshift-rosa
781+
Topics:
782+
- Name: Automatically scaling pods with the Custom Metrics Autoscaler Operator
783+
Dir: cma
784+
Distros: openshift-rosa
785+
Topics:
786+
- Name: Custom Metrics Autoscaler Operator overview
787+
File: nodes-cma-autoscaling-custom
788+
- Name: Custom Metrics Autoscaler Operator release notes
789+
File: nodes-cma-autoscaling-custom-rn
790+
- Name: Installing the custom metrics autoscaler
791+
File: nodes-cma-autoscaling-custom-install
792+
- Name: Understanding the custom metrics autoscaler triggers
793+
File: nodes-cma-autoscaling-custom-trigger
794+
- Name: Understanding the custom metrics autoscaler trigger authentications
795+
File: nodes-cma-autoscaling-custom-trigger-auth
796+
- Name: Pausing the custom metrics autoscaler
797+
File: nodes-cma-autoscaling-custom-pausing
798+
- Name: Gathering audit logs
799+
File: nodes-cma-autoscaling-custom-audit-log
800+
- Name: Gathering debugging data
801+
File: nodes-cma-autoscaling-custom-debugging
802+
- Name: Viewing Operator metrics
803+
File: nodes-cma-autoscaling-custom-metrics
804+
- Name: Understanding how to add custom metrics autoscalers
805+
File: nodes-cma-autoscaling-custom-adding
806+
- Name: Removing the Custom Metrics Autoscaler Operator
807+
File: nodes-cma-autoscaling-custom-removing
808+
---
778809
Name: Logging
779810
Dir: logging
780811
Distros: openshift-rosa

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

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ You can configure auditing for the Custom Metrics Autoscaler Operator by editing
1818

1919
. Edit the `KedaController` custom resource to add the `auditConfig` stanza:
2020
+
21+
ifndef::openshift-rosa,openshift-dedicated[]
2122
[source,yaml]
2223
----
2324
kind: KedaController
@@ -42,6 +43,33 @@ spec:
4243
maxBackup: "1"
4344
maxSize: "50"
4445
----
46+
endif::openshift-rosa,openshift-dedicated[]
47+
ifdef::openshift-rosa,openshift-dedicated[]
48+
[source,yaml]
49+
----
50+
kind: KedaController
51+
apiVersion: keda.sh/v1alpha1
52+
metadata:
53+
name: keda
54+
namespace: keda
55+
spec:
56+
# ...
57+
metricsServer:
58+
# ...
59+
auditConfig:
60+
logFormat: "json" <1>
61+
logOutputVolumeClaim: "pvc-audit-log" <2>
62+
policy:
63+
rules: <3>
64+
- level: Metadata
65+
omitStages: "RequestReceived" <4>
66+
omitManagedFields: false <5>
67+
lifetime: <6>
68+
maxAge: "2"
69+
maxBackup: "1"
70+
maxSize: "50"
71+
----
72+
endif::openshift-rosa,openshift-dedicated[]
4573
<1> Specifies the output format of the audit log, either `legacy` or `json`.
4674
<2> Specifies an existing persistent volume claim for storing the log data. All requests coming to the API server are logged to this persistent volume claim. If you leave this field empty, the log data is sent to stdout.
4775
<3> Specifies which events should be recorded and what data they should include:
@@ -74,10 +102,18 @@ oc adm must-gather -- /usr/bin/gather_audit_logs
74102

75103
.. Obtain the name of the `keda-metrics-apiserver-*` pod:
76104
+
105+
ifndef::openshift-rosa,openshift-dedicated[]
77106
[source,terminal]
78107
----
79108
oc get pod -n openshift-keda
80109
----
110+
endif::openshift-rosa,openshift-dedicated[]
111+
ifdef::openshift-rosa,openshift-dedicated[]
112+
[source,terminal]
113+
----
114+
oc get pod -n keda
115+
----
116+
endif::openshift-rosa,openshift-dedicated[]
81117
+
82118
.Example output
83119
+
@@ -117,6 +153,7 @@ $ oc logs keda-metrics-apiserver-65c7cc44fd-rrl4r|grep -i metadata
117153
+
118154
.. Use a command similar to the following to log into the `keda-metrics-apiserver-*` pod:
119155
+
156+
ifndef::openshift-rosa,openshift-dedicated[]
120157
[source,terminal]
121158
----
122159
$ oc rsh pod/keda-metrics-apiserver-<hash> -n openshift-keda
@@ -128,6 +165,20 @@ For example:
128165
----
129166
$ oc rsh pod/keda-metrics-apiserver-65c7cc44fd-rrl4r -n openshift-keda
130167
----
168+
endif::openshift-rosa,openshift-dedicated[]
169+
ifdef::openshift-rosa,openshift-dedicated[]
170+
[source,terminal]
171+
----
172+
$ oc rsh pod/keda-metrics-apiserver-<hash> -n keda
173+
----
174+
+
175+
For example:
176+
+
177+
[source,terminal]
178+
----
179+
$ oc rsh pod/keda-metrics-apiserver-65c7cc44fd-rrl4r -n keda
180+
----
181+
endif::openshift-rosa,openshift-dedicated[]
131182

132183
.. Change to the `/var/audit-policy/` directory:
133184
+

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

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ The standard {product-title} `must-gather` command, `oc adm must-gather`, does n
2828
2929
.Procedure
3030

31+
// Hide note from ROSA/OSD, as restricted is not supported.
3132
. Navigate to the directory where you want to store the `must-gather` data.
33+
ifndef::openshift-rosa,openshift-dedicated[]
3234
+
3335
[NOTE]
3436
====
@@ -39,6 +41,7 @@ If your cluster is using a restricted network, you must take additional steps. I
3941
$ oc import-image is/must-gather -n openshift
4042
----
4143
====
44+
endif::openshift-rosa,openshift-dedicated[]
4245
4346
. Perform one of the following:
4447
+
@@ -74,6 +77,7 @@ $ oc adm must-gather --image-stream=openshift/must-gather --image=${IMAGE}
7477
--
7578
+
7679
.Example must-gather output for the Custom Metric Autoscaler:
80+
ifndef::openshift-rosa,openshift-dedicated[]
7781
[%collapsible]
7882
====
7983
[source,terminal]
@@ -157,6 +161,92 @@ $ oc adm must-gather --image-stream=openshift/must-gather --image=${IMAGE}
157161
└── routes.yaml
158162
----
159163
====
164+
endif::openshift-rosa,openshift-dedicated[]
165+
ifdef::openshift-rosa,openshift-dedicated[]
166+
[%collapsible]
167+
====
168+
[source,terminal]
169+
----
170+
└── keda
171+
├── apps
172+
│ ├── daemonsets.yaml
173+
│ ├── deployments.yaml
174+
│ ├── replicasets.yaml
175+
│ └── statefulsets.yaml
176+
├── apps.openshift.io
177+
│ └── deploymentconfigs.yaml
178+
├── autoscaling
179+
│ └── horizontalpodautoscalers.yaml
180+
├── batch
181+
│ ├── cronjobs.yaml
182+
│ └── jobs.yaml
183+
├── build.openshift.io
184+
│ ├── buildconfigs.yaml
185+
│ └── builds.yaml
186+
├── core
187+
│ ├── configmaps.yaml
188+
│ ├── endpoints.yaml
189+
│ ├── events.yaml
190+
│ ├── persistentvolumeclaims.yaml
191+
│ ├── pods.yaml
192+
│ ├── replicationcontrollers.yaml
193+
│ ├── secrets.yaml
194+
│ └── services.yaml
195+
├── discovery.k8s.io
196+
│ └── endpointslices.yaml
197+
├── image.openshift.io
198+
│ └── imagestreams.yaml
199+
├── k8s.ovn.org
200+
│ ├── egressfirewalls.yaml
201+
│ └── egressqoses.yaml
202+
├── keda.sh
203+
│ ├── kedacontrollers
204+
│ │ └── keda.yaml
205+
│ ├── scaledobjects
206+
│ │ └── example-scaledobject.yaml
207+
│ └── triggerauthentications
208+
│ └── example-triggerauthentication.yaml
209+
├── monitoring.coreos.com
210+
│ └── servicemonitors.yaml
211+
├── networking.k8s.io
212+
│ └── networkpolicies.yaml
213+
├── keda.yaml
214+
├── pods
215+
│ ├── custom-metrics-autoscaler-operator-58bd9f458-ptgwx
216+
│ │ ├── custom-metrics-autoscaler-operator
217+
│ │ │ └── custom-metrics-autoscaler-operator
218+
│ │ │ └── logs
219+
│ │ │ ├── current.log
220+
│ │ │ ├── previous.insecure.log
221+
│ │ │ └── previous.log
222+
│ │ └── custom-metrics-autoscaler-operator-58bd9f458-ptgwx.yaml
223+
│ ├── custom-metrics-autoscaler-operator-58bd9f458-thbsh
224+
│ │ └── custom-metrics-autoscaler-operator
225+
│ │ └── custom-metrics-autoscaler-operator
226+
│ │ └── logs
227+
│ ├── keda-metrics-apiserver-65c7cc44fd-6wq4g
228+
│ │ ├── keda-metrics-apiserver
229+
│ │ │ └── keda-metrics-apiserver
230+
│ │ │ └── logs
231+
│ │ │ ├── current.log
232+
│ │ │ ├── previous.insecure.log
233+
│ │ │ └── previous.log
234+
│ │ └── keda-metrics-apiserver-65c7cc44fd-6wq4g.yaml
235+
│ └── keda-operator-776cbb6768-fb6m5
236+
│ ├── keda-operator
237+
│ │ └── keda-operator
238+
│ │ └── logs
239+
│ │ ├── current.log
240+
│ │ ├── previous.insecure.log
241+
│ │ └── previous.log
242+
│ └── keda-operator-776cbb6768-fb6m5.yaml
243+
├── policy
244+
│ └── poddisruptionbudgets.yaml
245+
└── route.openshift.io
246+
└── routes.yaml
247+
----
248+
====
249+
endif::openshift-rosa,openshift-dedicated[]
160250
161251
ifndef::openshift-origin[]
162252
. Create a compressed file from the `must-gather` directory that was created in your working directory. For example, on a computer that uses a Linux

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,4 @@ spec:
118118
<4> Specifies the logging level for the Custom Metrics Autoscaler Metrics Server. The allowed values are `0` for `info` and `4` or `debug`. The default is `0`.
119119
<5> Activates audit logging for the Custom Metrics Autoscaler Operator and specifies the audit policy to use, as described in the "Configuring audit logging" section.
120120

121-
.. Click *Create* to create the KEDAController.
121+
.. Click *Create* to create the KEDA controller.

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ Use the following procedure to remove the custom metrics autoscaler from your {p
1616

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

19+
ifndef::openshift-rosa,openshift-dedicated[]
1920
. Switch to the *openshift-keda* project.
21+
endif::openshift-rosa,openshift-dedicated[]
22+
ifdef::openshift-rosa,openshift-dedicated[]
23+
. Switch to the *keda* project.
24+
endif::openshift-rosa,openshift-dedicated[]
2025

2126
. Remove the `KedaController` custom resource.
2227

@@ -83,14 +88,30 @@ $ oc delete clusterrolebinding.keda.sh-v1alpha1-admin
8388

8489
. Delete the custom metrics autoscaler project:
8590
+
91+
ifndef::openshift-rosa,openshift-dedicated[]
8692
[source,terminal]
8793
----
8894
$ oc delete project openshift-keda
8995
----
96+
endif::openshift-rosa,openshift-dedicated[]
97+
ifdef::openshift-rosa,openshift-dedicated[]
98+
[source,terminal]
99+
----
100+
$ oc delete project keda
101+
----
102+
endif::openshift-rosa,openshift-dedicated[]
90103

91104
. Delete the Cluster Metric Autoscaler Operator:
92105
+
106+
ifndef::openshift-rosa,openshift-dedicated[]
93107
[source,terminal]
94108
----
95109
$ oc delete operator/openshift-custom-metrics-autoscaler-operator.openshift-keda
96110
----
111+
endif::openshift-rosa,openshift-dedicated[]
112+
ifdef::openshift-rosa,openshift-dedicated[]
113+
[source,terminal]
114+
----
115+
$ oc delete operator/openshift-custom-metrics-autoscaler-operator.keda
116+
----
117+
endif::openshift-rosa,openshift-dedicated[]

0 commit comments

Comments
 (0)