Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(helm): Add optional apt-get install to superset_bootstrap.sh #13678

Merged
merged 2 commits into from
Mar 18, 2021

Conversation

danielewood
Copy link
Contributor

@danielewood danielewood commented Mar 17, 2021

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:

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:

#!/bin/sh

pip install psycopg2==2.8.5 redis==3.2.1 

In PR branch:

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:

#!/bin/sh

pip install psycopg2==2.8.5 redis==3.2.1 

Now, the changes:

Run:

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:

#!/bin/sh

apt-get update -y \
  && apt-get install -y --no-install-recommends \
     socat nano \
  && rm -rf /var/lib/apt/lists/*

pip install Authlib 

Finally, removing both lists:

helm template -s templates/secret-superset-config.yaml . -f - <<<\
"
additionalAptPackages: {}
additionalRequirements: {}
" \
  | ggrep -oP '\s+superset_bootstrap\.sh: \K.+' \
  | base64 -d

Expected output:

#!/bin/sh

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@craig-rueda craig-rueda merged commit 9efe1a4 into apache:master Mar 18, 2021
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
…ache#13678)

* add conditional apt install

* move install switch to correct command.
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/S 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants