-
Notifications
You must be signed in to change notification settings - Fork 197
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
For example, when I give a VMCluster like:
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMCluster
metadata:
name: example-cluster
namespace: monitoring
spec:
vmstorage:
storage:
volumeClaimTemplate:
metadata:
name: foo-db # THIS!!
spec:
storageClassName: ceph-hdd-block
resources:
requests:
storage: 3Gi
vmselect:
replicaCount: 1
vminsert:
replicaCount: 1
... the resulting StatefulSet for vmstorage becomes:
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: vmstorage-example-cluster
namespace: monitoring
spec:
template:
spec:
containers:
- args:
(snip)
volumeMounts:
- mountPath: vmstorage-data
name: vmstorage-db # XXX
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: foo-db # The name given in VMCluster.spec.vmstorage.storage.volumeClaimTemplate.metadata.name
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
storageClassName: ceph-hdd-block
volumeMode: Filesystem
status:
phase: Pending
... and StatefulSet controller cannot create Pods due to volume name mismatch.
According to https://github.com/VictoriaMetrics/operator/blob/v0.19.1/controllers/factory/alertmanager.go#L571 , it seems that the operator allows renaming volumeClaimTemplate. However, .spec.template.spec.containers[0].volumeMounts[0].name of the resulting StatefulSet does not follow the volumeClaimTemplate's name. I think it is a problem.
VMSelect and VMAlertmanager, which also create StatefulSets, may have the same problem but I don't have checked them.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working