Add cleanRun variable to reset vsts-agent on build completion
This commit is contained in:
Родитель
56b971ca03
Коммит
4dd7473eea
|
@ -26,6 +26,7 @@ The following tables lists the configurable parameters of the `vsts-agent` chart
|
|||
| `vstsAgentName` | VSTS agent name | `$HOSTNAME` |
|
||||
| `vstsWorkspace` | VSTS agent workspace | `/workspace` |
|
||||
| `extraEnv` | Extra environment variables on the vsts-agent container | `nil` |
|
||||
| `cleanRun` | Kill and restart vsts-agent container on completion of a build (completely resets the environment) | `false` |
|
||||
|
||||
## Configure your VSTS instance
|
||||
|
||||
|
|
|
@ -54,6 +54,16 @@ spec:
|
|||
requests:
|
||||
memory: {{ .Values.resources.requests.memory | quote }}
|
||||
cpu: {{ .Values.resources.requests.cpu | quote }}
|
||||
{{ if .Values.cleanRun }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- "! ls /vsts/agent/_diag | grep Worker || pgrep Agent.Worker"
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 5
|
||||
{{ end }}
|
||||
volumes:
|
||||
- name: docker-socket
|
||||
hostPath:
|
||||
|
|
|
@ -15,4 +15,6 @@ resources:
|
|||
disk: "50Gi"
|
||||
storageclass: "default"
|
||||
|
||||
cleanRun: false
|
||||
|
||||
extraEnv:
|
||||
|
|
Загрузка…
Ссылка в новой задаче