Skip to content

Commit

Permalink
Makes agent + server affinities configurable (helm#3455)
Browse files Browse the repository at this point in the history
  • Loading branch information
fedenusy authored and k8s-ci-robot committed Jan 30, 2018
1 parent 5a47997 commit 3eb0836
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
4 changes: 2 additions & 2 deletions incubator/drone/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: drone
home: https://drone.io/
icon: http://docs.drone.io/logo.svg
version: 0.3.0
appVersion: 0.8.2
version: 0.3.1
appVersion: 0.8.4
description: Drone is a Continuous Delivery system built on container technology
keywords:
- continuous-delivery
Expand Down
6 changes: 4 additions & 2 deletions incubator/drone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ The following tables lists the configurable parameters of the drone charts and t
| Parameter | Description | Default |
|-----------------------------|-----------------------------------------------------------------------------------------------|-----------------------------|
| `images.server.repository` | Drone **server** image | `docker.io/drone/drone` |
| `images.server.tag` | Drone **server** image tag | `0.8.2` |
| `images.server.tag` | Drone **server** image tag | `0.8.4` |
| `images.server.pullPolicy` | Drone **server** image pull policy | `IfNotPresent` |
| `images.agent.repository` | Drone **agent** image | `docker.io/drone/agent` |
| `images.agent.tag` | Drone **agent** image tag | `0.8.2` |
| `images.agent.tag` | Drone **agent** image tag | `0.8.4` |
| `images.agent.pullPolicy` | Drone **agent** image pull policy | `IfNotPresent` |
| `images.dind.repository` | Docker **dind** image | `docker.io/library/docker` |
| `images.dind.tag` | Docker **dind** image tag | `17.12.0-ce-dind` |
Expand All @@ -53,9 +53,11 @@ The following tables lists the configurable parameters of the drone charts and t
| `server.host` | Drone **server** hostname | `(internal hostname)` |
| `server.env` | Drone **server** environment variables | `(default values)` |
| `server.resources` | Drone **server** pod resource requests & limits | `{}` |
| `server.afinity` | Drone **server** scheduling preferences | `{}` |
| `agent.env` | Drone **agent** environment variables | `(default values)` |
| `agent.replicas` | Drone **agent** replicas | `1` |
| `agent.resources` | Drone **agent** pod resource requests & limits | `{}` |
| `agent.afinity` | Drone **agent** scheduling preferences | `{}` |
| `dind.driver` | **DinD** storage driver | `overlay2` |
| `dind.resources` | **DinD** pod resource requests & limits | `{}` |
| `persistence.enabled` | Use a PVC to persist data | `true` |
Expand Down
4 changes: 4 additions & 0 deletions incubator/drone/templates/deployment-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ spec:
release: "{{ .Release.Name }}"
component: agent
spec:
{{- if .Values.agent.affinity }}
affinity:
{{ toYaml .Values.agent.affinity | indent 8 }}
{{- end }}
containers:
- name: {{ template "drone.fullname" . }}-agent
image: "{{ .Values.images.agent.repository }}:{{ .Values.images.agent.tag }}"
Expand Down
4 changes: 4 additions & 0 deletions incubator/drone/templates/deployment-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ spec:
release: "{{ .Release.Name }}"
component: server
spec:
{{- if .Values.server.affinity }}
affinity:
{{ toYaml .Values.server.affinity | indent 8 }}
{{- end }}
containers:
- name: {{ template "drone.fullname" . }}-server
image: "{{ .Values.images.server.repository }}:{{ .Values.images.server.tag }}"
Expand Down
14 changes: 12 additions & 2 deletions incubator/drone/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ images:
##
server:
repository: "docker.io/drone/drone"
tag: 0.8.2
tag: 0.8.4
pullPolicy: IfNotPresent

## The official drone (agent) image, change tag to use a different version.
## ref: https://hub.docker.com/r/drone/agent/tags/
##
agent:
repository: "docker.io/drone/agent"
tag: 0.8.2
tag: 0.8.4
pullPolicy: IfNotPresent

## The official docker (dind) image, change tag to use a different version.
Expand Down Expand Up @@ -97,6 +97,11 @@ server:
# memory: 2Gi
# cpu: 1

## Pod scheduling preferences.
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
##
affinity: {}

agent:
## Drone agent configuration.
## Values in here get injected as environment variables.
Expand All @@ -118,6 +123,11 @@ agent:
# memory: 2Gi
# cpu: 1

## Pod scheduling preferences.
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
##
affinity: {}

dind:
## Docker storage driver.
## Your DinD instance should be using the same driver as your host.
Expand Down

0 comments on commit 3eb0836

Please sign in to comment.