Skip to content

Commit

Permalink
Chart: Add moveLeader.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gacko committed Feb 5, 2025
1 parent 7145314 commit 8951dc8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Chart: Add `moveLeader`. ([#11](https://github.com/giantswarm/etcd-defrag-app/pull/11))

### Changed

- Chart: Update dependency ahrtr/etcd-defrag to v0.23.0. ([#10](https://github.com/giantswarm/etcd-defrag-app/pull/10))
Expand Down
1 change: 1 addition & 0 deletions helm/etcd-defrag/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ etcd-defrag is an easy to use and smart etcd defragmentation tool.
| jobAnnotations | object | `{}` | Job annotations. |
| jobLabels | object | `{}` | Job labels. |
| labels | object | `{}` | Common labels. |
| moveLeader | bool | `true` | Whether to move the leadership before performing defragmentation on the leader or not. |
| nodeSelector | object | `{}` | Node selector. |
| podAnnotations | object | `{}` | Pod annotations. |
| podLabels | object | `{}` | Pod labels. |
Expand Down
3 changes: 3 additions & 0 deletions helm/etcd-defrag/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ spec:
- --defrag-rule
- {{ .Values.defragRule | quote }}
{{- end }}
{{- if .Values.moveLeader }}
- --move-leader
{{- end }}
{{- if .Values.args }}
{{- toYaml .Values.args | nindent 12 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions helm/etcd-defrag/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@
"labels": {
"type": "object"
},
"moveLeader": {
"type": "boolean"
},
"nodeSelector": {
"type": "object"
},
Expand Down
3 changes: 3 additions & 0 deletions helm/etcd-defrag/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ etcdStorageQuotaBytes: 8589934592
# By default, we defragment if the quota usage is greater than 80% and the unused space makes up 10% of the quota.
defragRule: dbQuotaUsage > 0.8 && dbSizeFree > dbQuota * 0.1

# -- Whether to move the leadership before performing defragmentation on the leader or not.
moveLeader: true

# -- Additional arguments.
args: []

Expand Down

0 comments on commit 8951dc8

Please sign in to comment.