Use immutable tags for running tasks
This way we can run tasks with `IfNotPresent` and be sure it works as intended.
This commit is contained in:
@@ -7,6 +7,8 @@ import pykube
|
||||
import yaml
|
||||
from munch import Munch
|
||||
|
||||
from consts import CONFIG
|
||||
|
||||
api = pykube.HTTPClient(pykube.KubeConfig.from_env())
|
||||
|
||||
|
||||
@@ -46,6 +48,8 @@ def run_on_node(fn, node):
|
||||
"namespace": "kube-system", # FIXME
|
||||
"nodeSelector": json.dumps({"kubernetes.io/hostname": node}),
|
||||
"cmd": json.dumps(fn),
|
||||
"image_repository": CONFIG["image_repository"],
|
||||
"image_tag": CONFIG["image_tag"],
|
||||
}
|
||||
template = Path("./templates/task.yaml").read_bytes().decode()
|
||||
manifest = template.format(**ctx)
|
||||
|
Reference in New Issue
Block a user