openanalytics / containerproxy

Manage HTTP proxy routes into Docker containers
Apache License 2.0
45 stars 66 forks source link

Kubernetes node-selector #2

Closed BossColo closed 5 years ago

BossColo commented 6 years ago

Allow user to set node-selector in the kubernetes section of the application.yml The syntax is

kubernetes:
  ...
  node-selector: <key>=<value>
  ...

Where <key> and <value> are from the node label of the node(s) you want to schedule your pods on.

insatomcat commented 5 years ago

Hi. Why did you have to use redo things around a DoneablePod, instead of adding a simple .withNodeSelector(nodeSelectorsMap) ? (honest question ... I actually tried with ".withNodeSelector()" and indeed it didn't work ...). Also, don't you think the node-selector should be a property of each spec instead of "promoting" it as a global kubernetes backend property ?

BossColo commented 5 years ago

Hi. Why did you have to use redo things around a DoneablePod, instead of adding a simple .withNodeSelector(nodeSelectorsMap) ? (honest question ... I actually tried with ".withNodeSelector()" and indeed it didn't work ...).

If you do it with .withNodeSelector, there's no option of leaving it blank. You have to put something in there.

Also, don't you think the node-selector should be a property of each spec instead of "promoting" it as a global kubernetes backend property ?

You're probably right here, but I had a hard enough time figuring out how to get this to work. Documentation on fabric8 isn't the best I've found, unless I'm missing something. Either way, this seemed like the easiest way to at least get the functionality in there.