danielewood opened a new pull request #13678:
URL: https://github.com/apache/superset/pull/13678
### SUMMARY
Changes the helm template to make calling both pip and apt-get install
conditional on packages/requirements being present.
Allows easy extension of Superset by an end user to include packages that
may not be suitable for baseline superset. Also makes testing and iteration a
bit faster.
### TEST PLAN
#### In existing superset:master:
```bash
cd helm/superset
helm dependency update
helm template -s templates/secret-superset-config.yaml . \
| ggrep -oP '\s+superset_bootstrap\.sh: \K.+' \
| base64 -d
```
Expected output:
```bash
#!/bin/sh
pip install psycopg2==2.8.5 redis==3.2.1
```
---
#### In PR branch:
```bash
cd helm/superset
helm dependency update
helm template -s templates/secret-superset-config.yaml . \
| ggrep -oP '\s+superset_bootstrap\.sh: \K.+' \
| base64 -d
```
Expected output:
```bash
#!/bin/sh
pip install psycopg2==2.8.5 redis==3.2.1
```
---
#### Now, the changes:
Run:
```bash
helm template -s templates/secret-superset-config.yaml . -f - <<<\
"
additionalAptPackages:
- socat
- nano
additionalRequirements:
- Authlib
" \
| ggrep -oP '\s+superset_bootstrap\.sh: \K.+' \
| base64 -d
```
Expected output:
```bash
#!/bin/sh
apt-get update -y --no-install-recommends \
&& apt-get install -y \
socat nano \
&& rm -rf /var/lib/apt/lists/*
pip install Authlib
```
---
#### Finally, removing both lists:
```bash
helm template -s templates/secret-superset-config.yaml . -f - <<<\
"
additionalAptPackages: {}
additionalRequirements: {}
" \
| ggrep -oP '\s+superset_bootstrap\.sh: \K.+' \
| base64 -d
```
Expected output:
```bash
#!/bin/sh
```
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Changes UI
- [ ] Requires DB Migration.
- [ ] Confirm DB Migration upgrade and downgrade tested.
- [x] Introduces new feature or API
- [ ] Removes existing feature or API
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]