Skip to content

Commit 32dc550

Browse files
committed
Merge pull request #751 from helgi/run_container_name
fix(scheduler): run pod container name did not match how app containers are done
2 parents 9979523 + f69366c commit 32dc550

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

rootfs/scheduler/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"spec": {
3737
"containers": [
3838
{
39-
"name": "$id",
39+
"name": "$containername",
4040
"image": "$image",
4141
"env": [
4242
{
@@ -99,7 +99,7 @@
9999
"spec": {
100100
"containers": [
101101
{
102-
"name": "$id",
102+
"name": "$containername",
103103
"image": "$image",
104104
"env": []
105105
}
@@ -537,9 +537,11 @@ def run(self, namespace, name, image, entrypoint, command, **kwargs):
537537
name, image, entrypoint, command)
538538
)
539539

540+
app_type = 'run'
540541
POD = POD_TEMPLATE
541542
l = {
542543
'id': name,
544+
'containername': namespace + '-' + app_type,
543545
'app': namespace,
544546
'appversion': kwargs.get('version'),
545547
'type': 'run',
@@ -588,7 +590,7 @@ def run(self, namespace, name, image, entrypoint, command, **kwargs):
588590

589591
labels = {
590592
'app': namespace,
591-
'type': 'run',
593+
'type': app_type,
592594
'version': kwargs.get('version'),
593595
'heritage': 'deis',
594596
}

0 commit comments

Comments
 (0)