Giter VIP home page Giter VIP logo

Comments (5)

tobiasge avatar tobiasge commented on September 22, 2024

Netbox itself is using Python files for the configuration. I don't think it's a good idea to rewrite this system in the Docker image.
This would need to be a FR for Netbox.

You can mount configuration files as ConfigMaps and populate those directly from Python files. See --set-file parameter in Helm.

from netbox-docker.

NeodymiumFerBore avatar NeodymiumFerBore commented on September 22, 2024

We cannot leverage Helm deep merge with --set-file . For example, If you have 1 plugin with 10 config keys (with nested dicts), and need one to be changed in all your environments, then you only override this one key in your env-specific Values, and keep the 9 others DRY in a common Values file. Now, scale this to 10 plugins: this is another use case.

I considered using --set-file, but that was too much code repetition. I could have implemented deep merge for plugins config, but I found it easier to maintain to just accept yaml as config input.

I understand your point of view about this FR being for Netbox more than netbox-docker. I don't think it will be accepted though.

from netbox-docker.

cimnine avatar cimnine commented on September 22, 2024

I believe the following should work just fine:
As the config files are Python, you can create your own config file with Python code which loads values from a specific yaml/json file or deserializes values from a json/yaml string. That string could be helm-managed. Just put that special config file in the regular config directory and off you go. No need for anything special on our end.

from netbox-docker.

NeodymiumFerBore avatar NeodymiumFerBore commented on September 22, 2024

I believe the following should work just fine: As the config files are Python, you can create your own config file with Python code which loads values from a specific yaml/json file or deserializes values from a json/yaml string. That string could be helm-managed. Just put that special config file in the regular config directory and off you go. No need for anything special on our end.

That's what I do already. Wanted to propose it so the community can benefit from it. Was also interested in people feedback on how they handle such case.

from netbox-docker.

cimnine avatar cimnine commented on September 22, 2024

Wanted to propose it so the community can benefit from it.

That's kind of you. It seems like this could become a Wiki page for those interested. Or you could ask whether the netbox-chart project of @bootc is interested in such a contribution.

From a maintainer's perspective, we'd rather not add more custom functionality to the image itself. The reason is that we have to maintain the feature and test it with every release (our releases, and releases of NetBox). We're not keen on committing to more work. (It's why we extracted the initializers to become their own plugin, for example.)

from netbox-docker.

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.