Skip to content

Commit cca2ba9

Browse files
committed
Update cluster profile setup doc.
1 parent e2e25b5 commit cca2ba9

File tree

1 file changed

+45
-19
lines changed

1 file changed

+45
-19
lines changed

docs/configure_cluster_profile.md

Lines changed: 45 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,50 @@
22

33
### Configure Cluster Profile
44

5-
1. Login to `GoCD server` as admin and navigate to **_Admin_** _>_ **_Elastic Agent Configurations_**
6-
2. Click on **_Add_** button and select `Kubernetes Elastic Agent Plugin` from the plugin ID dropdown.
7-
1. Specify `Cluster Profile Name` for the new cluster
8-
1. Optionally specify `Go Server URL`, if GoCD secure site URL is not configured.
9-
2. Optionally Specify `Agent auto-register timeout (in minutes)`, Defaults to `10` (mintues).
10-
3. Optionally Specify `Maximum pending pods`, Defaults to `10` (pods).
11-
4. Specify `Cluster URL`.
12-
5. Optionally Specify `Namespace`, Defaults to `default`. Note: If you have multiple GoCD servers with cluster profiles pointing to the same Kubernetes cluster, make sure that the namespace is different. Otherwise, the plugin of one GoCD server will end up terminating pods started by the plugin in the other GoCD servers.
13-
6. Specify `Security token`, The token must have permission to perform the following operations -
14-
```
15-
- nodes: list, get
16-
- events: list, watch
17-
- namespace: list, get
18-
- pods, pods/log: *
19-
```
20-
7. Optionally, Specify `Cluster CA certificate data`.
21-
22-
!["Kubernetes Cluster Profile"][1]
23-
5+
1. Log in to the GoCD server as admin and navigate to **_Admin_** _>_ **_Elastic Agent Configurations_**.
6+
7+
1. Click on the **_Add_** button and select `Kubernetes Elastic Agent Plugin` from the plugin ID dropdown.
8+
9+
1. Specify `Cluster Profile Name` for the new cluster.
10+
11+
1. Optionally specify `Go Server URL`. If your GoCD server has a [secure site URL][secure site URL]
12+
configured, then the secure site URL is used as a default. Otherwise, a URL must be specified here.
13+
14+
1. Optionally specify `Agent auto-register timeout (in minutes)`. This defaults to 10 (minutes) if not provided.
15+
16+
1. Optionally Specify `Maximum pending pods`. This defaults to 10 (pods) if not provided.
17+
18+
1. Specify `Cluster URL`.
19+
20+
1. Optionally specify `Namespace`. If not provided, GoCD agents will be
21+
launched in the default Kubernetes namespace. Note: If you have multiple
22+
GoCD servers with cluster profiles pointing to the same Kubernetes cluster,
23+
make sure that the namespace used by each GoCD server is different.
24+
Otherwise, the plugin of one GoCD server will end up terminating pods
25+
started by the plugin in the other GoCD servers.
26+
27+
1. Specify `Security token`. This should be a Kubernetes API token with the
28+
following permissions:
29+
30+
| Resource | Actions |
31+
| -------------- | ----------- |
32+
| nodes | list, get |
33+
| events | list |
34+
| namespace | list, get |
35+
| pods, pods/log | * |
36+
37+
If the plugin is using a non-default namespace, then the pods and pods/log permissions
38+
can be limited to that namespace (using a role + role binding), and the plugin
39+
will still work. All other permissions need to be attached at the cluster
40+
level (using a cluster role + cluster role binding) regardless of the
41+
namespace chosen.
42+
43+
1. Optionally specify `Cluster CA certificate data`. This should be the base-64-encoded certificate
44+
of the Kubernetes API server. It can be omitted in the rare case that the Kubernetes API
45+
is configured to serve plain HTTP.
46+
47+
!["Kubernetes Cluster Profile"][1]
48+
2449

2550
[1]: images/cluster-profile.png "Kubernetes Cluster Profile"
51+
[secure site URL]: https://docs.gocd.org/current/installation/configuring_server_details.html

0 commit comments

Comments
 (0)