operator
operator copied to clipboard
allowed override vmagent volume
want to prevent vmagent data lost by mount
volumes:
- name: persistent-queue-data
hostPath:
path: /data/var/vmagent/persistent-queue-data
operator should merge volume by name.
https://github.com/VictoriaMetrics/operator/blob/10a53e58c8dcb388e7dda62db836513fb0618e90/controllers/factory/vmagent.go#L246-L251
I think, that it can be achieved with statefulset instead of deployment. Deployment in case of persistent volume claim mount must has upgradeStrategy: ReCreate and replicas: 1.
Related issue https://github.com/VictoriaMetrics/operator/issues/219
I hope, soon it will be added.
Some provider seems do not need to recreate, like openebs zfs, allowed multi mount.
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: openebs-local-zfs-testing-shared
parameters:
# allowed multi mount
shared: "yes"
FYI, v0.25.0 release supports StatefulMode for VMAgent. Will update docs soon.
@f41gh7 can we have docs updated accordingly?
Added an example https://github.com/VictoriaMetrics/operator/blob/master/config/examples/vmagent_stateful_with_sharding.yaml