Add labels

This commit is contained in:
Arnaud Delcasse 2024-11-04 09:15:08 +01:00
parent f37264d7cf
commit bb0fe1ee9f
1 changed files with 6 additions and 4 deletions

View File

@ -8,7 +8,8 @@ def deploy_go(name, src, image, sync_folders = []):
"{name}-compile".format(name=name),
compile_cmd,
ignore="build/".format(src=src),
deps=[src])
deps=[src],
labels=[name])
i = 0
resource_deps=["{name}-compile".format(name=name)]
@ -17,7 +18,8 @@ def deploy_go(name, src, image, sync_folders = []):
local_resource(
new_resource_dep,
"mkdir -p build/{name}/{targetPath} && rsync -av {localPath}/ build/{name}/{targetPath}/".format(localPath=f[0], targetPath=f[1], name=name),
deps=[f[0]]
deps=[f[0]],
labels=[name]
)
resource_deps.append(new_resource_dep)
i = i+1
@ -34,7 +36,7 @@ ENTRYPOINT /server""".format(name = name)
entrypoint=['/server'],
dockerfile_contents=dockerfile_contents,
only=["build/{name}/".format(name = name)],
live_update=[sync("build/{name}".format(name=name), '/')],
live_update=[sync("build/{name}".format(name=name), '/')]
)
k8s_resource(name, resource_deps=resource_deps)
k8s_resource(name, resource_deps=resource_deps, labels=[name])