Skip to content

Commit

Permalink
Merge pull request #285 from josephangbc/add-priorityclassname-and-af…
Browse files Browse the repository at this point in the history
…finity

Add PriorityClassName and Affinity
  • Loading branch information
satoru-takeuchi authored Oct 30, 2024
2 parents 5e9e978 + 3763af2 commit 25a0c93
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/pvc-autoresizer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ helm upgrade --create-namespace --namespace pvc-autoresizer -i pvc-autoresizer -
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| cert-manager.enabled | bool | `false` | Install cert-manager together. # ref: https://cert-manager.io/docs/installation/helm/#installing-with-helm |
| controller.affinity | object | `{}` | Affinity for controller deployment. |
| controller.annotations | object | `{}` | Annotations to be added to controller deployment. |
| controller.args.additionalArgs | list | `[]` | Specify additional args. |
| controller.args.interval | string | `"10s"` | Specify interval to monitor pvc capacity. Used as "--interval" option |
Expand All @@ -42,6 +43,7 @@ helm upgrade --create-namespace --namespace pvc-autoresizer -i pvc-autoresizer -
| controller.podAnnotations | object | `{}` | Annotations to be added to controller pods. |
| controller.podLabels | object | `{}` | Pod labels to be added to controller pods. |
| controller.podSecurityContext | object | `{}` | Security Context to be applied to the controller pods. |
| controller.priorityClassName | string | `""` | Priority class name to be applied to the controller pods. |
| controller.replicas | int | `1` | Specify the number of replicas of the controller Pod. |
| controller.resources | object | `{"requests":{"cpu":"100m","memory":"20Mi"}}` | Specify resources. |
| controller.securityContext | object | `{}` | Security Context to be applied to the controller container within controller pods. |
Expand Down
7 changes: 7 additions & 0 deletions charts/pvc-autoresizer/templates/controller/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,10 @@ spec:
{{- end }}
securityContext:
{{- toYaml .Values.controller.podSecurityContext | nindent 8 }}
{{- with .Values.controller.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.controller.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
27 changes: 27 additions & 0 deletions charts/pvc-autoresizer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,33 @@ controller:
# controller.nodeSelector -- Map of key-value pairs for scheduling pods on specific nodes.
nodeSelector: {}

# controller.affinity -- Affinity for controller deployment.
affinity: {}
# podAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# - labelSelector:
# matchExpressions:
# - key: app.kubernetes.io/name
# operator: In
# values:
# - pvc-autoresizer
# topologyKey: topology.kubernetes.io/zone
# podAntiAffinity:
# preferredDuringSchedulingIgnoredDuringExecution:
# - weight: 100
# podAffinityTerm:
# labelSelector:
# matchExpressions:
# - key: app.kubernetes.io/name
# operator: In
# values:
# - pvc-autoresizer
# topologyKey: topology.kubernetes.io/zone

# controller.priorityClassName -- Priority class name to be applied to the controller pods.
priorityClassName: ""
# priorityClassName: system-cluster-critical

# -- deploy a PodMonitor. This is not tested in CI so make sure to test it yourself.
podMonitor:
# podMonitor.enabled -- If true, creates a Prometheus Operator PodMonitor.
Expand Down

0 comments on commit 25a0c93

Please sign in to comment.