Skip to content

Fix kong permission and execution errors in wrapper.sh#45

Closed
pieveee wants to merge 9 commits intosupabase-community:mainfrom
pieveee:main
Closed

Fix kong permission and execution errors in wrapper.sh#45
pieveee wants to merge 9 commits intosupabase-community:mainfrom
pieveee:main

Conversation

@pieveee
Copy link
Copy Markdown
Contributor

@pieveee pieveee commented May 8, 2023

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

Currently, kong fails to start running with the following error:

/scripts/wrapper.sh: 3: set: Illegal option -o pipefail

And:

/scripts/wrapper.sh: line 8: /home/kong/kong.yml: Permission denied

What is the new behavior?

  1. The shebang was adjusted from /bin/sh to /bin/bash (See https://www.baeldung.com/linux/illegal-option-o-pipefail)
  2. kong.yml declarative configuration file was moved from /home/kong/kong.yml to /usr/local/kong/kong.yml, as well as /home/kong/template.yml to /usr/local/template.yml in order to run wrapper.sh script without permission issues

pieveee added 9 commits May 7, 2023 18:50
If the database provided is being disabled in values.yaml (e.g. because of using a replicated database solution) the helm installation would fail with: 
Error: INSTALLATION FAILED: template: supabase/templates/db/storage.yaml:1:14: executing "supabase/templates/db/storage.yaml" at <.Values.db.persistence.enabled>: nil pointer evaluating interface {}.enabled
Fix missing if-clause when database is disabled
Currently, the container for kong would not start as wrapper.sh fails in its execution with "Illegal option -o pipefail"  (See: https://www.baeldung.com/linux/illegal-option-o-pipefail#how-to-avoid-the-error).
The /home/kong/ directory doesn't exist in the newest Docker image of kong. Hence, the kong.yml should be stored at an existing and writeable directory.
Change wrapper.sh execution from sh to bash
@pieveee
Copy link
Copy Markdown
Contributor Author

pieveee commented Jul 7, 2023

@milanvanschaik Can you check the merge request?

@ngladbach
Copy link
Copy Markdown

@milanvanschaik @bigbitbus @icrotz @cpdeethree @devudopw @kiwicopple could you have a look?

@icrotz
Copy link
Copy Markdown
Contributor

icrotz commented Sep 21, 2023

I don't have the rights to merge on this repository

@luizfelmach
Copy link
Copy Markdown
Contributor

Thanks for the PR and for raising this 🙏
It appears this has already been resolved in this commit: c27cafc
It also looks like the PR was not closed afterward.

Cc @aantti

@aantti
Copy link
Copy Markdown
Contributor

aantti commented Dec 29, 2025

🙏

@aantti aantti closed this Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants