Hi Paul,

Assuming you are using elastic agents then, unless the GoCD user already 
has the required privileges in the provided images then you will need to 
either use an init container to modify the image at launch time or build 
your own images.

Are you sure that providing sudo privileges is the way to go, though? Why 
not build custom images (possibly based on the GoCD-provided agent images) 
that already include the required packages instead of installing them at 
run time?

Cheers,
Jason Smyth


On Wednesday, 10 August 2022 at 13:05:25 UTC-4 meltin...@gmail.com wrote:

>
> Hi,
>
> I would like to install some packages on the agent to support my tasks 
> what is the best way to achieve this? The agents are running on a closed 
> K8S installation so I am not worry too much about security.
>
> Can this be done with the agent images available or would it be better to 
> create my own giving the go user sudo privs?
>
> apiVersion: v1
> kind: Pod
> metadata:
>   name: gocd-agent-{{ POD_POSTFIX }}
>   labels:
>     app: siab-agent
> spec:
>   serviceAccountName: default
>   containers:
>     - name: gocd-agent-container-{{ CONTAINER_POSTFIX }}
>       image: gocd/gocd-agent-ubuntu-20.04:v22.1.0
>       securityContext:
>         privileged: true
>
> Cheers.
>
> Paul
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to go-cd+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/2094d044-a334-4f16-bb91-2ae7bfca7c6cn%40googlegroups.com.

Reply via email to