summaryrefslogtreecommitdiffstats
path: root/k8s/k8sclient
diff options
context:
space:
mode:
authorJack Lucas <jflos@sonoris.net>2020-09-16 14:01:01 -0400
committerJack Lucas <jflos@sonoris.net>2020-09-17 12:36:25 -0400
commit86c9f3ac9a19ffba6ef9ca92ac088a0c24abcb3f (patch)
tree3c796ca8a9d3176c09ad76c6a118303516ae7ae0 /k8s/k8sclient
parent677b4ccd01a3d4f8f758afa658b7579910264498 (diff)
Label k8s Deployments for healthcheck
Issue-ID: DCAEGEN2-2433 Signed-off-by: Jack Lucas <jflos@sonoris.net> Change-Id: I12b5ca5d0c70d7c8d42c1ec1ce88841d2cf25cd7
Diffstat (limited to 'k8s/k8sclient')
-rw-r--r--k8s/k8sclient/k8sclient.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/k8s/k8sclient/k8sclient.py b/k8s/k8sclient/k8sclient.py
index a41d32d..68feaec 100644
--- a/k8s/k8sclient/k8sclient.py
+++ b/k8s/k8sclient/k8sclient.py
@@ -4,6 +4,7 @@
# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved.
# Copyright (c) 2020 Pantheon.tech. All rights reserved.
# Copyright (c) 2020 Nokia. All rights reserved.
+# Copyright (c) 2020 J. F. Lucas. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -216,7 +217,7 @@ def _create_deployment_object(component_name,
deployment = client.V1Deployment(
api_version="apps/v1",
kind="Deployment",
- metadata=client.V1ObjectMeta(name=deployment_name),
+ metadata=client.V1ObjectMeta(name=deployment_name, labels=labels),
spec=spec
)