Skip to content

Commit ac24242

Browse files
authored
Merge pull request #78467 from jldohmann/OCPBUGS-34846
OCPBUGS-34846: add service token creation step
2 parents 434fc86 + 024c278 commit ac24242

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

modules/nodes-cma-autoscaling-custom-prometheus-config.adoc

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ These steps are not required for an external Prometheus source.
1616
You must perform the following tasks, as described in this section:
1717

1818
* Create a service account to get a token.
19+
* Create the service token.
1920
* Create a role.
2021
* Add that role to the service account.
2122
* Reference the token in the trigger authentication object used by Prometheus.
@@ -48,7 +49,26 @@ where:
4849
+
4950
<service_account>:: Specifies the name of the service account.
5051

51-
. Use the following command to locate the token assigned to the service account:
52+
. Use the following command to create the service token for the service account:
53+
+
54+
[source,terminal]
55+
----
56+
$ oc apply -f - <<EOF
57+
apiVersion: v1
58+
kind: Secret
59+
metadata:
60+
name: thanos-token
61+
annotations:
62+
kubernetes.io/service-account.name: <service_account>
63+
type: kubernetes.io/service-account-token
64+
EOF
65+
----
66+
+
67+
where:
68+
+
69+
<service_account>:: Specifies the name of the service account.
70+
71+
.. Use the following command to locate the token assigned to the service account:
5272
+
5373
[source,terminal]
5474
----

modules/nw-autoscaling-ingress-controller.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,21 @@ Tokens: thanos-token-c422q
3636
Events: <none>
3737
----
3838

39+
. Manually create the service account secret token with the following command:
40+
+
41+
[source,terminal]
42+
----
43+
$ oc apply -f - <<EOF
44+
apiVersion: v1
45+
kind: Secret
46+
metadata:
47+
name: thanos-token
48+
annotations:
49+
kubernetes.io/service-account.name: thanos
50+
type: kubernetes.io/service-account-token
51+
EOF
52+
----
53+
3954
. Define a `TriggerAuthentication` object within the `openshift-ingress-operator` namespace using the service account's token.
4055

4156
.. Define the variable `secret` that contains the secret by running the following command:

0 commit comments

Comments
 (0)