Git Product home page Git Product logo

Comments (3)

git-hulk avatar git-hulk commented on May 28, 2024

Hi @kinoute

Thanks for your feedback. The root cause is the single mount file kvrocks.conf which is unable to be written, you can have a try at: config rewrite in 2.5.0 and it should return the same error.

And this start error was introduced in #1776 which would try to rewrite the configuration after loading the namespaces. Maybe we should turn this error into a warning when starting the server.

You can workaround this issue by mounting the whole dir where kvrocks.conf exists to /var/lib/kvrocks without the subPath kvrocks.conf.

from kvrocks.

kinoute avatar kinoute commented on May 28, 2024

Thanks for the quick answer @git-hulk ! I was able to fix it with your workaround. I needed to create an initContainer for this as mounting a secret as volume is now read-only since Kubernetes 1.9.

For those who are interested, here is a working manifest:

---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: kvrocks
  namespace: sahar-svc
spec:
  selector:
    matchLabels:
      run: kvrocks
  serviceName: "kvrocks"
  replicas: 1
  template:
    metadata:
      labels:
        app: kvrocks
        run: kvrocks
    spec:
      initContainers:
        - name: copy-kvrocks-conf
          image: busybox
          command: ["sh", "-c", "cp /tmp/kvrocks.conf /var/lib/kvrocks/"]
          volumeMounts:
            - name: kvrocks-config
              mountPath: /tmp/kvrocks.conf
              subPath: kvrocks.conf
            - name: kvrocks-folder
              mountPath: /var/lib/kvrocks
      containers:
        - name: kvrocks
          image: apache/kvrocks:2.7.0
          volumeMounts:
            - name: kvrocks-folder
              mountPath: /var/lib/kvrocks
            - name: kvrocks
              mountPath: /data
          ports:
            - containerPort: 6379
          resources:
            requests:
              cpu: 1
              memory: 2Gi
            limits:
              memory: 2Gi
      volumes:
        - name: kvrocks-folder
          emptyDir: {}
        - name: kvrocks
          persistentVolumeClaim:
            claimName: kvrocks
        - name: kvrocks-config
          secret:
            secretName: kvrocks-config

from kvrocks.

git-hulk avatar git-hulk commented on May 28, 2024

@kinoute Thanks for your sharing. I would refer them here if other folks also suffer from this issue.

from kvrocks.

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.