[stable/spotify-docker-gc] add ability to define resources on container in daemonset (#7631)

Signed-off-by: Cade Markegard <cademarkegard@gmail.com>
This commit is contained in:
Cade Markegard
2018-09-19 01:21:29 -07:00
committed by k8s-ci-robot
parent 1986409bb6
commit 72aebf8735
4 changed files with 24 additions and 14 deletions
+1 -1
View File
@@ -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:
+13 -12
View File
@@ -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
@@ -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:
@@ -52,4 +56,4 @@ spec:
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
{{- end }}
+5
View File
@@ -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/
##