Skip to content

Commit

Permalink
[incubator/kube-downscaler] Add support for SecurityContext (helm#18276)
Browse files Browse the repository at this point in the history
* [incubator/kube-downscaler] Fix README

Add missing values, fix misleading defaults, and add capitalisation :)

Signed-off-by: Florent Delannoy <florent.delannoy.external@ynap.com>

* [incubator/kube-downscaler] Add support for SecurityContext

Also bump the chart's minor version as it's a new feature.

Signed-off-by: Florent Delannoy <florent.delannoy.external@ynap.com>
  • Loading branch information
Pluies authored and Ciprian Hacman committed Dec 5, 2019
1 parent e00e2d9 commit aa72ce0
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 15 deletions.
2 changes: 1 addition & 1 deletion incubator/kube-downscaler/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: kube-downscaler
apiVersion: v1
version: 0.2.1
version: 0.3.0
appVersion: 19.10.1
description: A Helm chart for kube-downscaler
home: https://github.com/hjacobs/kube-downscaler
Expand Down
32 changes: 18 additions & 14 deletions incubator/kube-downscaler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,25 @@ The following tables lists the configurable parameters of the kube-downscaler ch

| Parameter | Description | Default |
| ------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------- |
| `debug.enable` | Do you want to start the downscaler in debug mode | False |
| `namespace.active_in` | Which namespace does the downscaler scans for deployment/statefulsets to downscale (`''` equals all) | '' |
| `interval` | interval for the scans | false |
| `image.repository` | downscaler container image repository | `hjacobs/kube-downscaler` |
| `image.tag` | downscaler container image tag | `0.6` |
| `image.pullPolicy` | downscaler container image pull policy | `IfNotPresent` |
| `nodeSelector` | node labels for downscaler pod assignment | `{}` |
| `tolerations` | downscaler pod toleration for taints | `{}` |
| `podAnnotations` | annotations to be added to downscaler pod | `{}` |
| `podLabels` | labels to be added to downscaler pod | `{}` |
| `resources` | downscaler pod resource requests & limits | `{}` |
| `rbac.create` | If true, create & use RBAC resources | `false` |
| `replicaCount` | Number of replicas to run | `1` |
| `name` | How to name resources created by this chart | `kube-downscaler` |
| `debug.enable` | Do you want to start the downscaler in debug mode | `false` |
| `namespace.active_in` | Which namespace does the downscaler scans for deployment/statefulsets to downscale (`''` equals all) | `''` |
| `interval` | Interval between scans, in seconds | `60` |
| `image.repository` | Downscaler container image repository | `hjacobs/kube-downscaler` |
| `image.tag` | Downscaler container image tag | `19.10.1` |
| `image.pullPolicy` | Downscaler container image pull policy | `IfNotPresent` |
| `nodeSelector` | Node labels for downscaler pod assignment | `{}` |
| `tolerations` | Downscaler pod toleration for taints | `[]` |
| `affinity` | Downscaler pod affinity | `{}` |
| `podAnnotations` | Annotations to be added to downscaler pod | `{}` |
| `podLabels` | Labels to be added to downscaler pod | `{}` |
| `resources` | Downscaler pod resource requests & limits | `{}` |
| `securityContext` | SecurityContext to apply to the downscaler pod | `{}` |
| `rbac.create` | If true, create & use RBAC resources | `true` |
| `rbac.serviceAccountName` | ServiceAccount downscaler will use (ignored if rbac.create=true) | `default` |
| `extraArgs` | Add extra args to docker command | `[]` |
| `extraArgs` | Add extra args to docker command | `[]` |

> **Tip**: You can use the default [values.yaml](values.yaml)
> **Tip**: If you use `kube-downscaler` as releaseName, the generated pod name will be shorter.(e.g. `kube-downscaler-66cc9fb67c-7mg4w` instead of `my-release-kube-downscaler-66cc9fb67c-7mg4w`)
> **Tip**: If you use `kube-downscaler` as releaseName, the generated pod name will be shorter.(e.g. `kube-downscaler-66cc9fb67c-7mg4w` instead of `my-release-kube-downscaler-66cc9fb67c-7mg4w`)
4 changes: 4 additions & 0 deletions incubator/kube-downscaler/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ spec:
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.securityContext }}
securityContext:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
Expand Down
3 changes: 3 additions & 0 deletions incubator/kube-downscaler/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ resources:
# cpu: 50m
# memory: 200Mi

securityContext: {}
# runAsUser: 1000

extraArgs: []
# - --include-resources deployments

Expand Down

0 comments on commit aa72ce0

Please sign in to comment.