Skip to content

Instantly share code, notes, and snippets.

@grdnrio
Created April 8, 2020 11:16
Show Gist options
  • Save grdnrio/7ec74cd80f88d43bf54abec58cde9ac9 to your computer and use it in GitHub Desktop.
Save grdnrio/7ec74cd80f88d43bf54abec58cde9ac9 to your computer and use it in GitHub Desktop.
Minio Autopilot Rule
apiVersion: autopilot.libopenstorage.org/v1alpha1
kind: AutopilotRule
metadata:
name: minio-resize
spec:
##### selector filters the objects affected by this rule given labels
selector:
matchLabels:
app: minio
pollInterval: 2
##### conditions are the symptoms to evaluate. All conditions are AND'ed
conditions:
# volume usage should be less than 30%
expressions:
- key: "100 * (px_volume_usage_bytes / px_volume_capacity_bytes)"
operator: Gt
values:
- "20"
##### 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: "100Gi"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment