- GoCD server version v18.2.0 or above
- Kubernetes Cluster
Copy the file build/libs/kubernetes-elastic-agent-plugin-VERSION.jar
to the GoCD server under ${GO_SERVER_DIR}/plugins/external
and restart the server. The GO_SERVER_DIR
is usually /var/lib/go-server
on Linux and C:\Program Files\Go Server
on Windows.
-
Login to
GoCD server
as admin and navigate to Admin > Plugins -
Click on Settings icon of
Kubernetes Elastic Agent Plugin
to update plugin settings configuration.- Optionally specify
Go Server URL
, if GoCD secure site URL is not configured. - Optionally Specify
Agent auto-register Timeout
, Defaults to10 mintues
. - Optionally Specify
Maximum pending pods
, Defaults to10 pods
. - Specify
Kubernetes Cluster URL
. - Optionally Specify
Namespace
, Defaults todefault
. - Specify
Security token
, The token must have permission to do following operations -- nodes: list, get - events: list, watch - namespace: list, get - pods, pods/log: *
- Optionally, Specify
Cluster ca certificate data
.
- Optionally specify
-
Login to
GoCD server
as admin and navigate to Admin > Elastic Agent Profiles -
Click on Add to create new elastic agent profile
- Specify
id
for profile. - Select
Kubernetes Elastic Agent Plugin
for Plugin id - Configure Kubernetes GoCD elastic agent Pod using:
-
Config Properties
- Specify GoCD elastic agent docker image name.
- Specify Maximum Memory limit. Container memory will be limit to the value specified here.
- Specify Maximum CPU limit. Container memory will be limit to the value specified here.
- Optionally specify Environment Variables. These variables are passed to the container for use.
-
Pod Configuration
- Specify GoCD elastic agent Pod Yaml configuration.
-
- Save your profile.
- Specify
- Click the gear icon on Pipeline
- Click on Quick Edit button
- Click on Stages
- Create/Edit a job
- Enter the
unique id
of an elastic profile in Job Settings
- Save your changes
Enabling debug level logging can help you troubleshoot an issue with the elastic agent plugin. To enable debug level logs, edit the /etc/default/go-server
(for Linux) to add:
export GO_SERVER_SYSTEM_PROPERTIES="$GO_SERVER_SYSTEM_PROPERTIES -Dplugin.cd.go.contrib.elasticagent.kubernetes.log.level=debug"
If you're running the server via ./server.sh
script —
$ GO_SERVER_SYSTEM_PROPERTIES="-Dplugin.cd.go.contrib.elasticagent.kubernetes.log.level=debug" ./server.sh