File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ These steps are not required for an external Prometheus source.
16
16
You must perform the following tasks, as described in this section:
17
17
18
18
* Create a service account to get a token.
19
+ * Create the service token.
19
20
* Create a role.
20
21
* Add that role to the service account.
21
22
* Reference the token in the trigger authentication object used by Prometheus.
@@ -48,7 +49,26 @@ where:
48
49
+
49
50
<service _account >:: Specifies the name of the service account.
50
51
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:
52
72
+
53
73
[source,terminal]
54
74
----
Original file line number Diff line number Diff line change @@ -36,6 +36,21 @@ Tokens: thanos-token-c422q
36
36
Events: <none>
37
37
----
38
38
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
+
39
54
. Define a `TriggerAuthentication` object within the `openshift-ingress-operator` namespace using the service account's token.
40
55
41
56
.. Define the variable `secret` that contains the secret by running the following command:
You can’t perform that action at this time.
0 commit comments