bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
8.83k stars 9.12k forks source link

[bitnami/discourse] Plugins are not installed when added in the helm-release #28871

Open Giiltham opened 1 month ago

Giiltham commented 1 month ago

Name and Version

bitnami/discourse 13.2.15

What architecture are you using?

None

What steps will reproduce the bug?

  1. Add discourse-solved in the helm-release
    discourse:
    plugins:
      - https://github.com/discourse/discourse-solved
  2. Check the logs at startup, the plugin is cloned
Cloning into '/opt/bitnami/discourse/plugins/discourse-solved'...
{
  "discourse-solved": "1bbdfd8f"
}
checking out compatible discourse-solved version: 526a44644a7b3f0c2a3ba4fc16e72f364e9fce6d
HEAD is now at 526a446 FIX: Nest combobox within LI element (#280)
discourse 09:46:14.63 INFO  ==> 
discourse 09:46:14.63 INFO  ==> Welcome to the Bitnami discourse container
discourse 09:46:14.63 INFO  ==> Subscribe to project updates by watching https://github.com/bitnami/containers
discourse 09:46:14.63 INFO  ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
discourse 09:46:14.63 INFO  ==> Upgrade to Tanzu Application Catalog for production environments to access custom-configured and pre-packaged software components. Gain enhanced features, including Software Bill of Materials (SBOM), CVE scan result reports, and VEX documents. To learn more, visit https://bitnami.com/enterprise
discourse 09:46:14.63 INFO  ==> 
discourse 09:46:14.64 INFO  ==> Validating settings in POSTGRESQL_CLIENT_* env vars
discourse 09:46:14.65 INFO  ==> Trying to connect to the database server
discourse 09:46:14.67 INFO  ==> Creating database bitnami_application
discourse 09:46:14.83 INFO  ==> Creating Discourse configuration file
discourse 09:46:14.91 INFO  ==> Restoring persisted Discourse installation
discourse 09:46:15.06 INFO  ==> Trying to connect to the database server
discourse 09:46:15.08 INFO  ==> Running database migrations
discourse 09:46:32.85 INFO  ==> Precompiling assets, this may take some time...

discourse 09:49:59.15 INFO  ==> ** Discourse setup finished! **
discourse 09:49:59.18 INFO  ==> ** Starting Discourse **
=============== Phusion Passenger(R) Standalone web server started ===============
PID file: /opt/bitnami/discourse/passenger.8080.pid
Log file: /opt/bitnami/discourse/log/passenger.8080.log
Environment: production
Accessible via: http://0.0.0.0:8080/

You can stop Phusion Passenger(R) Standalone by pressing Ctrl-C.
Problems? Check https://www.phusionpassenger.com/library/admin/standalone/troubleshooting/
===============================================================================
  1. The plugin can't be found in /opt/bitnami/discourse/plugins/ or in the application itself (administration -> plugins)

Are you using any custom parameters or values?

No response

What is the expected behavior?

No response

What do you see instead?

The plugin can't be found in /opt/bitnami/discourse/plugins/ or in the application itself (administration -> plugins)

Additional information

I can bash in the pod and execute : RAILS_ENV=production bundle exec rake plugin:install repo=https://github.com/discourse/discourse-solved which does work

jotamartos commented 4 weeks ago

I just tried to reproduce the issue but the plugin was included in the plugins folder after the deployment finished. I edited the values.yaml file

diff --git a/bitnami/discourse/values.yaml b/bitnami/discourse/values.yaml
index 1e451805ae..b5746ad53b 100644
--- a/bitnami/discourse/values.yaml
+++ b/bitnami/discourse/values.yaml
@@ -290,7 +290,8 @@ discourse:
   ## plugins:
   ##   - https://github.com/discourse/discourse-oauth2-basic
   ##
-  plugins: []
+  plugins:
+      - https://github.com/discourse/discourse-solved
   ## @param discourse.persistPlugins Persist plugins across container restarts
   ##
   persistPlugins: true

and confirmed that the folder existed

➜  discourse git:(main) k exec -it discouse-discourse-76b694fb5-xr6gn -- ls /opt/bitnami/discourse/plugins/
Warning: Use tokens from the TokenRequest API or manually created secret-based tokens instead of auto-generated secret-based tokens.
Defaulted container "discourse" out of: discourse, sidekiq
chat               discourse-lazy-videos    discourse-presence  poll
checklist          discourse-local-dates    discourse-solved    spoiler-alert
discourse-details  discourse-narrative-bot  footnote            styleguide
hxtmdev commented 4 weeks ago

@Giiltham try to reproduce this with a fresh deployment (especially fresh PVC) with persistPlugins: false from the start. This helped with plugin changes in my case. If that solves your problem you might have to transition to persistPlugins: false somehow if you can't reinstall fresh, no idea if manual changes are necessary to keep the PVC but not "persist" the plugins, might be as some plugins might already be "persisted".

Giiltham commented 3 weeks ago

@Giiltham try to reproduce this with a fresh deployment (especially fresh PVC) with persistPlugins: false from the start. This helped with plugin changes in my case. If that solves your problem you might have to transition to persistPlugins: false somehow if you can't reinstall fresh, no idea if manual changes are necessary to keep the PVC but not "persist" the plugins, might be as some plugins might already be "persisted".

It worked thanks.

Giiltham commented 3 weeks ago

Shouldn't it be specified to try using "persistPlugins: false" in the discourse chart readme if plugins don't work by default ? I've found several topics on internet talking about this afterwards.

hxtmdev commented 3 weeks ago

I think this covers it.

Giiltham commented 3 weeks ago

Yes, but i think it could be a little more explicit on the subject, it's not only that we can't upgrade them but also that we can add new ones. I understand that the message covers it but that's not always straightforward at a first glance, while i think it is a behavior we would expect by default on any other discourse instance

hxtmdev commented 3 weeks ago

I myself only read the comment in the values.yaml when I started out, so adding it there and explicitly stating "no additions" would probably be an improvement, yes 👍🏻

jotamartos commented 2 weeks ago

I'm glad to hear you manage to solve the issue with the plugin. As I mentioned, it worked without problems in a fresh deployment. If you think the documentation can be improved, please follow the contribution guidelines to help the users in the future when running into this issue.

github-actions[bot] commented 2 days ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.