Add support for custom volumes in drone agent (#15380)

Signed-off-by: George Kaz <egeorgekaz@gmail.com>
This commit is contained in:
georgekaz
2019-07-31 06:14:24 -07:00
committed by Kubernetes Prow Robot
parent f07c423d10
commit ac115bb329
4 changed files with 54 additions and 1 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ apiVersion: v1
name: drone
home: https://drone.io/
icon: https://drone.io/apple-touch-icon.png
version: 2.0.6
version: 2.0.7
appVersion: 1.2
description: Drone is a Continuous Delivery system built on container technology
keywords:
+3
View File
@@ -107,8 +107,11 @@ The following table lists the configurable parameters of the drone charts and th
| `agent.tolerations` | Drone **agent** node taints to tolerate | `[]` |
| `agent.livenessProbe` | Not currently used. | `{}` |
| `agent.readinessProbe` | Not currently used | `{}` |
| `agent.volumes` | Additional volumes to make available to agent (shared by dind if used) | `nil` |
| `agent.volumeMounts` | Mount points for volumes | `nil` |
| `dind.enabled` | Enable or disable **DinD** | `true` |
| `dind.driver` | **DinD** storage driver | `overlay2` |
| `dind.volumeMounts` | Mount points for volumes (defined in agent.volumes) | `nil` |
| `dind.resources` | **DinD** pod resource requests & limits | `{}` |
| `dind.env` | **DinD** environment variables | `nil` |
| `dind.command` | **DinD** custom command instead of default entry point | `nil` |
@@ -71,11 +71,18 @@ spec:
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-socket
{{- with .Values.agent.volumeMounts }}
{{- toYaml . | nindent 10 }}
{{- end }}
volumes:
- name: docker-socket
hostPath:
path: /var/run/docker.sock
{{- else }}
{{- with .Values.agent.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 10 }}
{{- end }}
- name: dind
image: "{{ .Values.images.dind.repository }}:{{ .Values.images.dind.tag }}"
imagePullPolicy: {{ .Values.images.dind.pullPolicy }}
@@ -99,8 +106,14 @@ spec:
volumeMounts:
- name: docker-graph-storage
mountPath: /var/lib/docker
{{- with .Values.dind.volumeMounts }}
{{- toYaml . | nindent 10 }}
{{- end }}
volumes:
- name: docker-graph-storage
emptyDir: {}
{{- end }}
{{- with .Values.agent.volumes }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end -}}
+37
View File
@@ -225,6 +225,34 @@ agent:
##
annotations: {}
## Additional volumes e.g. for shared caching between agents on different nodes or
## shared cache between agents on the same node when using dind or
## for a global docker login config as per
## Option 2 ref: https://discourse.drone.io/t/how-to-pull-private-images-with-1-0/3155
## Note: Option 2 also requires DRONE_DOCKER_CONFIG: /root/.docker/config.json env var in agent
## NB: This will make the credentials available globally to all builds and all repositories
# volumes:
# - name: docker-config
# secret:
# defaultMode: 420
# items:
# - key: .dockerconfigjson
# path: config.json
# secretName: drone-docker-config
# - name: persistent-data
# persistentVolumeClaim:
# claimName: drone-agent-pvc
# - name: cache
# hostPath:
# path: /drone-cache
# type: Directory
## Volume mount into agent container
# volumeMounts:
# - name: docker-config
# mountPath: /root/.docker
# readOnly: true
## CPU and memory limits for drone agent
##
resources: {}
@@ -286,6 +314,15 @@ dind:
##
driver: overlay2
## Volume mount into dind container
## Volumes are defined under agent values.
# volumeMounts:
# - mountPath: /root/.docker
# name: docker-config
# readOnly: true
# - name: persistent-data
# mountPath: /mnt/drone-cache
## CPU and memory limits for dind
##
resources: {}