janus-idp / backstage-showcase

Enterprise-ready Backstage distribution

Home Page:https://showcase.janus-idp.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is app-config.dynamic-plugins.yaml used for?

gashcrumb opened this issue · comments

While updating the dynamic-plugins.default.yaml to include config snippets for new plugins I noticed there's also this file which has some arbitrary defaults.

When is this file used or is it referenced from some documentation? When should we consider updating this file?

CC @ciiay @invincibleJai

I got confused too. It's not clearly documented which all files are actually needed to be modified and which ones are auto-generated and must be immutable. I can't figure out from which YAML file a certain var or key is coming from

  • dynamic-plugins.default.yaml is the one used to list all dynamic plugins that are embedded inside the Showcase container image, along with their default enablement status and their default config. It is also embedded inside the docker image, and used by the install-dynamic-plugins initContainer to install the plugins.
  • app-config.dynamic-plugins.yaml is a file that contains the default placement config of dynamic frontend plugins that are embedded inside the showcase image, to be used when running locally outside of Kubernetes (so without the usage of the initContainer + dynamic-plugins.default.yaml).

I got confused too. It's not clearly documented which all files are actually needed to be modified and which ones are auto-generated and must be immutable. I can't figure out from which YAML file a certain var or key is coming from

@rsriniva I agree, there's a few layers that make things confusing. There's one log line that lists what configuration files the app is starting up with which can help a lot, there's an order of precedence to be aware of. It's one of the first lines logged, for example from an RHDH on openshift:

Loaded config from app-config.yaml, app-config.example.yaml, app-config.example.production.yaml, app-config.dynamic-plugins.yaml, app-config-from-configmap.yaml, env

with that many files it's hard to get an idea of the complete effective configuration. The main thing that I wanted to point out is if a configuration file is not present on this line, then it is not being loaded.

Let me add a point:
In the Helm deployment, app-config.dynamic-plugins.yaml is in fact generated by the install-dynamic-plugins initContainer based on the content of the dynamic-plugins.default.yaml (if it is included) and the overridden plugins in the plugins list.

That's why I said that the app-config.dynamic-plugins.yaml present in the Github repository (not included in the docker image afaik) is only there to be available for local tests.

I agree that it should probably be streamlined, and we can certainly create an issue for that.