GithubHelp home page GithubHelp logo

Comments (3)

k32 avatar k32 commented on September 25, 2024

Hello,

Apologies in advance, since I don't know k8s very well, but from reading the definition of the emqx-ee helm chart, it looks like the chart mounts the secret configured as emqxLicenseSecretName as a volume in the container:

      volumes:
      {{- if .Values.emqxLicenseSecretName  }}
      - name: emqx-license
        secret:
          secretName: {{ .Values.emqxLicenseSecretName }}

...

      containers:
        - name: emqx
         ...
          volumeMounts:
          - ....
          {{ if .Values.emqxLicenseSecretName  }}
          - name: emqx-license
            mountPath: "/opt/emqx/etc/emqx.lic"
            subPath: "emqx.lic"
            readOnly: true
          {{ end }}
       ...

Perhaps the way forward is to edit the existing secret (kubectl edit secrets <emqxLicenseSecretName>) and wait until Kubernetes updates the mounted secret: https://kubernetes.io/docs/concepts/configuration/secret/#mounted-secrets-are-updated-automatically

But please keep in mind, that my experience in operating k8s is extremely limited, so maybe wait until someone else with more experience gives the answer.

from emqx-rel.

k32 avatar k32 commented on September 25, 2024

P.S.

Can I update license without redploy emqx cluster, cause this will make client disconnect.

Are you worried about client disconnect or reconnect? If you use kubectl rollout feature to perform rolling restart, the configuration upgrade will proceed with a retatively little traffic disturbance. The clients will indeed reconnect immediately to the new pod.
This is completely normal in the kubernetes world, where everything is immutable.

from emqx-rel.

xpunch avatar xpunch commented on September 25, 2024

@k32
Thanks for your advice, the volume mount is defined as emqx.lic, which is a file, will not updated in pod when original file updated(Seems an docker issue).
If volume mounted is a path, which will works when original file updated.
I've tried what you said that to edit existing secret, as I said, the emqx.lic still get no changed in the target pod(two days passed after I edit the secret).

from emqx-rel.

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.