From 62890a93ed0e9376cf659d422aa72a5b3f2fa687 Mon Sep 17 00:00:00 2001 From: dayko Date: Tue, 17 Oct 2023 19:25:20 +0800 Subject: [PATCH] Algo: enable ReadyPodsOnly feature filtering for resource metrics query --- .../portrait/horizontal/predictive/main.py | 29 ++++++++++------- .../predictive/metrics/metric.proto | 2 ++ .../predictive/metrics/metric_pb2.py | 32 +++++++++---------- .../predictive/metrics/metric_pb2.pyi | 12 ++++--- 4 files changed, 44 insertions(+), 31 deletions(-) diff --git a/algorithm/kapacity/portrait/horizontal/predictive/main.py b/algorithm/kapacity/portrait/horizontal/predictive/main.py index 4ac86c1..cf1ee55 100644 --- a/algorithm/kapacity/portrait/horizontal/predictive/main.py +++ b/algorithm/kapacity/portrait/horizontal/predictive/main.py @@ -12,21 +12,25 @@ # See the License for the specific language governing permissions and # limitations under the License. + import argparse +import datetime import json import os -import datetime -import pandas as pd +import sys import grpc -from kubernetes import client, config, utils +import pandas as pd from google.protobuf import timestamp_pb2, duration_pb2 +from kubernetes import client, config, utils + +import metrics.metric_pb2 as metric_pb +import metrics.provider_pb2 as provider_pb +import metrics.provider_pb2_grpc as provider_pb_grpc +import replicas_estimator as estimator -import kapacity.portrait.horizontal.predictive.replicas_estimator as estimator -import kapacity.timeseries.forecasting.forecaster as forecaster -import kapacity.portrait.horizontal.predictive.metrics.metric_pb2 as metric_pb -import kapacity.portrait.horizontal.predictive.metrics.provider_pb2 as provider_pb -import kapacity.portrait.horizontal.predictive.metrics.provider_pb2_grpc as provider_pb_grpc +sys.path.append(os.path.split(os.path.abspath(__file__))[0].rsplit('/', 3)[0]) +from timeseries.forecasting import forecaster class EnvInfo: @@ -312,7 +316,8 @@ def fetch_resource_metric_history(args, namespace, metric, scale_target, start, workload_resource = metric_pb.WorkloadResourceQuery(group_kind=group_kind, namespace=namespace, name=name, - resource_name=resource_name) + resource_name=resource_name, + ready_pods_only=True) query = metric_pb.Query(type=metric_pb.WORKLOAD_RESOURCE, workload_resource=workload_resource) return query_metrics(args=args, query=query, start=start, end=end) @@ -327,7 +332,8 @@ def fetch_container_resource_metric_history(args, namespace, metric, scale_targe namespace=namespace, name=name, resource_name=resource_name, - container_name=container_name) + container_name=container_name, + ready_pods_only=True) query = metric_pb.Query(type=metric_pb.WORKLOAD_CONTAINER_RESOURCE, workload_container_resource=workload_container_resource) return query_metrics(args=args, query=query, start=start, end=end) @@ -440,7 +446,8 @@ def write_pred_replicas_to_config_map(args, env, hp_cr, pred_replicas): last_timestamp = pred_replicas.iloc[len(pred_replicas) - 1, 0] content = pred_replicas.set_index('timestamp', drop=True).to_dict()['pred_replicas'] expire_time = parse_timestamp_to_rfc3339( - datetime.datetime.utcfromtimestamp(last_timestamp) + datetime.timedelta(minutes=time_period_to_minutes(args.scaling_freq))) + datetime.datetime.utcfromtimestamp(last_timestamp) + datetime.timedelta( + minutes=time_period_to_minutes(args.scaling_freq))) cmap_namespace = env.namespace cmap_name = env.hp_name + '-result' diff --git a/algorithm/kapacity/portrait/horizontal/predictive/metrics/metric.proto b/algorithm/kapacity/portrait/horizontal/predictive/metrics/metric.proto index 1b08d04..77efcff 100644 --- a/algorithm/kapacity/portrait/horizontal/predictive/metrics/metric.proto +++ b/algorithm/kapacity/portrait/horizontal/predictive/metrics/metric.proto @@ -84,6 +84,7 @@ message WorkloadResourceQuery { string namespace = 2; string name = 3; string resource_name = 4; + bool ready_pods_only = 5; } message WorkloadContainerResourceQuery { @@ -92,6 +93,7 @@ message WorkloadContainerResourceQuery { string name = 3; string resource_name = 4; string container_name = 5; + bool ready_pods_only = 6; } message ObjectQuery { diff --git a/algorithm/kapacity/portrait/horizontal/predictive/metrics/metric_pb2.py b/algorithm/kapacity/portrait/horizontal/predictive/metrics/metric_pb2.py index 689689f..2e39d1c 100644 --- a/algorithm/kapacity/portrait/horizontal/predictive/metrics/metric_pb2.py +++ b/algorithm/kapacity/portrait/horizontal/predictive/metrics/metric_pb2.py @@ -14,7 +14,7 @@ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cmetric.proto\x12\x17io.kapacitystack.metric\x1a\x1egoogle/protobuf/duration.proto\"\xdf\x01\n\x06Series\x12.\n\x06points\x18\x01 \x03(\x0b\x32\x1e.io.kapacitystack.metric.Point\x12;\n\x06labels\x18\x02 \x03(\x0b\x32+.io.kapacitystack.metric.Series.LabelsEntry\x12.\n\x06window\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07_window\"\xde\x01\n\x06Sample\x12-\n\x05point\x18\x01 \x01(\x0b\x32\x1e.io.kapacitystack.metric.Point\x12;\n\x06labels\x18\x02 \x03(\x0b\x32+.io.kapacitystack.metric.Sample.LabelsEntry\x12.\n\x06window\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07_window\")\n\x05Point\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x01\"\xc2\x04\n\x05Query\x12\x30\n\x04type\x18\x01 \x01(\x0e\x32\".io.kapacitystack.metric.QueryType\x12\x41\n\x0cpod_resource\x18\x02 \x01(\x0b\x32).io.kapacitystack.metric.PodResourceQueryH\x00\x12M\n\x12\x63ontainer_resource\x18\x03 \x01(\x0b\x32/.io.kapacitystack.metric.ContainerResourceQueryH\x00\x12K\n\x11workload_resource\x18\x04 \x01(\x0b\x32..io.kapacitystack.metric.WorkloadResourceQueryH\x00\x12^\n\x1bworkload_container_resource\x18\x05 \x01(\x0b\x32\x37.io.kapacitystack.metric.WorkloadContainerResourceQueryH\x00\x12\x36\n\x06object\x18\x06 \x01(\x0b\x32$.io.kapacitystack.metric.ObjectQueryH\x00\x12:\n\x08\x65xternal\x18\x07 \x01(\x0b\x32&.io.kapacitystack.metric.ExternalQueryH\x00\x12K\n\x11workload_external\x18\x08 \x01(\x0b\x32..io.kapacitystack.metric.WorkloadExternalQueryH\x00\x42\x07\n\x05query\"r\n\x10PodResourceQuery\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0e\n\x04name\x18\x02 \x01(\tH\x00\x12\x12\n\x08selector\x18\x03 \x01(\tH\x00\x12\x15\n\rresource_name\x18\x04 \x01(\tB\x10\n\x0epod_identifier\"\x90\x01\n\x16\x43ontainerResourceQuery\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0e\n\x04name\x18\x02 \x01(\tH\x00\x12\x12\n\x08selector\x18\x03 \x01(\tH\x00\x12\x15\n\rresource_name\x18\x04 \x01(\t\x12\x16\n\x0e\x63ontainer_name\x18\x05 \x01(\tB\x10\n\x0epod_identifier\"\x87\x01\n\x15WorkloadResourceQuery\x12\x36\n\ngroup_kind\x18\x01 \x01(\x0b\x32\".io.kapacitystack.metric.GroupKind\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x15\n\rresource_name\x18\x04 \x01(\t\"\xa8\x01\n\x1eWorkloadContainerResourceQuery\x12\x36\n\ngroup_kind\x18\x01 \x01(\x0b\x32\".io.kapacitystack.metric.GroupKind\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x15\n\rresource_name\x18\x04 \x01(\t\x12\x16\n\x0e\x63ontainer_name\x18\x05 \x01(\t\"\xdf\x01\n\x0bObjectQuery\x12\x36\n\ngroup_kind\x18\x01 \x01(\x0b\x32\".io.kapacitystack.metric.GroupKind\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x04name\x18\x03 \x01(\tH\x00\x12\x12\n\x08selector\x18\x04 \x01(\tH\x00\x12\x39\n\x06metric\x18\x05 \x01(\x0b\x32).io.kapacitystack.metric.MetricIdentifierB\x13\n\x11object_identifierB\x0c\n\n_namespace\"p\n\rExternalQuery\x12\x16\n\tnamespace\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x39\n\x06metric\x18\x02 \x01(\x0b\x32).io.kapacitystack.metric.MetricIdentifierB\x0c\n\n_namespace\"\xab\x01\n\x15WorkloadExternalQuery\x12\x36\n\ngroup_kind\x18\x01 \x01(\x0b\x32\".io.kapacitystack.metric.GroupKind\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x39\n\x06metric\x18\x04 \x01(\x0b\x32).io.kapacitystack.metric.MetricIdentifier\"(\n\tGroupKind\x12\r\n\x05group\x18\x01 \x01(\t\x12\x0c\n\x04kind\x18\x02 \x01(\t\"D\n\x10MetricIdentifier\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\x08selector\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_selector*\x9e\x01\n\tQueryType\x12\x10\n\x0cPOD_RESOURCE\x10\x00\x12\x16\n\x12\x43ONTAINER_RESOURCE\x10\x01\x12\x15\n\x11WORKLOAD_RESOURCE\x10\x02\x12\x1f\n\x1bWORKLOAD_CONTAINER_RESOURCE\x10\x03\x12\n\n\x06OBJECT\x10\x04\x12\x0c\n\x08\x45XTERNAL\x10\x05\x12\x15\n\x11WORKLOAD_EXTERNAL\x10\x06\x42\x38Z6github.com/traas-stack/kapacity/pkg/metric/service/apib\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cmetric.proto\x12\x17io.kapacitystack.metric\x1a\x1egoogle/protobuf/duration.proto\"\xdf\x01\n\x06Series\x12.\n\x06points\x18\x01 \x03(\x0b\x32\x1e.io.kapacitystack.metric.Point\x12;\n\x06labels\x18\x02 \x03(\x0b\x32+.io.kapacitystack.metric.Series.LabelsEntry\x12.\n\x06window\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07_window\"\xde\x01\n\x06Sample\x12-\n\x05point\x18\x01 \x01(\x0b\x32\x1e.io.kapacitystack.metric.Point\x12;\n\x06labels\x18\x02 \x03(\x0b\x32+.io.kapacitystack.metric.Sample.LabelsEntry\x12.\n\x06window\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07_window\")\n\x05Point\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x01\"\xc2\x04\n\x05Query\x12\x30\n\x04type\x18\x01 \x01(\x0e\x32\".io.kapacitystack.metric.QueryType\x12\x41\n\x0cpod_resource\x18\x02 \x01(\x0b\x32).io.kapacitystack.metric.PodResourceQueryH\x00\x12M\n\x12\x63ontainer_resource\x18\x03 \x01(\x0b\x32/.io.kapacitystack.metric.ContainerResourceQueryH\x00\x12K\n\x11workload_resource\x18\x04 \x01(\x0b\x32..io.kapacitystack.metric.WorkloadResourceQueryH\x00\x12^\n\x1bworkload_container_resource\x18\x05 \x01(\x0b\x32\x37.io.kapacitystack.metric.WorkloadContainerResourceQueryH\x00\x12\x36\n\x06object\x18\x06 \x01(\x0b\x32$.io.kapacitystack.metric.ObjectQueryH\x00\x12:\n\x08\x65xternal\x18\x07 \x01(\x0b\x32&.io.kapacitystack.metric.ExternalQueryH\x00\x12K\n\x11workload_external\x18\x08 \x01(\x0b\x32..io.kapacitystack.metric.WorkloadExternalQueryH\x00\x42\x07\n\x05query\"r\n\x10PodResourceQuery\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0e\n\x04name\x18\x02 \x01(\tH\x00\x12\x12\n\x08selector\x18\x03 \x01(\tH\x00\x12\x15\n\rresource_name\x18\x04 \x01(\tB\x10\n\x0epod_identifier\"\x90\x01\n\x16\x43ontainerResourceQuery\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0e\n\x04name\x18\x02 \x01(\tH\x00\x12\x12\n\x08selector\x18\x03 \x01(\tH\x00\x12\x15\n\rresource_name\x18\x04 \x01(\t\x12\x16\n\x0e\x63ontainer_name\x18\x05 \x01(\tB\x10\n\x0epod_identifier\"\xa0\x01\n\x15WorkloadResourceQuery\x12\x36\n\ngroup_kind\x18\x01 \x01(\x0b\x32\".io.kapacitystack.metric.GroupKind\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x15\n\rresource_name\x18\x04 \x01(\t\x12\x17\n\x0fready_pods_only\x18\x05 \x01(\x08\"\xc1\x01\n\x1eWorkloadContainerResourceQuery\x12\x36\n\ngroup_kind\x18\x01 \x01(\x0b\x32\".io.kapacitystack.metric.GroupKind\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x15\n\rresource_name\x18\x04 \x01(\t\x12\x16\n\x0e\x63ontainer_name\x18\x05 \x01(\t\x12\x17\n\x0fready_pods_only\x18\x06 \x01(\x08\"\xdf\x01\n\x0bObjectQuery\x12\x36\n\ngroup_kind\x18\x01 \x01(\x0b\x32\".io.kapacitystack.metric.GroupKind\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x04name\x18\x03 \x01(\tH\x00\x12\x12\n\x08selector\x18\x04 \x01(\tH\x00\x12\x39\n\x06metric\x18\x05 \x01(\x0b\x32).io.kapacitystack.metric.MetricIdentifierB\x13\n\x11object_identifierB\x0c\n\n_namespace\"p\n\rExternalQuery\x12\x16\n\tnamespace\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x39\n\x06metric\x18\x02 \x01(\x0b\x32).io.kapacitystack.metric.MetricIdentifierB\x0c\n\n_namespace\"\xab\x01\n\x15WorkloadExternalQuery\x12\x36\n\ngroup_kind\x18\x01 \x01(\x0b\x32\".io.kapacitystack.metric.GroupKind\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x39\n\x06metric\x18\x04 \x01(\x0b\x32).io.kapacitystack.metric.MetricIdentifier\"(\n\tGroupKind\x12\r\n\x05group\x18\x01 \x01(\t\x12\x0c\n\x04kind\x18\x02 \x01(\t\"D\n\x10MetricIdentifier\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\x08selector\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_selector*\x9e\x01\n\tQueryType\x12\x10\n\x0cPOD_RESOURCE\x10\x00\x12\x16\n\x12\x43ONTAINER_RESOURCE\x10\x01\x12\x15\n\x11WORKLOAD_RESOURCE\x10\x02\x12\x1f\n\x1bWORKLOAD_CONTAINER_RESOURCE\x10\x03\x12\n\n\x06OBJECT\x10\x04\x12\x0c\n\x08\x45XTERNAL\x10\x05\x12\x15\n\x11WORKLOAD_EXTERNAL\x10\x06\x42\x38Z6github.com/traas-stack/kapacity/pkg/metric/service/apib\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -27,8 +27,8 @@ _SERIES_LABELSENTRY._serialized_options = b'8\001' _SAMPLE_LABELSENTRY._options = None _SAMPLE_LABELSENTRY._serialized_options = b'8\001' - _globals['_QUERYTYPE']._serialized_start=2347 - _globals['_QUERYTYPE']._serialized_end=2505 + _globals['_QUERYTYPE']._serialized_start=2397 + _globals['_QUERYTYPE']._serialized_end=2555 _globals['_SERIES']._serialized_start=74 _globals['_SERIES']._serialized_end=297 _globals['_SERIES_LABELSENTRY']._serialized_start=241 @@ -46,17 +46,17 @@ _globals['_CONTAINERRESOURCEQUERY']._serialized_start=1265 _globals['_CONTAINERRESOURCEQUERY']._serialized_end=1409 _globals['_WORKLOADRESOURCEQUERY']._serialized_start=1412 - _globals['_WORKLOADRESOURCEQUERY']._serialized_end=1547 - _globals['_WORKLOADCONTAINERRESOURCEQUERY']._serialized_start=1550 - _globals['_WORKLOADCONTAINERRESOURCEQUERY']._serialized_end=1718 - _globals['_OBJECTQUERY']._serialized_start=1721 - _globals['_OBJECTQUERY']._serialized_end=1944 - _globals['_EXTERNALQUERY']._serialized_start=1946 - _globals['_EXTERNALQUERY']._serialized_end=2058 - _globals['_WORKLOADEXTERNALQUERY']._serialized_start=2061 - _globals['_WORKLOADEXTERNALQUERY']._serialized_end=2232 - _globals['_GROUPKIND']._serialized_start=2234 - _globals['_GROUPKIND']._serialized_end=2274 - _globals['_METRICIDENTIFIER']._serialized_start=2276 - _globals['_METRICIDENTIFIER']._serialized_end=2344 + _globals['_WORKLOADRESOURCEQUERY']._serialized_end=1572 + _globals['_WORKLOADCONTAINERRESOURCEQUERY']._serialized_start=1575 + _globals['_WORKLOADCONTAINERRESOURCEQUERY']._serialized_end=1768 + _globals['_OBJECTQUERY']._serialized_start=1771 + _globals['_OBJECTQUERY']._serialized_end=1994 + _globals['_EXTERNALQUERY']._serialized_start=1996 + _globals['_EXTERNALQUERY']._serialized_end=2108 + _globals['_WORKLOADEXTERNALQUERY']._serialized_start=2111 + _globals['_WORKLOADEXTERNALQUERY']._serialized_end=2282 + _globals['_GROUPKIND']._serialized_start=2284 + _globals['_GROUPKIND']._serialized_end=2324 + _globals['_METRICIDENTIFIER']._serialized_start=2326 + _globals['_METRICIDENTIFIER']._serialized_end=2394 # @@protoc_insertion_point(module_scope) diff --git a/algorithm/kapacity/portrait/horizontal/predictive/metrics/metric_pb2.pyi b/algorithm/kapacity/portrait/horizontal/predictive/metrics/metric_pb2.pyi index 55ddc9e..3c380e4 100644 --- a/algorithm/kapacity/portrait/horizontal/predictive/metrics/metric_pb2.pyi +++ b/algorithm/kapacity/portrait/horizontal/predictive/metrics/metric_pb2.pyi @@ -113,30 +113,34 @@ class ContainerResourceQuery(_message.Message): def __init__(self, namespace: _Optional[str] = ..., name: _Optional[str] = ..., selector: _Optional[str] = ..., resource_name: _Optional[str] = ..., container_name: _Optional[str] = ...) -> None: ... class WorkloadResourceQuery(_message.Message): - __slots__ = ["group_kind", "namespace", "name", "resource_name"] + __slots__ = ["group_kind", "namespace", "name", "resource_name", "ready_pods_only"] GROUP_KIND_FIELD_NUMBER: _ClassVar[int] NAMESPACE_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] RESOURCE_NAME_FIELD_NUMBER: _ClassVar[int] + READY_PODS_ONLY_FIELD_NUMBER: _ClassVar[int] group_kind: GroupKind namespace: str name: str resource_name: str - def __init__(self, group_kind: _Optional[_Union[GroupKind, _Mapping]] = ..., namespace: _Optional[str] = ..., name: _Optional[str] = ..., resource_name: _Optional[str] = ...) -> None: ... + ready_pods_only: bool + def __init__(self, group_kind: _Optional[_Union[GroupKind, _Mapping]] = ..., namespace: _Optional[str] = ..., name: _Optional[str] = ..., resource_name: _Optional[str] = ..., ready_pods_only: bool = ...) -> None: ... class WorkloadContainerResourceQuery(_message.Message): - __slots__ = ["group_kind", "namespace", "name", "resource_name", "container_name"] + __slots__ = ["group_kind", "namespace", "name", "resource_name", "container_name", "ready_pods_only"] GROUP_KIND_FIELD_NUMBER: _ClassVar[int] NAMESPACE_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] RESOURCE_NAME_FIELD_NUMBER: _ClassVar[int] CONTAINER_NAME_FIELD_NUMBER: _ClassVar[int] + READY_PODS_ONLY_FIELD_NUMBER: _ClassVar[int] group_kind: GroupKind namespace: str name: str resource_name: str container_name: str - def __init__(self, group_kind: _Optional[_Union[GroupKind, _Mapping]] = ..., namespace: _Optional[str] = ..., name: _Optional[str] = ..., resource_name: _Optional[str] = ..., container_name: _Optional[str] = ...) -> None: ... + ready_pods_only: bool + def __init__(self, group_kind: _Optional[_Union[GroupKind, _Mapping]] = ..., namespace: _Optional[str] = ..., name: _Optional[str] = ..., resource_name: _Optional[str] = ..., container_name: _Optional[str] = ..., ready_pods_only: bool = ...) -> None: ... class ObjectQuery(_message.Message): __slots__ = ["group_kind", "namespace", "name", "selector", "metric"]