Skip to content

Empty volumeClaimTemplates still create volume claims #8744

@Breee

Description

@Breee

We want to deploy an elasticsearch instance

apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: elasticsearch
  namespace: test
spec:
  version: 8.18.3
  nodeSets:
  - config:
      node.store.allow_mmap: false
    count: 3
    name: default
    volumeClaimTemplates: []
    podTemplate:
      spec:
        containers:
        - name: elasticsearch
          resources:
            limits:
              cpu: "2"
              memory: 8Gi
          volumeMounts:
          - mountPath: /usr/share/elasticsearch/data
            name: elasticsearch-data
            subPathExpr: $(POD_NAME)
        volumes:
        - name: elasticsearch-data
          persistentVolumeClaim:
            claimName: test-elasticsearch-data

We bring our own PVCs and PVs due to the nature of our storage.

The volumeClaimTemplates: [] should lead to a statefulset that does not have any volumeClaims, however, the operator will generate the default one per replica anyway, elasticsearch-data-elasticsearch-es-default-0, elasticsearch-data-elasticsearch-es-default-1, elasticsearch-data-elasticsearch-es-default-2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions