Add support for k8s StatefulSet
Currently collector doesn't recognize k8s StatefulSet. Change-Id: If111279dc204704ac5e73d9f880eb4ecdd925297 Story: 2001757 Task: 12155
This commit is contained in:
parent
2fdcc08875
commit
52643b7a7c
|
@ -1769,6 +1769,7 @@ There is also additional Kubernetes dimensions for the Container and Pod metrics
|
||||||
| ReplicationController | replication_controller |
|
| ReplicationController | replication_controller |
|
||||||
| ReplicaSet | replica_set |
|
| ReplicaSet | replica_set |
|
||||||
| DaemonSet | daemon_set |
|
| DaemonSet | daemon_set |
|
||||||
|
| StatefulSet | stateful_set |
|
||||||
| Deployment| deployment | Only will be set if derive_host is set to true as it needs to connect to the API to see if the ReplicaSet is under a deployment
|
| Deployment| deployment | Only will be set if derive_host is set to true as it needs to connect to the API to see if the ReplicaSet is under a deployment
|
||||||
| Job | job |
|
| Job | job |
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# (C) Copyright 2015,2017-2018 Hewlett Packard Enterprise Development LP
|
# (C) Copyright 2015,2017-2018 Hewlett Packard Enterprise Development LP
|
||||||
# (C) Copyright 2017 KylinCloud
|
# (C) Copyright 2017 KylinCloud
|
||||||
|
# Copyright 2018 OP5 AB
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import json
|
import json
|
||||||
|
@ -815,6 +816,8 @@ def _get_pod_owner_pair(kubernetes_connector, pod_owner_type, pod_owner_name, po
|
||||||
return 'deployment', deployment_name
|
return 'deployment', deployment_name
|
||||||
elif pod_owner_type == "DaemonSet":
|
elif pod_owner_type == "DaemonSet":
|
||||||
return 'daemon_set', pod_owner_name
|
return 'daemon_set', pod_owner_name
|
||||||
|
elif pod_owner_type == "StatefulSet":
|
||||||
|
return 'stateful_set', pod_owner_name
|
||||||
elif pod_owner_type == "Job":
|
elif pod_owner_type == "Job":
|
||||||
if not kubernetes_connector:
|
if not kubernetes_connector:
|
||||||
log.info("Can not set cronjob name as connection information to API is not set. "
|
log.info("Can not set cronjob name as connection information to API is not set. "
|
||||||
|
|
Loading…
Reference in New Issue