superset icon indicating copy to clipboard operation
superset copied to clipboard

feat(helm): add custom images for different pods

Open wiktor2200 opened this issue 3 years ago • 5 comments

SUMMARY

I've added support for different docker images for different pods. It's extremely useful when using custom build images (such as worker with webdriver and the rest without). Image still can be defined globally (as earlier) or specific for every pod in values file.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • [ ] Has associated issue: No, since feature request are moved to Discussions section.
  • [ ] Required feature flags:
  • [ ] Changes UI
  • [ ] Includes DB Migration (follow approval process in SIP-59)
    • [ ] Migration is atomic, supports rollback & is backwards-compatible
    • [ ] Confirm DB migration upgrade and downgrade tested
    • [ ] Runtime estimates and downtime expectations provided
  • [ ] Introduces new feature or API
  • [ ] Removes existing feature or API

wiktor2200 avatar Aug 04 '22 14:08 wiktor2200

@craig-rueda please take a look and review :)

wiktor2200 avatar Aug 04 '22 14:08 wiktor2200

Thanks for your contribution! I think this makes the config slightly harder to maintain, however :(. What's preventing you from just adding the webdriver to the "custom" image you're using and then reusing it across all pods?

craig-rueda avatar Aug 04 '22 16:08 craig-rueda

Webdriver (chrome) for Alerts & Report feature unfortunately needs higher permissions to run, otherwise it cannot took screenshots. I wanted to run whole superset as user 1000, so I thought running it in worker is required, but others are using official apache/superset in my case. What is more using lighter image (without webdriver) for init, celery, supersetnode makes it faster. (smaller the better)

wiktor2200 avatar Aug 04 '22 16:08 wiktor2200

That's also why I've not set it as required in json schema. So there is possibility to use it, but by default it's commented out in values.yaml and if clause checking which value to use.

wiktor2200 avatar Aug 04 '22 16:08 wiktor2200

@craig-rueda Do you have any suggestions how can I solve it other way and still being able to give different images to at least Superset worker?

wiktor2200 avatar Aug 05 '22 11:08 wiktor2200

Which perms are needed? We're using webdriver as well (for thumbnail generation) and haven't had any issues in terms of permissions. Everything works fine using uid 1000.

craig-rueda avatar Aug 08 '22 16:08 craig-rueda

Sorry for my mental shortcut. When it's pre-prepared (webdriver added to docker image) it can be run as 1000, but I wanted to run the rest with lighter image, so I've tried to use lighter and then installing webdriver (which was only possible as root). This is how I came up with an idea to add different images to different pods. Anyway if you think that it's not a good idea (and practice) to add this code I'm closing this PR and maybe it would be solved some other way in the future. And thanks for your feedback :)

wiktor2200 avatar Aug 08 '22 19:08 wiktor2200