Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Assorted improvements #7

Merged
merged 9 commits into from
Dec 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ before_script:
done

script:
- helm lint .
- helm template .
- helm lint charts/vsts-agent
- helm template charts/vsts-agent
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.PHONY: helm-package

helm-package:
helm package charts/vsts-agent -d charts
helm repo index --merge charts/index.yaml charts
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ The following tables lists the configurable parameters of the `vsts-agent` chart
| `vstsPool` | VSTS agent pool name | `kubernetes-vsts-agents` |
| `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` |
| `volumes` | An array of custom volumes to attach to the vsts-agent pod | `docker-socket` to mount /var/run/docker.sock (if you still need this volume when defining addition ones, please ensure you reference it again in your list) |
| `volumeMounts` | volumeMounts to the vsts-agent container as referenced in `volumes` | A read-only `docker-socket` to mount as /var/run/docker.sock in vsts-agent container (as in `volumes` please reference this again if you still need it in your custom list) |
| `extraContainers` | Array of additional sidecar containers to add into the vsts-agent pod | `nil` |

## Configure your VSTS instance

Expand Down
15 changes: 15 additions & 0 deletions charts/index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
entries:
vsts-agent:
- apiVersion: v1
created: 2018-10-05T16:06:09.742522+01:00
description: Helm chart for Visual Studio Team Services agent pool
digest: c13c24fad551693836f3f36188917230b861eb4ca10f4ba8aee38cf68d55151f
maintainers:
- email: [email protected]
name: Microsoft Social Engagement
name: vsts-agent
urls:
- vsts-agent-1.0.0.tgz
version: 1.0.0
generated: 2018-10-05T16:06:09.741511+01:00
Binary file added charts/vsts-agent-1.0.0.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion Chart.yaml → charts/vsts-agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
name: helm-vsts-agent
name: vsts-agent
version: 1.0.0
description: Helm chart for Visual Studio Team Services agent pool
maintainers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,39 @@ spec:
value: {{ .vstsAgentName | default "$HOSTNAME" }}
- name: VSTS_WORK
value: {{ .vstsWorkspace | default "/workspace" }}
{{- end }}
{{- end }}
{{- range $key, $value := .Values.extraEnv }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
volumeMounts:
- name: docker-socket
mountPath: /var/run/docker.sock
readOnly: false
- name: workspace
mountPath: {{ .Values.vstsWorkspace | default "/workspace" }}
{{- if .Values.volumeMounts }}
{{ toYaml .Values.volumeMounts | indent 10 }}
{{ end }}
resources:
limits:
memory: {{ .Values.resources.limits.memory | quote }}
cpu: {{ .Values.resources.limits.cpu | quote }}
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 }}
{{ if .Values.extraContainers }}
{{ toYaml .Values.extraContainers | indent 6 }}
{{ end }}
volumes:
- name: docker-socket
hostPath:
path: /var/run/docker.sock
{{ toYaml .Values.volumes | indent 8 }}
{{ if .Values.image.imagePullSecret }}
imagePullSecrets:
- name: {{ .Values.image.imagePullSecret }}
Expand Down
16 changes: 16 additions & 0 deletions values.yaml → charts/vsts-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,19 @@ resources:
memory: 8Gi
disk: "50Gi"
storageclass: "default"

cleanRun: false

volumeMounts:
- name: docker-socket
mountPath: /var/run/docker.sock
readOnly: false

volumes:
- name: docker-socket
hostPath:
path: /var/run/docker.sock

extraEnv: {}

extraContainers: []