Skip to content

Commit

Permalink
[stable/spotify-docker-gc] add ability to define resources on contain…
Browse files Browse the repository at this point in the history
…er in daemonset (helm#7631)

Signed-off-by: Cade Markegard <[email protected]>
  • Loading branch information
cademarkegard authored and k8s-ci-robot committed Sep 19, 2018
1 parent 1986409 commit 72aebf8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion stable/spotify-docker-gc/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: spotify-docker-gc
home: https://github.com/spotify/docker-gc
version: 0.2.0
version: 0.3.0
appVersion: latest
description: A simple Docker container and image garbage collection script.
sources:
Expand Down
25 changes: 13 additions & 12 deletions stable/spotify-docker-gc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@ The following table lists the configurable parameters of the Spotify Docker GC c

See the [spotify/docker-gc GitHub repository][] for more settings which may be added to this chart as needed.

| Parameter | Description | Default |
| --------------------------------- | ---------------------------------------- | --------------------------------------- |
| `cron.schedule` | cron schedule | `0 0 * * *` (daily at 12:00AM UTC) |
| `cron.log` | cron log name | `/var/logs/cron.log` |
| `env.gracePeriodSeconds` | grace period in seconds before gc occurs | `0` |
| `env.dockerAPIVersion` | Docker API Version for docker-gc client | Not set |
| `exclude.images` | images to be excluded | Not set |
| `exclude.containers` | containers to be excluded | Not set |
| `serviceAccount` | service account to attach to deamonset | Not set |
| `imagePullSecrets` | Specify image pull secrets | Not set |
| `tolerations` | Daemonset tolerations | Not set |
| `nodeSelector` | Node labels for daemonset pod assignment | Not set |
| Parameter | Description | Default |
| --------------------------------- | -------------------------------------------- | ---------------------------------- |
| `cron.schedule` | cron schedule | `0 0 * * *` (daily at 12:00AM UTC) |
| `cron.log` | cron log name | `/var/logs/cron.log` |
| `env.gracePeriodSeconds` | grace period in seconds before gc occurs | `0` |
| `env.dockerAPIVersion` | Docker API Version for docker-gc client | Not set |
| `exclude.images` | images to be excluded | Not set |
| `exclude.containers` | containers to be excluded | Not set |
| `serviceAccount` | service account to attach to daemonset | Not set |
| `imagePullSecrets` | Specify image pull secrets | Not set |
| `tolerations` | Daemonset tolerations | Not set |
| `nodeSelector` | Node labels for daemonset pod assignment | Not set |
| `resources` | Resources for the container in the daemonset | Not set |

## Design/Evolution

Expand Down
6 changes: 5 additions & 1 deletion stable/spotify-docker-gc/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ spec:
volumeMounts:
- name: docker-socket
mountPath: /var/run/docker.sock
{{- if .Values.resources }}
resources:
{{ toYaml .Values.resources | indent 10 }}
{{- end }}
volumes:
- name: docker-socket
hostPath:
Expand All @@ -52,4 +56,4 @@ spec:
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
{{- end }}
5 changes: 5 additions & 0 deletions stable/spotify-docker-gc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ env:
# imagePullSecrets:
# - name: myRegistryKeySecretName

## Resource requirements for spotify-docker-gc container
## Ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
##
resources: {}

## Node tolerations for spotify-docker-gc scheduling to nodes with taints
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
##
Expand Down

0 comments on commit 72aebf8

Please sign in to comment.