GithubHelp home page GithubHelp logo

Comments (8)

mmontes11 avatar mmontes11 commented on June 15, 2024

Hey there!

100% this should be mutable at some point.

Updating the my.cnf config will need a Pod restart to pick up the new changes, so the plan is to keep it inmutable until we support custom upgrades:

from mariadb-operator.

github-actions avatar github-actions commented on June 15, 2024

This issue is stale because it has been open 30 days with no activity.

from mariadb-operator.

rammelmueller avatar rammelmueller commented on June 15, 2024

Same problem here. We're using ArgoCD to deploy the MariaDB instance and we're a bit lost. What would be the standard way to update the my.cnf when using the operator?

from mariadb-operator.

mmontes11 avatar mmontes11 commented on June 15, 2024

Hey there @rammelmueller ! Sorry for the late response.

At the moment, the spec.myCnf is inmutable for a reason: after updating the config, a restart of the cluster needs to happen for the changes to have effect, which means the operator would need to trigger a rolling upgrade.

The default rolling upgrade of the StatefulSet is not reliable enough, we need to implement something custom, see:

We will look into it shortly, and then we can make spec.myCnf mutable.

from mariadb-operator.

rammelmueller avatar rammelmueller commented on June 15, 2024

Thanks for the reply @mmontes11!

It's OK for now, I guess, however, one question remains: What is the standard procedure to updated the spec.myCnf when using some gitops tool like ArgoCD?

from mariadb-operator.

mmontes11 avatar mmontes11 commented on June 15, 2024

spec.myCnf is inmutable as I said, which means that the wehook will not allow ArgoCD to update this field. There is however one workaround, which implies using StatefulSet rolling upgrade, so use it at your own risk:

  • As you can see, the operator creates a ConfigMap to store the my.cnf which is mounted by the StatefulSet
spec:
  image: mariadb:11.2.2
  myCnf: |
    [mariadb]
    bind-address=*
    default_storage_engine=InnoDB
    binlog_format=row
    innodb_autoinc_lock_mode=2
    max_allowed_packet=256M
  myCnfConfigMapKeyRef:
    key: my.cnf
    name: mariadb-config
  • You may patch this ConfigMap from ArgoCD, the operator won't interact with it once it is created
  • Then, you should trigger a rolling upgrade. You will need to dynamically upgdate the Pod template from ArgoCD. Something equivalent to:
kubectl patch sts mariadb  -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"`date +'%s'`\"}}}}}"

This will be handled by the operator in the next few releases. The idea is that spec.myCnf becomes mutable and the ConfigMap gets updated, triggering a custom upgrade done by the operator.

from mariadb-operator.

github-actions avatar github-actions commented on June 15, 2024

This issue is stale because it has been open 30 days with no activity.

from mariadb-operator.

github-actions avatar github-actions commented on June 15, 2024

This issue was closed because it has been stalled for 5 days with no activity.

from mariadb-operator.

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.