GithubHelp home page GithubHelp logo

Comments (3)

Angel0r avatar Angel0r commented on July 20, 2024

I managed to solve the problem by setting the created storageClass as default:

annotations: 
  storageclass.kubernetes.io/is-default-class: "true"

from helm-charts.

Haleygo avatar Haleygo commented on July 20, 2024

Hello @Angel0r ,
Have you tried specified the storageClassName under their StorageSpec, like for vmstorage

kind: VMCluster
metadata:
  name: example-vmcluster
spec:
  vmstorage:
    replicaCount: 2
    storage:
      volumeClaimTemplate:
        spec:
          storageClassName: prod-sc

from helm-charts.

Nabil372 avatar Nabil372 commented on July 20, 2024

@Angel0r, It's possible to set the storageClassName via the helm values. Just make sure you follow the resource spec.

Here's a snippet where I've specified storageClassName in my helm values for VMSingle:

{
...
"vmsingle": {
    "annotations": {},
    "enabled": true,
    "spec": {
        "image": {
            "tag": "v1.101.0"
        },
        "retentionPeriod": "30",
        "replicaCount": 1,
        "extraArgs": {},
        "storage": {
            "storageClassName": "efs-sc",
            "accessModes": [
                "ReadWriteOnce"
            ],
            "resources": {
                "requests": {
                    "storage": "20Gi"
                }
            }
        }
    },
...
}

helm successfully templates the storageClassName into the VMSingle spec:

apiVersion: operator.victoriametrics.com/v1beta1
kind: VMSingle
metadata:
  labels:
    app.kubernetes.io/instance: vmo-helm-c8ce5482
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: victoria-metrics-k8s-stack
    app.kubernetes.io/version: v1.101.0
    helm.sh/chart: victoria-metrics-k8s-stack-0.23.2
  name: vmo
  namespace: vm
spec:
  extraArgs:
    vmalert.proxyURL: http://vmalert-vmo.vm.svc:8080
  image:
    tag: v1.101.0
  replicaCount: 1
  retentionPeriod: "30"
  storage:
    accessModes:
      - ReadWriteOnce
    resources:
      requests:
        storage: 20Gi
    storageClassName: "efs-sc"

from helm-charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.