You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/nodes-cma-autoscaling-custom-trigger-kafka.adoc
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,7 @@ spec:
43
43
excludePersistentLag: false <10>
44
44
version: '1.0.0' <11>
45
45
partitionLimitation: '1,2,10-20,31' <12>
46
+
tls: enable <13>
46
47
----
47
48
<1> Specifies Kafka as the trigger type.
48
49
<2> Specifies the name of the Kafka topic on which Kafka is processing the offset lag.
@@ -62,4 +63,4 @@ spec:
62
63
* If `false`, the trigger includes all consumer lag in all partitions. This is the default.
63
64
<11> Optional: Specifies the version of your Kafka brokers. Must be specified as a quoted string value. The default is `1.0.0`.
64
65
<12> Optional: Specifies a comma-separated list of partition IDs to scope the scaling on. If set, only the listed IDs are considered when calculating lag. Must be specified as a quoted string value. The default is to consider all partitions.
65
-
66
+
<13> Optional: Specifies whether to use TSL client authentication for Kafka. The default is `disable`. For information on configuring TLS, see "Understanding custom metrics autoscaler trigger authentications".
You can scale pods based on Prometheus metrics, which can use the installed {product-title} monitoring or an external Prometheus server as the metrics source. See "Additional resources" for information on the configurations required to use the {product-title} monitoring as a source for metrics.
9
+
You can scale pods based on Prometheus metrics, which can use the installed {product-title} monitoring or an external Prometheus server as the metrics source. See "Configuring the custom metrics autoscaler to use {product-title} monitoring" for information on the configurations required to use the {product-title} monitoring as a source for metrics.
10
10
11
11
[NOTE]
12
12
====
@@ -47,7 +47,11 @@ spec:
47
47
<9> Optional: Specifies how the trigger should proceed if the Prometheus target is lost.
48
48
* If `true`, the trigger continues to operate if the Prometheus target is lost. This is the default behavior.
49
49
* If `false`, the trigger returns an error if the Prometheus target is lost.
50
-
<10> Optional: Specifies whether the certificate check should be skipped. For example, you might skip the check if you use self-signed certificates at the Prometheus endpoint.
51
-
* If `true`, the certificate check is performed.
52
-
* If `false`, the certificate check is not performed. This is the default behavior.
53
-
50
+
<10> Optional: Specifies whether the certificate check should be skipped. For example, you might skip the check if you are running in a test environment and using self-signed certificates at the Prometheus endpoint.
51
+
* If `false`, the certificate check is performed. This is the default behavior.
52
+
* If `true`, the certificate check is not performed.
Copy file name to clipboardExpand all lines: nodes/cma/nodes-cma-autoscaling-custom-trigger-auth.adoc
+92-26Lines changed: 92 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,21 @@ Alternatively, to share credentials between objects in multiple namespaces, you
15
15
16
16
Trigger authentications and cluster trigger authentication use the same configuration. However, a cluster trigger authentication requires an additional `kind` parameter in the authentication reference of the scaled object.
17
17
18
-
.Example trigger authentication with a secret
18
+
.Example secret for Basic authentication
19
+
[source,yaml]
20
+
----
21
+
apiVersion: v1
22
+
kind: Secret
23
+
metadata:
24
+
name: my-basic-secret
25
+
namespace: default
26
+
data:
27
+
username: "dXNlcm5hbWU=" <1>
28
+
password: "cGFzc3dvcmQ="
29
+
----
30
+
<1> User name and password to supply to the trigger authentication. The values in a `data` stanza must be base-64 encoded.
31
+
32
+
.Example trigger authentication using a secret for Basic authentication
19
33
[source,yaml]
20
34
----
21
35
kind: TriggerAuthentication
@@ -25,20 +39,20 @@ metadata:
25
39
namespace: my-namespace <1>
26
40
spec:
27
41
secretTargetRef: <2>
28
-
- parameter: user-name <3>
29
-
name: my-secret <4>
30
-
key: USER_NAME <5>
42
+
- parameter: username <3>
43
+
name: my-basic-secret <4>
44
+
key: username <5>
31
45
- parameter: password
32
-
name: my-secret
33
-
key: USER_PASSWORD
46
+
name: my-basic-secret
47
+
key: password
34
48
----
35
49
<1> Specifies the namespace of the object you want to scale.
36
-
<2> Specifies that this trigger authentication uses a secret for authorization.
50
+
<2> Specifies that this trigger authentication uses a secret for authorization when connecting to the metrics endpoint.
37
51
<3> Specifies the authentication parameter to supply by using the secret.
38
52
<4> Specifies the name of the secret to use.
39
53
<5> Specifies the key in the secret to use with the specified parameter.
40
54
41
-
.Example cluster trigger authentication with a secret
55
+
.Example cluster trigger authentication with a secret for Basic authentication
42
56
[source,yaml]
43
57
----
44
58
kind: ClusterTriggerAuthentication
@@ -47,20 +61,75 @@ metadata: <1>
47
61
name: secret-cluster-triggerauthentication
48
62
spec:
49
63
secretTargetRef: <2>
50
-
- parameter: user-name <3>
51
-
name: secret-name <4>
52
-
key: USER_NAME <5>
53
-
- parameter: user-password
54
-
name: secret-name
55
-
key: USER_PASSWORD
64
+
- parameter: username <3>
65
+
name: my-basic-secret <4>
66
+
key: username <5>
67
+
- parameter: password
68
+
name: my-basic-secret
69
+
key: password
56
70
----
57
71
<1> Note that no namespace is used with a cluster trigger authentication.
58
-
<2> Specifies that this trigger authentication uses a secret for authorization.
72
+
<2> Specifies that this trigger authentication uses a secret for authorization when connecting to the metrics endpoint.
59
73
<3> Specifies the authentication parameter to supply by using the secret.
60
74
<4> Specifies the name of the secret to use.
61
75
<5> Specifies the key in the secret to use with the specified parameter.
62
76
63
-
.Example trigger authentication with a token
77
+
.Example secret with certificate authority (CA) details
<1> Specifies a bearer token to use with bearer authentication. The value in a `data` stanza must be base-64 encoded.
131
+
132
+
.Example trigger authentication with a bearer token
64
133
[source,yaml]
65
134
----
66
135
kind: TriggerAuthentication
@@ -71,16 +140,13 @@ metadata:
71
140
spec:
72
141
secretTargetRef: <2>
73
142
- parameter: bearerToken <3>
74
-
name: my-token-2vzfq <4>
75
-
key: token <5>
76
-
- parameter: ca
77
-
name: my-token-2vzfq
78
-
key: ca.crt
143
+
name: my-secret <4>
144
+
key: bearerToken <5>
79
145
----
80
146
<1> Specifies the namespace of the object you want to scale.
81
-
<2> Specifies that this trigger authentication uses a secret for authorization.
82
-
<3> Specifies the authentication parameter to supply by using the token.
83
-
<4> Specifies the name of the token to use.
147
+
<2> Specifies that this trigger authentication uses a secret for authorization when connecting to the metrics endpoint.
148
+
<3> Specifies the type of authentication to use.
149
+
<4> Specifies the name of the secret to use.
84
150
<5> Specifies the key in the token to use with the specified parameter.
85
151
86
152
.Example trigger authentication with an environment variable
@@ -98,7 +164,7 @@ spec:
98
164
containerName: my-container <5>
99
165
----
100
166
<1> Specifies the namespace of the object you want to scale.
101
-
<2> Specifies that this trigger authentication uses environment variables for authorization.
167
+
<2> Specifies that this trigger authentication uses environment variables for authorization when connecting to the metrics endpoint.
102
168
<3> Specify the parameter to set with this variable.
103
169
<4> Specify the name of the environment variable.
104
170
<5> Optional: Specify a container that requires authentication. The container must be in the same resource as referenced by `scaleTargetRef` in the scaled object.
@@ -116,7 +182,7 @@ spec:
116
182
provider: aws-eks <3>
117
183
----
118
184
<1> Specifies the namespace of the object you want to scale.
119
-
<2> Specifies that this trigger authentication uses a platform-native pod authentication method for authorization.
185
+
<2> Specifies that this trigger authentication uses a platform-native pod authentication when connecting to the metrics endpoint.
120
186
<3> Specifies a pod identity. Supported values are `none`, `azure`, `gcp`, `aws-eks`, or `aws-kiam`. The default is `none`.
121
187
122
188
// Remove ifdef after https://github.com/openshift/openshift-docs/pull/62147 merges
Copy file name to clipboardExpand all lines: nodes/cma/nodes-cma-autoscaling-custom-trigger.adoc
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ The custom metrics autoscaler currently supports only the Prometheus, CPU, memor
14
14
15
15
You use a `ScaledObject` or `ScaledJob` custom resource to configure triggers for specific objects, as described in the sections that follow.
16
16
17
+
You can configure a certificate authority xref:../../nodes/cma/nodes-cma-autoscaling-custom-trigger-auth.adoc#nodes-cma-autoscaling-custom-trigger-auth[to use with your scaled objects] or xref:../../nodes/cma/nodes-cma-autoscaling-custom.adoc#nodes-cma-autoscaling-custom-ca_nodes-cma-autoscaling-custom[for all scalers in the cluster].
18
+
17
19
// The following include statements pull in the module files that comprise
18
20
// the assembly. Include any combination of concept, procedure, or reference
19
21
// modules required to cover the user story. You can also include other
== Custom CA certificates for the Custom Metrics Autoscaler
58
58
59
-
By default, the Custom Metrics Autoscaler Operator uses automatically-generated service CA certificate to connect to on-cluster services.
59
+
By default, the Custom Metrics Autoscaler Operator uses automatically-generated service CA certificates to connect to on-cluster services.
60
60
61
61
If you want to use off-cluster services that require custom CA certificates, you can add the required certificates to a config map. Then, add the config map to the `KedaController` custom resource as described in xref:../../nodes/cma/nodes-cma-autoscaling-custom-install.adoc#nodes-cma-autoscaling-custom-install[Installing the custom metrics autoscaler]. The Operator loads those certificates on start-up and registers them as trusted by the Operator.
0 commit comments