This PR brings an ability to collect core components - core pods with description if required.
a new cloud-pipeline/core-component=<kind> label shall be added to each core pod. This label indicates that concrete pod shall be considered as core pod. The value shall be equal to pods highest owner kind (Deployment/StatefulSet/...).
this label shall be added to cluster.kube.core.component.label system preference
a new API method shall be implemented:
Load core components
GET /cluster/pods/core
Response:
<pod description as for cluster/node/<…>/load>
...
parentType - owner's type (Deployment/StatefulSet/CronJob/...)
parentName - owner's name (cp-api-srv/cp-vm-monitor/...)
status
reason
message
timestamp # pod's start timestamp
containers
<container description as for cluster/node/<…>/load>
...
restartCount
lastRestartStatus (interface as for status field)
Load pod description
GET cluster/pods/info?podId=<podID>&detailed=<true/false>
podId - the pod's name [required]
detailed - flag that indicates full pod info loading [default: false]
Response:
events: # list of objects
type
reason
message
description # string that contains pod info description; returns if detailed=true only
Load container logs
GET cluster/containers/logs?podId=<>&containerId=<>&limit=<>
podId - the pod's name [required]
containerId - the container name [required]
limit - the number of lines to return [default: value from system.log.line.limit system preference]
All methods shall be available for ADMIN role only.
This PR brings an ability to collect core components - core pods with description if required.
cloud-pipeline/core-component=<kind>
label shall be added to each core pod. This label indicates that concrete pod shall be considered as core pod. The value shall be equal to pods highest owner kind (Deployment
/StatefulSet
/...).cluster.kube.core.component.label
system preferencea new API method shall be implemented:
GET /cluster/pods/core
Response: <pod description as for cluster/node/<…>/load> ...
parentType
- owner's type (Deployment
/StatefulSet
/CronJob
/...)parentName
- owner's name (cp-api-srv
/cp-vm-monitor
/...)status
reason
message
timestamp
# pod's start timestampcontainers
<container description as for cluster/node/<…>/load> ...restartCount
lastRestartStatus
(interface as forstatus
field)GET cluster/pods/info?podId=<podID>&detailed=<true/false>
podId
- the pod's name [required]detailed
- flag that indicates full pod info loading [default: false] Response:events
: # list of objectstype
reason
message
description
# string that contains pod info description; returns if detailed=true onlyGET cluster/containers/logs?podId=<>&containerId=<>&limit=<>
podId
- the pod's name [required]containerId
- the container name [required]limit
- the number of lines to return [default: value fromsystem.log.line.limit
system preference]All methods shall be available for
ADMIN
role only.