Created
March 26, 2020 12:09
-
-
Save grdnrio/d91d62485d7abcd8bbef716af627861c to your computer and use it in GitHub Desktop.
Postgres Autopilot Rule
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: autopilot.libopenstorage.org/v1alpha1 | |
kind: AutopilotRule | |
metadata: | |
name: postgres-resize | |
spec: | |
##### selector filters the objects affected by this rule given labels | |
selector: | |
matchLabels: | |
app: postgres | |
pollInterval: 3 | |
##### conditions are the symptoms to evaluate. All conditions are AND'ed | |
conditions: | |
# volume usage should be less than 50% | |
expressions: | |
- key: "100 * (px_volume_usage_bytes / px_volume_capacity_bytes)" | |
operator: Gt | |
values: | |
- "30" | |
##### action to perform when condition is true | |
actions: | |
- name: openstorage.io.action.volume/resize | |
params: | |
# resize volume by scalepercentage of current size | |
scalepercentage: "100" | |
maxsize: "30Gi" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment