Skip to content

Conversation

@wiktor2200
Copy link
Contributor

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
Copy link
Contributor Author

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

@craig-rueda
Copy link
Member

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?

@wiktor2200
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

@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?

@craig-rueda
Copy link
Member

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.

@wiktor2200
Copy link
Contributor Author

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 wiktor2200 closed this Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants