Skip to content

Commit

Permalink
fix: Add parameters for tuning revisionHistoryLimit and emptyDir volumes
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Dainty <[email protected]>
  • Loading branch information
bodgit committed Dec 7, 2023
1 parent 4bb8fa5 commit 026af89
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions charts/metrics-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ The following table lists the configurable parameters of the _Metrics Server_ ch
| `containerPort` | port for the _metrics-server_ container. | `10250` |
| `hostNetwork.enabled` | If `true`, start _metric-server_ in hostNetwork mode. You would require this enabled if you use alternate overlay networking for pods and API server unable to communicate with metrics-server. As an example, this is required if you use Weave network on EKS. | `false` |
| `replicas` | Number of replicas to run. | `1` |
| `revisionHistoryLimit` | Number of revisions to keep. | `nil` |
| `updateStrategy` | Customise the default update strategy. | `{}` |
| `podDisruptionBudget.enabled` | If `true`, create `PodDisruptionBudget` resource. | `{}` |
| `podDisruptionBudget.minAvailable` | Set the `PodDisruptionBudget` minimum available pods. | `nil` |
Expand Down Expand Up @@ -88,3 +89,4 @@ The following table lists the configurable parameters of the _Metrics Server_ ch
| `deploymentAnnotations` | Annotations to add to the deployment. | `{}` |
| `schedulerName` | scheduler to set to the deployment. | `""` |
| `dnsConfig` | Set the dns configuration options for the deployment. | `{}` |
| `tmpVolume` | Volume to be mounted in Pods for temporary files. | `{"emptyDir":{}}` |
5 changes: 4 additions & 1 deletion charts/metrics-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ metadata:
{{- end }}
spec:
replicas: {{ .Values.replicas }}
{{- if or (kindIs "float64" .Values.revisionHistoryLimit) (kindIs "int64" .Values.revisionHistoryLimit) }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit | int64 }}
{{- end }}
{{- with .Values.updateStrategy }}
strategy:
{{- toYaml . | nindent 4 }}
Expand Down Expand Up @@ -127,7 +130,7 @@ spec:
{{- end }}
volumes:
- name: tmp
emptyDir: {}
{{- toYaml .Values.tmpVolume | nindent 10 }}
{{- if .Values.addonResizer.enabled }}
- name: nanny-config-volume
configMap:
Expand Down
5 changes: 5 additions & 0 deletions charts/metrics-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ hostNetwork:

replicas: 1

revisionHistoryLimit:

updateStrategy: {}
# type: RollingUpdate
# rollingUpdate:
Expand Down Expand Up @@ -192,3 +194,6 @@ dnsConfig: {}
deploymentAnnotations: {}

schedulerName: ""

tmpVolume:
emptyDir: {}

0 comments on commit 026af89

Please sign in to comment.