stackanetes / kubernetes-entrypoint

Used as a container entrypoint, it will wait for specified k8s dependencies, create files based on ConfigMaps, and much more - before running a given command.
Apache License 2.0
51 stars 18 forks source link

Support labels in job dependencies #33

Closed seaneagan closed 6 years ago

seaneagan commented 6 years ago

It is a common pattern to depend on the same set of multiple jobs from multiple places. Additionally with orchestration tools this set of job may be dynamic based on configuration. In kubernetes we can encapsulate this set of jobs via shared labels. This patchset then adds support to depend on such a set of jobs via labels.

This is exposed via a new DEPENDENCY_JOBS_JSON env var, but DEPENDENCY_JOBS is retained for backward compatibility. For consistency DEPENDENCY_POD is renamed to DEPENDENCY_POD_JSON which is a breaking change.

PiotrProkop commented 6 years ago

LGTM, by the way thanks for contributing :smile:, I'l make a release with this and previous PR.