shopware / shopware-operator

Operator manages Shopware installations in a Kubernetes cluster.
Apache License 2.0
9 stars 0 forks source link

Disable extension management via Administration #63

Open msestendrup opened 1 day ago

msestendrup commented 1 day ago

Installing plugins/apps over the Administration does not work in any cluster setup. This is not unique to our PaaS. In cluster setups you can't dynamically install or update extensions, because those changes need to be done on every host server. Therefore, such operations should be performed during a deployment/rollout and not dynamically.

To change the extension management in the Admin we still must check which option is the best.

Different options

Option 1

To disable the installation of extensions in the Administration, you can set the following configuration in your config/packages/z-shopware.yaml file

See https://developer.shopware.com/docs/guides/hosting/installation-updates/extension-managment.html#configuring-extension-manager-to-read-only-in-admin

Option 2

Maybe we could use the env variable DISABLE_EXTENSIONS=1.

Details about the env variable.

In cluster setups you can't dynamically install or update extensions, because those changes need to be done on every host server.
Therfore such operations should be performed during a deployment/rollout and not dynamically.
For this you now can set the variable `DISABLE_EXTENSIONS=1` in your .env file.
This will:
- Only load plugins that are installed over composer, all other plugins are ignored.
- Ignore all apps that may be installed.

Another advantage of that flag is that it reduces the amount of database queries shopware needs to perform on each request, and thus making shopware faster and reducing the load on the database.

Point 2 must be checked as we maybe not want this behaviour. Maybe we need to implement another behaviour in Shopware itself.

renaudhager commented 1 day ago

Option with the env I think, is the easiest solution, but we will need to test it.