Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[incubator/kube-downscaler] Add support for SecurityContext #18276

Merged
merged 2 commits into from
Oct 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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