From 9fa0590ac42f7306cf8e9e3a791669014de95105 Mon Sep 17 00:00:00 2001 From: Alexandre Lamarre Date: Fri, 6 Jan 2023 00:31:58 +0000 Subject: [PATCH 1/2] refactor grpc signature, cli for CRUD --- pkg/alerting/shared/shared.go | 2 + pkg/opni/commands/admin.go | 103 +++ pkg/test/util.go | 3 +- .../pkg/alerting/condition_handlers.go | 27 +- .../pkg/apis/cortexadmin/cortexadmin.pb.go | 824 ++++++++++-------- .../pkg/apis/cortexadmin/cortexadmin.pb.gw.go | 40 +- .../pkg/apis/cortexadmin/cortexadmin.proto | 36 +- .../apis/cortexadmin/cortexadmin_grpc.pb.go | 36 +- .../pkg/apis/cortexadmin/extensions.go | 33 +- plugins/metrics/pkg/cortex/admin.go | 27 +- plugins/metrics/pkg/cortex/remotewrite.go | 8 +- plugins/slo/pkg/slo/cortex_info.go | 8 +- plugins/slo/pkg/slo/slo_test.go | 15 +- test/e2e/monitoring_test.go | 5 +- test/plugins/cortexadmin/cortexadmin_test.go | 42 +- test/plugins/slo/test_helpers_test.go | 11 +- 16 files changed, 758 insertions(+), 462 deletions(-) diff --git a/pkg/alerting/shared/shared.go b/pkg/alerting/shared/shared.go index 72721578d9..dece26e781 100644 --- a/pkg/alerting/shared/shared.go +++ b/pkg/alerting/shared/shared.go @@ -15,6 +15,8 @@ import ( "google.golang.org/grpc/status" ) +const OpniAlertingCortexNamespace = "opni-alerting" + // Condition constants var ComparisonOperators = []string{"<", ">", "<=", ">=", "=", "!="} var KubeStates = []string{"Pending", "Running", "Succeeded", "Failed", "Unknown"} diff --git a/pkg/opni/commands/admin.go b/pkg/opni/commands/admin.go index dcbbb036ad..bfc1f0629a 100644 --- a/pkg/opni/commands/admin.go +++ b/pkg/opni/commands/admin.go @@ -5,13 +5,18 @@ package commands import ( "encoding/json" "fmt" + "os" + "sync" "time" "github.com/araddon/dateparse" "github.com/samber/lo" + "golang.org/x/exp/slices" + "gopkg.in/yaml.v3" "github.com/olebedev/when" "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/model/rulefmt" corev1 "github.com/rancher/opni/pkg/apis/core/v1" managementv1 "github.com/rancher/opni/pkg/apis/management/v1" "github.com/rancher/opni/pkg/metrics/unmarshal" @@ -62,6 +67,104 @@ func BuildCortexAdminRulesCmd() *cobra.Command { Short: "Cortex admin rules", } cmd.AddCommand(BuildListRulesCmd()) + cmd.AddCommand(BuildDeleteRuleGroupsCmd()) + cmd.AddCommand(BuildLoadRuleGroupsCmd()) + return cmd +} + +func BuildDeleteRuleGroupsCmd() *cobra.Command { + var clusters string + var namespace string + + cmd := &cobra.Command{ + Use: "delete ", + Short: "Delete prometheus rule groups of the given name from Cortex", + Args: cobra.ExactArgs(1), + Run: func(cmd *cobra.Command, args []string) { + _, err := adminClient.DeleteRule(cmd.Context(), &cortexadmin.DeleteRuleRequest{ + ClusterId: clusters, + Namespace: namespace, + GroupName: args[0], + }) + if err != nil { + lg.Error(err) + return + } + fmt.Println("Rule Group deleted successfully") + }, + } + cmd.Flags().StringVarP(&clusters, "cluster", "c", "", "The clusters to delete the rule from") + cmd.Flags().StringVarP(&namespace, "namespace", "n", "", "The namespace to delete the rule from") + return cmd +} + +func BuildLoadRuleGroupsCmd() *cobra.Command { + var clusters []string + var namespace string + cmd := &cobra.Command{ + Use: "load ", + Short: "Creates/Updates prometheus rule groups into Cortex from a valid prometheus rule group file", + Long: "See https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules for more information about the expected input format", + Args: cobra.ExactArgs(1), + Run: func(cmd *cobra.Command, args []string) { + //read file and validate contents + + clMeta, err := mgmtClient.ListClusters(cmd.Context(), &managementv1.ListClustersRequest{}) + if err != nil { + lg.Fatal(err) + } + cl := lo.Map(clMeta.Items, func(cl *corev1.Cluster, _ int) string { + return cl.Id + }) + if len(clusters) == 0 { + clusters = cl + } else { + // Important to validate here !! Since cortex has no knowledge of available opni clusters, + // it will accept any valid yaml content and therefore could silently fail/ destroy itself + // by writing unsuported names to its (remote) store + for _, c := range clusters { + if !slices.Contains(cl, c) { + lg.Fatalf("invalid cluster id %s", c) + } + } + } + yamlContent, err := os.ReadFile(args[0]) + if err != nil { + lg.Fatal(err) + } + rgs, errors := rulefmt.Parse(yamlContent) + if len(errors) > 0 { + for _, err := range errors { + lg.Error(err) + } + lg.Fatal("Failed to parse rule group file") + } + + var wg sync.WaitGroup + for _, cl := range clusters { + cl := cl + wg.Add(1) + go func() { + defer wg.Done() + for _, group := range rgs.Groups { + _, err := adminClient.LoadRules(cmd.Context(), &cortexadmin.LoadRuleRequest{ + Namespace: namespace, + ClusterId: cl, + YamlContent: util.Must(yaml.Marshal(group)), + }) + if err != nil { + lg.Errorf("Failed to load rule group :\n `%s`\n\n for cluster `%s`", string(util.Must(yaml.Marshal(group))), cl) + } else { + fmt.Printf("Successfully loaded rule group `%s` for clusterId `%s`\n", group.Name, cl) + } + } + }() + } + wg.Wait() + }, + } + cmd.Flags().StringSliceVar(&clusters, "cluster", []string{}, "The clusters to apply the rule to (default=all)") + cmd.Flags().StringVar(&namespace, "namespace", "", "namespace is a cortex identifier to help organize rules (default=\"default\")") return cmd } diff --git a/pkg/test/util.go b/pkg/test/util.go index dd1d09692e..20102cd9be 100644 --- a/pkg/test/util.go +++ b/pkg/test/util.go @@ -72,8 +72,9 @@ func ExpectRuleGroupToExist( maxTimeout time.Duration, ) { Eventually(func() error { - _, err := client.GetRule(ctx, &cortexadmin.RuleRequest{ + _, err := client.GetRule(ctx, &cortexadmin.GetRuleRequest{ ClusterId: tenant, + Namespace: "test", GroupName: groupName, }) if err != nil { diff --git a/plugins/alerting/pkg/alerting/condition_handlers.go b/plugins/alerting/pkg/alerting/condition_handlers.go index bd28729bc0..0fd0fb1a17 100644 --- a/plugins/alerting/pkg/alerting/condition_handlers.go +++ b/plugins/alerting/pkg/alerting/condition_handlers.go @@ -107,8 +107,9 @@ func deleteCondition(p *Plugin, lg *zap.SugaredLogger, ctx context.Context, req return nil } if r, _ := handleSwitchCortexRules(req.AlertType); r != nil { - _, err := p.adminClient.Get().DeleteRule(ctx, &cortexadmin.RuleRequest{ + _, err := p.adminClient.Get().DeleteRule(ctx, &cortexadmin.DeleteRuleRequest{ ClusterId: r.Id, + Namespace: shared.OpniAlertingCortexNamespace, GroupName: CortexRuleIdFromUuid(id), }) return err @@ -197,9 +198,10 @@ func (p *Plugin) handleKubeAlertCreation(ctx context.Context, k *alertingv1.Aler return err } p.Logger.With("Expr", "kube-state").Debugf("%s", string(out)) - _, err = p.adminClient.Get().LoadRules(ctx, &cortexadmin.PostRuleRequest{ + _, err = p.adminClient.Get().LoadRules(ctx, &cortexadmin.LoadRuleRequest{ ClusterId: k.GetClusterId(), - YamlContent: string(out), + Namespace: shared.OpniAlertingCortexNamespace, + YamlContent: out, }) if err != nil { return err @@ -234,9 +236,10 @@ func (p *Plugin) handleCpuSaturationAlertCreation( } p.Logger.With("Expr", "cpu").Debugf("%s", string(out)) - _, err = p.adminClient.Get().LoadRules(ctx, &cortexadmin.PostRuleRequest{ + _, err = p.adminClient.Get().LoadRules(ctx, &cortexadmin.LoadRuleRequest{ ClusterId: c.ClusterId.GetId(), - YamlContent: string(out), + Namespace: shared.OpniAlertingCortexNamespace, + YamlContent: out, }) return err } @@ -263,9 +266,10 @@ func (p *Plugin) handleMemorySaturationAlertCreation(ctx context.Context, m *ale return err } p.Logger.With("Expr", "mem").Debugf("%s", string(out)) - _, err = p.adminClient.Get().LoadRules(ctx, &cortexadmin.PostRuleRequest{ + _, err = p.adminClient.Get().LoadRules(ctx, &cortexadmin.LoadRuleRequest{ ClusterId: m.ClusterId.GetId(), - YamlContent: string(out), + Namespace: shared.OpniAlertingCortexNamespace, + YamlContent: out, }) return err } @@ -291,9 +295,10 @@ func (p *Plugin) handleFsSaturationAlertCreation(ctx context.Context, fs *alerti return err } p.Logger.With("Expr", "fs").Debugf("%s", string(out)) - _, err = p.adminClient.Get().LoadRules(ctx, &cortexadmin.PostRuleRequest{ + _, err = p.adminClient.Get().LoadRules(ctx, &cortexadmin.LoadRuleRequest{ ClusterId: fs.ClusterId.GetId(), - YamlContent: string(out), + Namespace: shared.OpniAlertingCortexNamespace, + YamlContent: out, }) return err } @@ -317,9 +322,9 @@ func (p *Plugin) handlePrometheusQueryAlertCreation(ctx context.Context, q *aler return err } p.Logger.With("Expr", "user-query").Debugf("%s", string(out)) - _, err = p.adminClient.Get().LoadRules(ctx, &cortexadmin.PostRuleRequest{ + _, err = p.adminClient.Get().LoadRules(ctx, &cortexadmin.LoadRuleRequest{ ClusterId: q.ClusterId.GetId(), - YamlContent: string(out), + YamlContent: out, }) return err diff --git a/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.pb.go b/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.pb.go index 6b836a5014..8a8c377888 100644 --- a/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.pb.go +++ b/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.pb.go @@ -1243,17 +1243,16 @@ func (x *QueryRangeRequest) GetStep() *durationpb.Duration { return nil } -type RuleRequest struct { +type QueryResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ClusterId string `protobuf:"bytes,1,opt,name=clusterId,proto3" json:"clusterId,omitempty"` - GroupName string `protobuf:"bytes,2,opt,name=groupName,proto3" json:"groupName,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` } -func (x *RuleRequest) Reset() { - *x = RuleRequest{} +func (x *QueryResponse) Reset() { + *x = QueryResponse{} if protoimpl.UnsafeEnabled { mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1261,13 +1260,13 @@ func (x *RuleRequest) Reset() { } } -func (x *RuleRequest) String() string { +func (x *QueryResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RuleRequest) ProtoMessage() {} +func (*QueryResponse) ProtoMessage() {} -func (x *RuleRequest) ProtoReflect() protoreflect.Message { +func (x *QueryResponse) ProtoReflect() protoreflect.Message { mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1279,36 +1278,28 @@ func (x *RuleRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RuleRequest.ProtoReflect.Descriptor instead. -func (*RuleRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead. +func (*QueryResponse) Descriptor() ([]byte, []int) { return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{20} } -func (x *RuleRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *RuleRequest) GetGroupName() string { +func (x *QueryResponse) GetData() []byte { if x != nil { - return x.GroupName + return x.Data } - return "" + return nil } -type PostRuleRequest struct { +type ConfigRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ClusterId string `protobuf:"bytes,1,opt,name=clusterId,proto3" json:"clusterId,omitempty"` - YamlContent string `protobuf:"bytes,2,opt,name=yamlContent,proto3" json:"yamlContent,omitempty"` + ConfigModes []string `protobuf:"bytes,1,rep,name=configModes,proto3" json:"configModes,omitempty"` } -func (x *PostRuleRequest) Reset() { - *x = PostRuleRequest{} +func (x *ConfigRequest) Reset() { + *x = ConfigRequest{} if protoimpl.UnsafeEnabled { mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1316,13 +1307,13 @@ func (x *PostRuleRequest) Reset() { } } -func (x *PostRuleRequest) String() string { +func (x *ConfigRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PostRuleRequest) ProtoMessage() {} +func (*ConfigRequest) ProtoMessage() {} -func (x *PostRuleRequest) ProtoReflect() protoreflect.Message { +func (x *ConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1334,35 +1325,28 @@ func (x *PostRuleRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PostRuleRequest.ProtoReflect.Descriptor instead. -func (*PostRuleRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ConfigRequest.ProtoReflect.Descriptor instead. +func (*ConfigRequest) Descriptor() ([]byte, []int) { return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{21} } -func (x *PostRuleRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *PostRuleRequest) GetYamlContent() string { +func (x *ConfigRequest) GetConfigModes() []string { if x != nil { - return x.YamlContent + return x.ConfigModes } - return "" + return nil } -type QueryResponse struct { +type ConfigResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + ConfigYaml []string `protobuf:"bytes,4,rep,name=configYaml,proto3" json:"configYaml,omitempty"` } -func (x *QueryResponse) Reset() { - *x = QueryResponse{} +func (x *ConfigResponse) Reset() { + *x = ConfigResponse{} if protoimpl.UnsafeEnabled { mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1370,13 +1354,13 @@ func (x *QueryResponse) Reset() { } } -func (x *QueryResponse) String() string { +func (x *ConfigResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryResponse) ProtoMessage() {} +func (*ConfigResponse) ProtoMessage() {} -func (x *QueryResponse) ProtoReflect() protoreflect.Message { +func (x *ConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1388,28 +1372,30 @@ func (x *QueryResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead. -func (*QueryResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ConfigResponse.ProtoReflect.Descriptor instead. +func (*ConfigResponse) Descriptor() ([]byte, []int) { return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{22} } -func (x *QueryResponse) GetData() []byte { +func (x *ConfigResponse) GetConfigYaml() []string { if x != nil { - return x.Data + return x.ConfigYaml } return nil } -type ConfigRequest struct { +type LoadRuleRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ConfigModes []string `protobuf:"bytes,1,rep,name=configModes,proto3" json:"configModes,omitempty"` + ClusterId string `protobuf:"bytes,1,opt,name=clusterId,proto3" json:"clusterId,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` // defaults to "default" + YamlContent []byte `protobuf:"bytes,3,opt,name=yamlContent,proto3" json:"yamlContent,omitempty"` } -func (x *ConfigRequest) Reset() { - *x = ConfigRequest{} +func (x *LoadRuleRequest) Reset() { + *x = LoadRuleRequest{} if protoimpl.UnsafeEnabled { mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1417,13 +1403,13 @@ func (x *ConfigRequest) Reset() { } } -func (x *ConfigRequest) String() string { +func (x *LoadRuleRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ConfigRequest) ProtoMessage() {} +func (*LoadRuleRequest) ProtoMessage() {} -func (x *ConfigRequest) ProtoReflect() protoreflect.Message { +func (x *LoadRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1435,28 +1421,44 @@ func (x *ConfigRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ConfigRequest.ProtoReflect.Descriptor instead. -func (*ConfigRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use LoadRuleRequest.ProtoReflect.Descriptor instead. +func (*LoadRuleRequest) Descriptor() ([]byte, []int) { return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{23} } -func (x *ConfigRequest) GetConfigModes() []string { +func (x *LoadRuleRequest) GetClusterId() string { if x != nil { - return x.ConfigModes + return x.ClusterId + } + return "" +} + +func (x *LoadRuleRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *LoadRuleRequest) GetYamlContent() []byte { + if x != nil { + return x.YamlContent } return nil } -type ConfigResponse struct { +type DeleteRuleRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ConfigYaml []string `protobuf:"bytes,4,rep,name=configYaml,proto3" json:"configYaml,omitempty"` + ClusterId string `protobuf:"bytes,1,opt,name=clusterId,proto3" json:"clusterId,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + GroupName string `protobuf:"bytes,3,opt,name=groupName,proto3" json:"groupName,omitempty"` } -func (x *ConfigResponse) Reset() { - *x = ConfigResponse{} +func (x *DeleteRuleRequest) Reset() { + *x = DeleteRuleRequest{} if protoimpl.UnsafeEnabled { mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1464,13 +1466,13 @@ func (x *ConfigResponse) Reset() { } } -func (x *ConfigResponse) String() string { +func (x *DeleteRuleRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ConfigResponse) ProtoMessage() {} +func (*DeleteRuleRequest) ProtoMessage() {} -func (x *ConfigResponse) ProtoReflect() protoreflect.Message { +func (x *DeleteRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1482,16 +1484,93 @@ func (x *ConfigResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ConfigResponse.ProtoReflect.Descriptor instead. -func (*ConfigResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use DeleteRuleRequest.ProtoReflect.Descriptor instead. +func (*DeleteRuleRequest) Descriptor() ([]byte, []int) { return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{24} } -func (x *ConfigResponse) GetConfigYaml() []string { +func (x *DeleteRuleRequest) GetClusterId() string { if x != nil { - return x.ConfigYaml + return x.ClusterId } - return nil + return "" +} + +func (x *DeleteRuleRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *DeleteRuleRequest) GetGroupName() string { + if x != nil { + return x.GroupName + } + return "" +} + +type GetRuleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterId string `protobuf:"bytes,1,opt,name=clusterId,proto3" json:"clusterId,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + GroupName string `protobuf:"bytes,3,opt,name=groupName,proto3" json:"groupName,omitempty"` +} + +func (x *GetRuleRequest) Reset() { + *x = GetRuleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRuleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRuleRequest) ProtoMessage() {} + +func (x *GetRuleRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRuleRequest.ProtoReflect.Descriptor instead. +func (*GetRuleRequest) Descriptor() ([]byte, []int) { + return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{25} +} + +func (x *GetRuleRequest) GetClusterId() string { + if x != nil { + return x.ClusterId + } + return "" +} + +func (x *GetRuleRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GetRuleRequest) GetGroupName() string { + if x != nil { + return x.GroupName + } + return "" } type ListRulesRequest struct { @@ -1512,7 +1591,7 @@ type ListRulesRequest struct { func (x *ListRulesRequest) Reset() { *x = ListRulesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[25] + mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1525,7 +1604,7 @@ func (x *ListRulesRequest) String() string { func (*ListRulesRequest) ProtoMessage() {} func (x *ListRulesRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[25] + mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1538,7 +1617,7 @@ func (x *ListRulesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRulesRequest.ProtoReflect.Descriptor instead. func (*ListRulesRequest) Descriptor() ([]byte, []int) { - return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{25} + return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{26} } func (x *ListRulesRequest) GetClusterId() []string { @@ -1611,7 +1690,7 @@ type ListRulesResponse struct { func (x *ListRulesResponse) Reset() { *x = ListRulesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[26] + mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1624,7 +1703,7 @@ func (x *ListRulesResponse) String() string { func (*ListRulesResponse) ProtoMessage() {} func (x *ListRulesResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[26] + mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1637,7 +1716,7 @@ func (x *ListRulesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRulesResponse.ProtoReflect.Descriptor instead. func (*ListRulesResponse) Descriptor() ([]byte, []int) { - return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{26} + return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{27} } func (x *ListRulesResponse) GetStatus() string { @@ -1665,7 +1744,7 @@ type RuleGroups struct { func (x *RuleGroups) Reset() { *x = RuleGroups{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[27] + mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1678,7 +1757,7 @@ func (x *RuleGroups) String() string { func (*RuleGroups) ProtoMessage() {} func (x *RuleGroups) ProtoReflect() protoreflect.Message { - mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[27] + mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1691,7 +1770,7 @@ func (x *RuleGroups) ProtoReflect() protoreflect.Message { // Deprecated: Use RuleGroups.ProtoReflect.Descriptor instead. func (*RuleGroups) Descriptor() ([]byte, []int) { - return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{27} + return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{28} } func (x *RuleGroups) GetGroups() []*RuleGroup { @@ -1720,7 +1799,7 @@ type RuleGroup struct { func (x *RuleGroup) Reset() { *x = RuleGroup{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[28] + mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1733,7 +1812,7 @@ func (x *RuleGroup) String() string { func (*RuleGroup) ProtoMessage() {} func (x *RuleGroup) ProtoReflect() protoreflect.Message { - mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[28] + mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1746,7 +1825,7 @@ func (x *RuleGroup) ProtoReflect() protoreflect.Message { // Deprecated: Use RuleGroup.ProtoReflect.Descriptor instead. func (*RuleGroup) Descriptor() ([]byte, []int) { - return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{28} + return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{29} } func (x *RuleGroup) GetName() string { @@ -1822,7 +1901,7 @@ type Rule struct { func (x *Rule) Reset() { *x = Rule{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[29] + mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1835,7 +1914,7 @@ func (x *Rule) String() string { func (*Rule) ProtoMessage() {} func (x *Rule) ProtoReflect() protoreflect.Message { - mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[29] + mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1848,7 +1927,7 @@ func (x *Rule) ProtoReflect() protoreflect.Message { // Deprecated: Use Rule.ProtoReflect.Descriptor instead. func (*Rule) Descriptor() ([]byte, []int) { - return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{29} + return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{30} } func (x *Rule) GetState() string { @@ -1951,7 +2030,7 @@ type Alert struct { func (x *Alert) Reset() { *x = Alert{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[30] + mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1964,7 +2043,7 @@ func (x *Alert) String() string { func (*Alert) ProtoMessage() {} func (x *Alert) ProtoReflect() protoreflect.Message { - mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[30] + mi := &file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1977,7 +2056,7 @@ func (x *Alert) ProtoReflect() protoreflect.Message { // Deprecated: Use Alert.ProtoReflect.Descriptor instead. func (*Alert) Descriptor() ([]byte, []int) { - return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{30} + return file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDescGZIP(), []int{31} } func (x *Alert) GetLabels() map[string]string { @@ -2163,214 +2242,226 @@ var file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmi 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x2d, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x22, 0x49, 0x0a, 0x0b, 0x52, - 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x51, 0x0a, 0x0f, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x75, - 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x79, 0x61, 0x6d, 0x6c, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x79, 0x61, - 0x6d, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x23, 0x0a, 0x0d, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x31, - 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x6f, 0x64, 0x65, - 0x73, 0x22, 0x30, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x59, 0x61, 0x6d, - 0x6c, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x59, - 0x61, 0x6d, 0x6c, 0x22, 0xcf, 0x02, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x75, 0x6c, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x75, 0x6c, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x75, 0x6c, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x72, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, - 0x12, 0x28, 0x0a, 0x0f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x67, - 0x65, 0x78, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x12, 0x25, 0x0a, 0x0b, 0x6c, 0x69, - 0x73, 0x74, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, - 0x00, 0x52, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x88, 0x01, - 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x41, 0x6c, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x49, - 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x22, 0x58, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, - 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, - 0x3c, 0x0a, 0x0a, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x2e, 0x0a, - 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, 0x6c, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0xe6, 0x01, - 0x0a, 0x09, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, - 0x69, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, - 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x26, 0x0a, 0x0e, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, - 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0e, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0xa0, 0x04, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, - 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x01, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x06, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, - 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x12, 0x44, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x12, 0x2a, 0x0a, 0x06, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, - 0x6c, 0x65, 0x72, 0x74, 0x52, 0x06, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, - 0x6c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x26, - 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x76, 0x61, 0x6c, - 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0e, - 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x39, - 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc9, 0x02, 0x0a, 0x05, 0x41, 0x6c, - 0x65, 0x72, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, - 0x6c, 0x65, 0x72, 0x74, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xbd, 0x0a, 0x0a, 0x0b, 0x43, 0x6f, 0x72, 0x74, 0x65, 0x78, - 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x5d, 0x0a, 0x0c, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, - 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x44, 0x53, 0x74, 0x61, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x17, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x61, 0x6c, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x73, 0x12, 0x60, 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x12, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x72, - 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x5b, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, - 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x63, 0x6f, 0x72, - 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x5a, 0x0b, - 0x3a, 0x01, 0x2a, 0x22, 0x06, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x06, 0x2f, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x12, 0x71, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x5a, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x0c, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x5b, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, - 0x65, 0x12, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x63, 0x6f, - 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, - 0x12, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, - 0x6d, 0x65, 0x7d, 0x12, 0x5a, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, - 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1e, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x0e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x08, 0x12, 0x06, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, - 0x51, 0x0a, 0x09, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x63, - 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, - 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x0e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x08, 0x22, 0x06, 0x2f, 0x72, 0x75, 0x6c, - 0x65, 0x73, 0x12, 0x5a, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, - 0x12, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, - 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x72, 0x75, 0x6c, - 0x65, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x54, - 0x0a, 0x0b, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x16, 0x2e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x22, 0x23, 0x0a, 0x0d, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x22, 0x31, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x6f, + 0x64, 0x65, 0x73, 0x22, 0x30, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x59, + 0x61, 0x6d, 0x6c, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x59, 0x61, 0x6d, 0x6c, 0x22, 0x6f, 0x0a, 0x0f, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x75, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x79, 0x61, 0x6d, 0x6c, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x79, 0x61, 0x6d, 0x6c, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x6d, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x6a, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, + 0x65, 0x22, 0xcf, 0x02, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x22, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x75, 0x6c, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x72, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x12, 0x28, + 0x0a, 0x0f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, + 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, + 0x6d, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x12, 0x25, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, + 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, + 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, + 0x23, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x6c, + 0x6c, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x41, 0x6c, 0x6c, 0x22, 0x58, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, 0x6c, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3c, 0x0a, + 0x0a, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x2e, 0x0a, 0x06, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, + 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x09, + 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, + 0x65, 0x12, 0x27, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, + 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x6c, 0x61, 0x73, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, + 0x0a, 0x0e, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0e, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x49, 0x64, 0x22, 0xa0, 0x04, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1a, 0x0a, + 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x72, 0x74, + 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x12, 0x44, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x2a, + 0x0a, 0x06, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x6c, 0x65, + 0x72, 0x74, 0x52, 0x06, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x61, + 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, + 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, + 0x6c, 0x61, 0x73, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0e, 0x65, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x39, 0x0a, 0x0b, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc9, 0x02, 0x0a, 0x05, 0x41, 0x6c, 0x65, 0x72, + 0x74, 0x12, 0x36, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x41, 0x6c, 0x65, 0x72, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x6c, 0x65, + 0x72, 0x74, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x32, 0xd2, 0x0a, 0x0a, 0x0b, 0x43, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x12, 0x5d, 0x0a, 0x0c, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, + 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x11, 0x12, 0x0f, 0x2f, 0x61, 0x6c, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x73, 0x12, 0x60, 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x12, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, + 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x72, 0x69, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x12, 0x5b, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x19, 0x2e, + 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, + 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x5a, 0x0b, 0x3a, 0x01, + 0x2a, 0x22, 0x06, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x06, 0x2f, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x71, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x1e, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x21, 0x5a, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x0c, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x12, 0x6a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x12, + 0x1b, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, + 0x74, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x63, + 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, + 0x12, 0x1e, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x7d, + 0x12, 0x5a, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x2e, + 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x63, + 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x08, 0x12, 0x06, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x51, 0x0a, 0x09, + 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x63, 0x6f, 0x72, 0x74, + 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x75, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x0e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x08, 0x22, 0x06, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, + 0x60, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1e, 0x2e, + 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x15, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x22, 0x0d, 0x2f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x65, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, - 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, - 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, - 0x74, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x73, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x62, 0x0a, 0x12, 0x47, - 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x53, 0x65, 0x74, - 0x73, 0x12, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x63, - 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, - 0x0e, 0x2f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, - 0x55, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e, 0x63, 0x6f, 0x72, - 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x72, - 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x74, - 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x60, 0x0a, 0x10, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x61, - 0x77, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x73, 0x65, 0x72, 0x69, 0x65, - 0x73, 0x2f, 0x72, 0x61, 0x77, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x6e, 0x69, - 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, + 0x7d, 0x12, 0x54, 0x0a, 0x0b, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x22, 0x0d, 0x2f, 0x66, 0x6c, 0x75, 0x73, 0x68, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x65, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x65, + 0x72, 0x69, 0x65, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1a, 0x2e, 0x63, 0x6f, + 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, + 0x4c, 0x69, 0x73, 0x74, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x73, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x62, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x53, 0x65, 0x74, 0x73, 0x12, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x12, 0x55, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e, + 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x72, 0x74, + 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, + 0x12, 0x07, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x2e, 0x63, + 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, + 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x60, 0x0a, 0x10, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x52, 0x61, 0x77, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x72, + 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x73, 0x65, + 0x72, 0x69, 0x65, 0x73, 0x2f, 0x72, 0x61, 0x77, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x6f, + 0x70, 0x6e, 0x69, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6f, 0x72, + 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2386,7 +2477,7 @@ func file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadm } var file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes = make([]protoimpl.MessageInfo, 35) +var file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes = make([]protoimpl.MessageInfo, 36) var file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_goTypes = []interface{}{ (MetricMetadata_MetricType)(0), // 0: cortexadmin.MetricMetadata.MetricType (*Cluster)(nil), // 1: cortexadmin.Cluster @@ -2409,25 +2500,26 @@ var file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmi (*MetricMetadata)(nil), // 18: cortexadmin.MetricMetadata (*QueryRequest)(nil), // 19: cortexadmin.QueryRequest (*QueryRangeRequest)(nil), // 20: cortexadmin.QueryRangeRequest - (*RuleRequest)(nil), // 21: cortexadmin.RuleRequest - (*PostRuleRequest)(nil), // 22: cortexadmin.PostRuleRequest - (*QueryResponse)(nil), // 23: cortexadmin.QueryResponse - (*ConfigRequest)(nil), // 24: cortexadmin.ConfigRequest - (*ConfigResponse)(nil), // 25: cortexadmin.ConfigResponse - (*ListRulesRequest)(nil), // 26: cortexadmin.ListRulesRequest - (*ListRulesResponse)(nil), // 27: cortexadmin.ListRulesResponse - (*RuleGroups)(nil), // 28: cortexadmin.RuleGroups - (*RuleGroup)(nil), // 29: cortexadmin.RuleGroup - (*Rule)(nil), // 30: cortexadmin.Rule - (*Alert)(nil), // 31: cortexadmin.Alert - nil, // 32: cortexadmin.Rule.LabelsEntry - nil, // 33: cortexadmin.Rule.AnnotationsEntry - nil, // 34: cortexadmin.Alert.LabelsEntry - nil, // 35: cortexadmin.Alert.AnnotationsEntry - (*timestamppb.Timestamp)(nil), // 36: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 37: google.protobuf.Duration - (*emptypb.Empty)(nil), // 38: google.protobuf.Empty - (*CortexStatus)(nil), // 39: cortexadmin.CortexStatus + (*QueryResponse)(nil), // 21: cortexadmin.QueryResponse + (*ConfigRequest)(nil), // 22: cortexadmin.ConfigRequest + (*ConfigResponse)(nil), // 23: cortexadmin.ConfigResponse + (*LoadRuleRequest)(nil), // 24: cortexadmin.LoadRuleRequest + (*DeleteRuleRequest)(nil), // 25: cortexadmin.DeleteRuleRequest + (*GetRuleRequest)(nil), // 26: cortexadmin.GetRuleRequest + (*ListRulesRequest)(nil), // 27: cortexadmin.ListRulesRequest + (*ListRulesResponse)(nil), // 28: cortexadmin.ListRulesResponse + (*RuleGroups)(nil), // 29: cortexadmin.RuleGroups + (*RuleGroup)(nil), // 30: cortexadmin.RuleGroup + (*Rule)(nil), // 31: cortexadmin.Rule + (*Alert)(nil), // 32: cortexadmin.Alert + nil, // 33: cortexadmin.Rule.LabelsEntry + nil, // 34: cortexadmin.Rule.AnnotationsEntry + nil, // 35: cortexadmin.Alert.LabelsEntry + nil, // 36: cortexadmin.Alert.AnnotationsEntry + (*timestamppb.Timestamp)(nil), // 37: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 38: google.protobuf.Duration + (*emptypb.Empty)(nil), // 39: google.protobuf.Empty + (*CortexStatus)(nil), // 40: cortexadmin.CortexStatus } var file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_depIdxs = []int32{ 6, // 0: cortexadmin.MetricLabels.items:type_name -> cortexadmin.LabelSet @@ -2441,45 +2533,45 @@ var file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmi 17, // 8: cortexadmin.TimeSeries.exemplars:type_name -> cortexadmin.Exemplar 15, // 9: cortexadmin.Exemplar.labels:type_name -> cortexadmin.Label 0, // 10: cortexadmin.MetricMetadata.type:type_name -> cortexadmin.MetricMetadata.MetricType - 36, // 11: cortexadmin.QueryRangeRequest.start:type_name -> google.protobuf.Timestamp - 36, // 12: cortexadmin.QueryRangeRequest.end:type_name -> google.protobuf.Timestamp - 37, // 13: cortexadmin.QueryRangeRequest.step:type_name -> google.protobuf.Duration - 28, // 14: cortexadmin.ListRulesResponse.data:type_name -> cortexadmin.RuleGroups - 29, // 15: cortexadmin.RuleGroups.groups:type_name -> cortexadmin.RuleGroup - 30, // 16: cortexadmin.RuleGroup.rules:type_name -> cortexadmin.Rule - 32, // 17: cortexadmin.Rule.labels:type_name -> cortexadmin.Rule.LabelsEntry - 33, // 18: cortexadmin.Rule.annotations:type_name -> cortexadmin.Rule.AnnotationsEntry - 31, // 19: cortexadmin.Rule.alerts:type_name -> cortexadmin.Alert - 34, // 20: cortexadmin.Alert.labels:type_name -> cortexadmin.Alert.LabelsEntry - 35, // 21: cortexadmin.Alert.annotations:type_name -> cortexadmin.Alert.AnnotationsEntry - 38, // 22: cortexadmin.CortexAdmin.AllUserStats:input_type -> google.protobuf.Empty + 37, // 11: cortexadmin.QueryRangeRequest.start:type_name -> google.protobuf.Timestamp + 37, // 12: cortexadmin.QueryRangeRequest.end:type_name -> google.protobuf.Timestamp + 38, // 13: cortexadmin.QueryRangeRequest.step:type_name -> google.protobuf.Duration + 29, // 14: cortexadmin.ListRulesResponse.data:type_name -> cortexadmin.RuleGroups + 30, // 15: cortexadmin.RuleGroups.groups:type_name -> cortexadmin.RuleGroup + 31, // 16: cortexadmin.RuleGroup.rules:type_name -> cortexadmin.Rule + 33, // 17: cortexadmin.Rule.labels:type_name -> cortexadmin.Rule.LabelsEntry + 34, // 18: cortexadmin.Rule.annotations:type_name -> cortexadmin.Rule.AnnotationsEntry + 32, // 19: cortexadmin.Rule.alerts:type_name -> cortexadmin.Alert + 35, // 20: cortexadmin.Alert.labels:type_name -> cortexadmin.Alert.LabelsEntry + 36, // 21: cortexadmin.Alert.annotations:type_name -> cortexadmin.Alert.AnnotationsEntry + 39, // 22: cortexadmin.CortexAdmin.AllUserStats:input_type -> google.protobuf.Empty 12, // 23: cortexadmin.CortexAdmin.WriteMetrics:input_type -> cortexadmin.WriteRequest 19, // 24: cortexadmin.CortexAdmin.Query:input_type -> cortexadmin.QueryRequest 20, // 25: cortexadmin.CortexAdmin.QueryRange:input_type -> cortexadmin.QueryRangeRequest - 21, // 26: cortexadmin.CortexAdmin.GetRule:input_type -> cortexadmin.RuleRequest - 26, // 27: cortexadmin.CortexAdmin.ListRules:input_type -> cortexadmin.ListRulesRequest - 22, // 28: cortexadmin.CortexAdmin.LoadRules:input_type -> cortexadmin.PostRuleRequest - 21, // 29: cortexadmin.CortexAdmin.DeleteRule:input_type -> cortexadmin.RuleRequest - 38, // 30: cortexadmin.CortexAdmin.FlushBlocks:input_type -> google.protobuf.Empty + 26, // 26: cortexadmin.CortexAdmin.GetRule:input_type -> cortexadmin.GetRuleRequest + 27, // 27: cortexadmin.CortexAdmin.ListRules:input_type -> cortexadmin.ListRulesRequest + 24, // 28: cortexadmin.CortexAdmin.LoadRules:input_type -> cortexadmin.LoadRuleRequest + 25, // 29: cortexadmin.CortexAdmin.DeleteRule:input_type -> cortexadmin.DeleteRuleRequest + 39, // 30: cortexadmin.CortexAdmin.FlushBlocks:input_type -> google.protobuf.Empty 2, // 31: cortexadmin.CortexAdmin.GetSeriesMetrics:input_type -> cortexadmin.SeriesRequest 4, // 32: cortexadmin.CortexAdmin.GetMetricLabelSets:input_type -> cortexadmin.LabelRequest - 38, // 33: cortexadmin.CortexAdmin.GetCortexStatus:input_type -> google.protobuf.Empty - 24, // 34: cortexadmin.CortexAdmin.GetCortexConfig:input_type -> cortexadmin.ConfigRequest + 39, // 33: cortexadmin.CortexAdmin.GetCortexStatus:input_type -> google.protobuf.Empty + 22, // 34: cortexadmin.CortexAdmin.GetCortexConfig:input_type -> cortexadmin.ConfigRequest 3, // 35: cortexadmin.CortexAdmin.ExtractRawSeries:input_type -> cortexadmin.MatcherRequest 10, // 36: cortexadmin.CortexAdmin.AllUserStats:output_type -> cortexadmin.UserIDStatsList 13, // 37: cortexadmin.CortexAdmin.WriteMetrics:output_type -> cortexadmin.WriteResponse - 23, // 38: cortexadmin.CortexAdmin.Query:output_type -> cortexadmin.QueryResponse - 23, // 39: cortexadmin.CortexAdmin.QueryRange:output_type -> cortexadmin.QueryResponse - 23, // 40: cortexadmin.CortexAdmin.GetRule:output_type -> cortexadmin.QueryResponse - 27, // 41: cortexadmin.CortexAdmin.ListRules:output_type -> cortexadmin.ListRulesResponse - 38, // 42: cortexadmin.CortexAdmin.LoadRules:output_type -> google.protobuf.Empty - 38, // 43: cortexadmin.CortexAdmin.DeleteRule:output_type -> google.protobuf.Empty - 38, // 44: cortexadmin.CortexAdmin.FlushBlocks:output_type -> google.protobuf.Empty + 21, // 38: cortexadmin.CortexAdmin.Query:output_type -> cortexadmin.QueryResponse + 21, // 39: cortexadmin.CortexAdmin.QueryRange:output_type -> cortexadmin.QueryResponse + 21, // 40: cortexadmin.CortexAdmin.GetRule:output_type -> cortexadmin.QueryResponse + 28, // 41: cortexadmin.CortexAdmin.ListRules:output_type -> cortexadmin.ListRulesResponse + 39, // 42: cortexadmin.CortexAdmin.LoadRules:output_type -> google.protobuf.Empty + 39, // 43: cortexadmin.CortexAdmin.DeleteRule:output_type -> google.protobuf.Empty + 39, // 44: cortexadmin.CortexAdmin.FlushBlocks:output_type -> google.protobuf.Empty 9, // 45: cortexadmin.CortexAdmin.GetSeriesMetrics:output_type -> cortexadmin.SeriesInfoList 5, // 46: cortexadmin.CortexAdmin.GetMetricLabelSets:output_type -> cortexadmin.MetricLabels - 39, // 47: cortexadmin.CortexAdmin.GetCortexStatus:output_type -> cortexadmin.CortexStatus - 25, // 48: cortexadmin.CortexAdmin.GetCortexConfig:output_type -> cortexadmin.ConfigResponse - 23, // 49: cortexadmin.CortexAdmin.ExtractRawSeries:output_type -> cortexadmin.QueryResponse + 40, // 47: cortexadmin.CortexAdmin.GetCortexStatus:output_type -> cortexadmin.CortexStatus + 23, // 48: cortexadmin.CortexAdmin.GetCortexConfig:output_type -> cortexadmin.ConfigResponse + 21, // 49: cortexadmin.CortexAdmin.ExtractRawSeries:output_type -> cortexadmin.QueryResponse 36, // [36:50] is the sub-list for method output_type 22, // [22:36] is the sub-list for method input_type 22, // [22:22] is the sub-list for extension type_name @@ -2737,7 +2829,7 @@ func file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadm } } file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuleRequest); i { + switch v := v.(*QueryResponse); i { case 0: return &v.state case 1: @@ -2749,7 +2841,7 @@ func file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadm } } file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostRuleRequest); i { + switch v := v.(*ConfigRequest); i { case 0: return &v.state case 1: @@ -2761,7 +2853,7 @@ func file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadm } } file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryResponse); i { + switch v := v.(*ConfigResponse); i { case 0: return &v.state case 1: @@ -2773,7 +2865,7 @@ func file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadm } } file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigRequest); i { + switch v := v.(*LoadRuleRequest); i { case 0: return &v.state case 1: @@ -2785,7 +2877,7 @@ func file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadm } } file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigResponse); i { + switch v := v.(*DeleteRuleRequest); i { case 0: return &v.state case 1: @@ -2797,7 +2889,7 @@ func file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadm } } file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRulesRequest); i { + switch v := v.(*GetRuleRequest); i { case 0: return &v.state case 1: @@ -2809,7 +2901,7 @@ func file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadm } } file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRulesResponse); i { + switch v := v.(*ListRulesRequest); i { case 0: return &v.state case 1: @@ -2821,7 +2913,7 @@ func file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadm } } file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuleGroups); i { + switch v := v.(*ListRulesResponse); i { case 0: return &v.state case 1: @@ -2833,7 +2925,7 @@ func file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadm } } file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuleGroup); i { + switch v := v.(*RuleGroups); i { case 0: return &v.state case 1: @@ -2845,7 +2937,7 @@ func file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadm } } file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Rule); i { + switch v := v.(*RuleGroup); i { case 0: return &v.state case 1: @@ -2857,6 +2949,18 @@ func file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadm } } file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Rule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Alert); i { case 0: return &v.state @@ -2869,14 +2973,14 @@ func file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadm } } } - file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[25].OneofWrappers = []interface{}{} + file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_msgTypes[26].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmin_proto_rawDesc, NumEnums: 1, - NumMessages: 35, + NumMessages: 36, NumExtensions: 0, NumServices: 1, }, diff --git a/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.pb.gw.go b/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.pb.gw.go index 9ceb5497e6..2cdbb6ff1e 100644 --- a/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.pb.gw.go +++ b/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.pb.gw.go @@ -225,11 +225,11 @@ func local_request_CortexAdmin_QueryRange_1(ctx context.Context, marshaler runti } var ( - filter_CortexAdmin_GetRule_0 = &utilities.DoubleArray{Encoding: map[string]int{"groupName": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_CortexAdmin_GetRule_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "groupName": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} ) func request_CortexAdmin_GetRule_0(ctx context.Context, marshaler runtime.Marshaler, client CortexAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RuleRequest + var protoReq GetRuleRequest var metadata runtime.ServerMetadata var ( @@ -239,6 +239,16 @@ func request_CortexAdmin_GetRule_0(ctx context.Context, marshaler runtime.Marsha _ = err ) + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + val, ok = pathParams["groupName"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "groupName") @@ -262,7 +272,7 @@ func request_CortexAdmin_GetRule_0(ctx context.Context, marshaler runtime.Marsha } func local_request_CortexAdmin_GetRule_0(ctx context.Context, marshaler runtime.Marshaler, server CortexAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RuleRequest + var protoReq GetRuleRequest var metadata runtime.ServerMetadata var ( @@ -272,6 +282,16 @@ func local_request_CortexAdmin_GetRule_0(ctx context.Context, marshaler runtime. _ = err ) + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + val, ok = pathParams["groupName"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "groupName") @@ -335,7 +355,7 @@ var ( ) func request_CortexAdmin_LoadRules_0(ctx context.Context, marshaler runtime.Marshaler, client CortexAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PostRuleRequest + var protoReq LoadRuleRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { @@ -351,7 +371,7 @@ func request_CortexAdmin_LoadRules_0(ctx context.Context, marshaler runtime.Mars } func local_request_CortexAdmin_LoadRules_0(ctx context.Context, marshaler runtime.Marshaler, server CortexAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PostRuleRequest + var protoReq LoadRuleRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { @@ -371,7 +391,7 @@ var ( ) func request_CortexAdmin_DeleteRule_0(ctx context.Context, marshaler runtime.Marshaler, client CortexAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RuleRequest + var protoReq DeleteRuleRequest var metadata runtime.ServerMetadata var ( @@ -404,7 +424,7 @@ func request_CortexAdmin_DeleteRule_0(ctx context.Context, marshaler runtime.Mar } func local_request_CortexAdmin_DeleteRule_0(ctx context.Context, marshaler runtime.Marshaler, server CortexAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RuleRequest + var protoReq DeleteRuleRequest var metadata runtime.ServerMetadata var ( @@ -780,7 +800,7 @@ func RegisterCortexAdminHandlerServer(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/cortexadmin.CortexAdmin/GetRule", runtime.WithHTTPPathPattern("/rules/{groupName}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/cortexadmin.CortexAdmin/GetRule", runtime.WithHTTPPathPattern("/rules/{namespace}/{groupName}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1201,7 +1221,7 @@ func RegisterCortexAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/cortexadmin.CortexAdmin/GetRule", runtime.WithHTTPPathPattern("/rules/{groupName}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/cortexadmin.CortexAdmin/GetRule", runtime.WithHTTPPathPattern("/rules/{namespace}/{groupName}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1431,7 +1451,7 @@ var ( pattern_CortexAdmin_QueryRange_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"query_range"}, "")) - pattern_CortexAdmin_GetRule_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"rules", "groupName"}, "")) + pattern_CortexAdmin_GetRule_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 1, 0, 4, 1, 5, 2}, []string{"rules", "namespace", "groupName"}, "")) pattern_CortexAdmin_ListRules_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"rules"}, "")) diff --git a/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.proto b/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.proto index 11aadcc7f3..bb8fac4477 100644 --- a/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.proto +++ b/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.proto @@ -41,9 +41,9 @@ service CortexAdmin { } }; } - rpc GetRule(RuleRequest) returns (QueryResponse) { + rpc GetRule(GetRuleRequest) returns (QueryResponse) { option (google.api.http) = { - get: "/rules/{groupName}" + get: "/rules/{namespace}/{groupName}" }; } @@ -54,12 +54,12 @@ service CortexAdmin { }; } - rpc LoadRules(PostRuleRequest) returns (google.protobuf.Empty) { + rpc LoadRules(LoadRuleRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/rules" }; } - rpc DeleteRule(RuleRequest) returns (google.protobuf.Empty) { + rpc DeleteRule(DeleteRuleRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/rules/{groupName}" }; @@ -218,16 +218,6 @@ message QueryRangeRequest { google.protobuf.Duration step = 5; } -message RuleRequest { - string clusterId = 1; - string groupName = 2; -} - -message PostRuleRequest{ - string clusterId = 1; - string yamlContent = 2; -} - message QueryResponse { bytes data = 2; } @@ -240,6 +230,24 @@ message ConfigResponse { repeated string configYaml = 4; } +message LoadRuleRequest{ + string clusterId = 1; + string namespace = 2; // defaults to "default" + bytes yamlContent = 3; +} + +message DeleteRuleRequest{ + string clusterId = 1; + string namespace = 2; + string groupName = 3; +} + +message GetRuleRequest{ + string clusterId = 1; + string namespace = 2; + string groupName = 3; +} + message ListRulesRequest { repeated string clusterId = 1; repeated string ruleType = 2; diff --git a/plugins/metrics/pkg/apis/cortexadmin/cortexadmin_grpc.pb.go b/plugins/metrics/pkg/apis/cortexadmin/cortexadmin_grpc.pb.go index 4109d1ead6..c17f51bdb9 100644 --- a/plugins/metrics/pkg/apis/cortexadmin/cortexadmin_grpc.pb.go +++ b/plugins/metrics/pkg/apis/cortexadmin/cortexadmin_grpc.pb.go @@ -27,11 +27,11 @@ type CortexAdminClient interface { WriteMetrics(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) QueryRange(ctx context.Context, in *QueryRangeRequest, opts ...grpc.CallOption) (*QueryResponse, error) - GetRule(ctx context.Context, in *RuleRequest, opts ...grpc.CallOption) (*QueryResponse, error) + GetRule(ctx context.Context, in *GetRuleRequest, opts ...grpc.CallOption) (*QueryResponse, error) // Heavy-handed API for diagnostics. ListRules(ctx context.Context, in *ListRulesRequest, opts ...grpc.CallOption) (*ListRulesResponse, error) - LoadRules(ctx context.Context, in *PostRuleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - DeleteRule(ctx context.Context, in *RuleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + LoadRules(ctx context.Context, in *LoadRuleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + DeleteRule(ctx context.Context, in *DeleteRuleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) FlushBlocks(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) // list all metrics GetSeriesMetrics(ctx context.Context, in *SeriesRequest, opts ...grpc.CallOption) (*SeriesInfoList, error) @@ -85,7 +85,7 @@ func (c *cortexAdminClient) QueryRange(ctx context.Context, in *QueryRangeReques return out, nil } -func (c *cortexAdminClient) GetRule(ctx context.Context, in *RuleRequest, opts ...grpc.CallOption) (*QueryResponse, error) { +func (c *cortexAdminClient) GetRule(ctx context.Context, in *GetRuleRequest, opts ...grpc.CallOption) (*QueryResponse, error) { out := new(QueryResponse) err := c.cc.Invoke(ctx, "/cortexadmin.CortexAdmin/GetRule", in, out, opts...) if err != nil { @@ -103,7 +103,7 @@ func (c *cortexAdminClient) ListRules(ctx context.Context, in *ListRulesRequest, return out, nil } -func (c *cortexAdminClient) LoadRules(ctx context.Context, in *PostRuleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *cortexAdminClient) LoadRules(ctx context.Context, in *LoadRuleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/cortexadmin.CortexAdmin/LoadRules", in, out, opts...) if err != nil { @@ -112,7 +112,7 @@ func (c *cortexAdminClient) LoadRules(ctx context.Context, in *PostRuleRequest, return out, nil } -func (c *cortexAdminClient) DeleteRule(ctx context.Context, in *RuleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *cortexAdminClient) DeleteRule(ctx context.Context, in *DeleteRuleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/cortexadmin.CortexAdmin/DeleteRule", in, out, opts...) if err != nil { @@ -183,11 +183,11 @@ type CortexAdminServer interface { WriteMetrics(context.Context, *WriteRequest) (*WriteResponse, error) Query(context.Context, *QueryRequest) (*QueryResponse, error) QueryRange(context.Context, *QueryRangeRequest) (*QueryResponse, error) - GetRule(context.Context, *RuleRequest) (*QueryResponse, error) + GetRule(context.Context, *GetRuleRequest) (*QueryResponse, error) // Heavy-handed API for diagnostics. ListRules(context.Context, *ListRulesRequest) (*ListRulesResponse, error) - LoadRules(context.Context, *PostRuleRequest) (*emptypb.Empty, error) - DeleteRule(context.Context, *RuleRequest) (*emptypb.Empty, error) + LoadRules(context.Context, *LoadRuleRequest) (*emptypb.Empty, error) + DeleteRule(context.Context, *DeleteRuleRequest) (*emptypb.Empty, error) FlushBlocks(context.Context, *emptypb.Empty) (*emptypb.Empty, error) // list all metrics GetSeriesMetrics(context.Context, *SeriesRequest) (*SeriesInfoList, error) @@ -214,16 +214,16 @@ func (UnimplementedCortexAdminServer) Query(context.Context, *QueryRequest) (*Qu func (UnimplementedCortexAdminServer) QueryRange(context.Context, *QueryRangeRequest) (*QueryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryRange not implemented") } -func (UnimplementedCortexAdminServer) GetRule(context.Context, *RuleRequest) (*QueryResponse, error) { +func (UnimplementedCortexAdminServer) GetRule(context.Context, *GetRuleRequest) (*QueryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRule not implemented") } func (UnimplementedCortexAdminServer) ListRules(context.Context, *ListRulesRequest) (*ListRulesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListRules not implemented") } -func (UnimplementedCortexAdminServer) LoadRules(context.Context, *PostRuleRequest) (*emptypb.Empty, error) { +func (UnimplementedCortexAdminServer) LoadRules(context.Context, *LoadRuleRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method LoadRules not implemented") } -func (UnimplementedCortexAdminServer) DeleteRule(context.Context, *RuleRequest) (*emptypb.Empty, error) { +func (UnimplementedCortexAdminServer) DeleteRule(context.Context, *DeleteRuleRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteRule not implemented") } func (UnimplementedCortexAdminServer) FlushBlocks(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { @@ -330,7 +330,7 @@ func _CortexAdmin_QueryRange_Handler(srv interface{}, ctx context.Context, dec f } func _CortexAdmin_GetRule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RuleRequest) + in := new(GetRuleRequest) if err := dec(in); err != nil { return nil, err } @@ -342,7 +342,7 @@ func _CortexAdmin_GetRule_Handler(srv interface{}, ctx context.Context, dec func FullMethod: "/cortexadmin.CortexAdmin/GetRule", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CortexAdminServer).GetRule(ctx, req.(*RuleRequest)) + return srv.(CortexAdminServer).GetRule(ctx, req.(*GetRuleRequest)) } return interceptor(ctx, in, info, handler) } @@ -366,7 +366,7 @@ func _CortexAdmin_ListRules_Handler(srv interface{}, ctx context.Context, dec fu } func _CortexAdmin_LoadRules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PostRuleRequest) + in := new(LoadRuleRequest) if err := dec(in); err != nil { return nil, err } @@ -378,13 +378,13 @@ func _CortexAdmin_LoadRules_Handler(srv interface{}, ctx context.Context, dec fu FullMethod: "/cortexadmin.CortexAdmin/LoadRules", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CortexAdminServer).LoadRules(ctx, req.(*PostRuleRequest)) + return srv.(CortexAdminServer).LoadRules(ctx, req.(*LoadRuleRequest)) } return interceptor(ctx, in, info, handler) } func _CortexAdmin_DeleteRule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RuleRequest) + in := new(DeleteRuleRequest) if err := dec(in); err != nil { return nil, err } @@ -396,7 +396,7 @@ func _CortexAdmin_DeleteRule_Handler(srv interface{}, ctx context.Context, dec f FullMethod: "/cortexadmin.CortexAdmin/DeleteRule", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CortexAdminServer).DeleteRule(ctx, req.(*RuleRequest)) + return srv.(CortexAdminServer).DeleteRule(ctx, req.(*DeleteRuleRequest)) } return interceptor(ctx, in, info, handler) } diff --git a/plugins/metrics/pkg/apis/cortexadmin/extensions.go b/plugins/metrics/pkg/apis/cortexadmin/extensions.go index b1d85c1c5a..378655fcb4 100644 --- a/plugins/metrics/pkg/apis/cortexadmin/extensions.go +++ b/plugins/metrics/pkg/apis/cortexadmin/extensions.go @@ -8,13 +8,42 @@ import ( "golang.org/x/exp/slices" ) -func (in *PostRuleRequest) Validate() error { +func (in *LoadRuleRequest) Validate() error { if in.ClusterId == "" { return validation.Error("clusterId is required") } - if in.YamlContent == "" { + if len(in.YamlContent) == 0 { return validation.Error("yamlContent is required") } + if in.Namespace == "" { + in.Namespace = "default" + } + return nil +} + +func (in *GetRuleRequest) Validate() error { + if in.ClusterId == "" { + return validation.Error("clusterId is required") + } + if in.Namespace == "" { + in.Namespace = "default" + } + if in.GroupName == "" { + return validation.Error("groupName is required") + } + return nil +} + +func (in *DeleteRuleRequest) Validate() error { + if in.ClusterId == "" { + return validation.Error("clusterId is required") + } + if in.Namespace == "" { + in.Namespace = "default" + } + if in.GroupName == "" { + return validation.Error("groupName is required") + } return nil } diff --git a/plugins/metrics/pkg/cortex/admin.go b/plugins/metrics/pkg/cortex/admin.go index f09a135744..f7085c8977 100644 --- a/plugins/metrics/pkg/cortex/admin.go +++ b/plugins/metrics/pkg/cortex/admin.go @@ -291,7 +291,7 @@ func (p *CortexAdminServer) QueryRange( } func (p *CortexAdminServer) GetRule(ctx context.Context, - in *cortexadmin.RuleRequest, + in *cortexadmin.GetRuleRequest, ) (*cortexadmin.QueryResponse, error) { if !p.Initialized() { return nil, util.StatusError(codes.Unavailable) @@ -301,8 +301,8 @@ func (p *CortexAdminServer) GetRule(ctx context.Context, ) req, err := http.NewRequestWithContext(ctx, "GET", - fmt.Sprintf("https://%s/api/v1/rules/monitoring/%s", - p.Config.Cortex.Ruler.HTTPAddress, in.GroupName), nil) + fmt.Sprintf("https://%s/api/v1/rules/%s/%s", + p.Config.Cortex.Ruler.HTTPAddress, in.Namespace, in.GroupName), nil) if err != nil { return nil, err } @@ -403,7 +403,7 @@ func (p *CortexAdminServer) ListRules(ctx context.Context, req *cortexadmin.List // LoadRules This method is responsible for Creating and Updating Rules func (p *CortexAdminServer) LoadRules(ctx context.Context, - in *cortexadmin.PostRuleRequest, + in *cortexadmin.LoadRuleRequest, ) (*emptypb.Empty, error) { if !p.Initialized() { return nil, util.StatusError(codes.Unavailable) @@ -416,12 +416,12 @@ func (p *CortexAdminServer) LoadRules(ctx context.Context, } req, err := http.NewRequestWithContext(ctx, "POST", - fmt.Sprintf("https://%s/api/v1/rules/monitoring", p.Config.Cortex.Ruler.HTTPAddress), nil) + fmt.Sprintf("https://%s/api/v1/rules/%s", p.Config.Cortex.Ruler.HTTPAddress, in.Namespace), nil) if err != nil { return nil, err } - req.Body = io.NopCloser(strings.NewReader(in.YamlContent)) + req.Body = io.NopCloser(bytes.NewReader(in.YamlContent)) req.Header.Set("Content-Type", "application/yaml") req.Header.Set(orgIDCodec.Key(), orgIDCodec.Encode([]string{in.ClusterId})) resp, err := p.CortexClientSet.HTTP().Do(req) @@ -443,18 +443,19 @@ func (p *CortexAdminServer) LoadRules(ctx context.Context, func (p *CortexAdminServer) DeleteRule( ctx context.Context, - in *cortexadmin.RuleRequest, + in *cortexadmin.DeleteRuleRequest, ) (*emptypb.Empty, error) { if !p.Initialized() { return nil, util.StatusError(codes.Unavailable) } lg := p.Logger.With( - "delete request", in.GroupName, + "group", in.GroupName, + "namespace", in.Namespace, + "cluster", in.ClusterId, ) - req, err := http.NewRequestWithContext(ctx, "DELETE", - fmt.Sprintf("https://%s/api/v1/rules/monitoring/%s", - p.Config.Cortex.Ruler.HTTPAddress, in.GroupName), nil) + fmt.Sprintf("https://%s/api/v1/rules/%s/%s", + p.Config.Cortex.Ruler.HTTPAddress, in.Namespace, in.GroupName), nil) if err != nil { return nil, err } @@ -472,10 +473,10 @@ func (p *CortexAdminServer) DeleteRule( ).Error("delete rule group failed") if resp.StatusCode == http.StatusNotFound { // return grpc not found in this case - err := status.Error(codes.NotFound, fmt.Sprintf("delete rule group failed :`%s`", err)) + err := status.Error(codes.NotFound, fmt.Sprintf("delete rule group failed %s", err)) return nil, err } - return nil, fmt.Errorf("delete rule group failed: %s", resp.Status) + return nil, fmt.Errorf("delete rule group failed, unexpected status code: `%s` - %s", err, resp.Status) } return &emptypb.Empty{}, nil } diff --git a/plugins/metrics/pkg/cortex/remotewrite.go b/plugins/metrics/pkg/cortex/remotewrite.go index a9eb59f375..0073138d6f 100644 --- a/plugins/metrics/pkg/cortex/remotewrite.go +++ b/plugins/metrics/pkg/cortex/remotewrite.go @@ -123,8 +123,12 @@ func (f *RemoteWriteForwarder) SyncRules(ctx context.Context, payload *remotewri ).Error("error syncing rules to cortex") } }() - url := fmt.Sprintf("https://%s/api/v1/rules/%s", - f.Config.Cortex.Ruler.HTTPAddress, clusterId) + url := fmt.Sprintf( + "https://%s/api/v1/rules/%s", + f.Config.Cortex.Ruler.HTTPAddress, + "synced", // set the namespace to synced to differentiate from user rules + ) + req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewReader(payload.Contents)) if err != nil { diff --git a/plugins/slo/pkg/slo/cortex_info.go b/plugins/slo/pkg/slo/cortex_info.go index 94b90af6ed..8c9213859f 100644 --- a/plugins/slo/pkg/slo/cortex_info.go +++ b/plugins/slo/pkg/slo/cortex_info.go @@ -164,8 +164,9 @@ func applyCortexSLORules( return err } - _, err = p.adminClient.Get().LoadRules(ctx, &cortexadmin.PostRuleRequest{ - YamlContent: string(out), + _, err = p.adminClient.Get().LoadRules(ctx, &cortexadmin.LoadRuleRequest{ + Namespace: "slo", + YamlContent: out, ClusterId: clusterId, }) if err != nil { @@ -184,8 +185,9 @@ func deleteCortexSLORules( clusterId string, groupName string, ) error { - _, err := p.adminClient.Get().DeleteRule(ctx, &cortexadmin.RuleRequest{ + _, err := p.adminClient.Get().DeleteRule(ctx, &cortexadmin.DeleteRuleRequest{ ClusterId: clusterId, + Namespace: "slo", GroupName: groupName, }) // we can ignore 404s here since if we can't find them, diff --git a/plugins/slo/pkg/slo/slo_test.go b/plugins/slo/pkg/slo/slo_test.go index 8c7e682df3..3b5803f164 100644 --- a/plugins/slo/pkg/slo/slo_test.go +++ b/plugins/slo/pkg/slo/slo_test.go @@ -689,23 +689,26 @@ var _ = Describe("Converting SLO information to Cortex rules", Ordered, Label(te outRecording, err := yaml.Marshal(rrecording) Expect(err).To(Succeed()) - _, err = adminClient.LoadRules(ctx, &cortexadmin.PostRuleRequest{ + _, err = adminClient.LoadRules(ctx, &cortexadmin.LoadRuleRequest{ ClusterId: "agent", - YamlContent: string(outRecording), + Namespace: "slo", + YamlContent: outRecording, }) Expect(err).NotTo(HaveOccurred()) outMetadata, err := yaml.Marshal(rmetadata) Expect(err).NotTo(HaveOccurred()) - _, err = adminClient.LoadRules(ctx, &cortexadmin.PostRuleRequest{ + _, err = adminClient.LoadRules(ctx, &cortexadmin.LoadRuleRequest{ ClusterId: "agent", - YamlContent: string(outMetadata), + Namespace: "slo", + YamlContent: outMetadata, }) Expect(err).NotTo(HaveOccurred()) outAlerts, err := yaml.Marshal(ralerts) Expect(err).NotTo(HaveOccurred()) - _, err = adminClient.LoadRules(ctx, &cortexadmin.PostRuleRequest{ + _, err = adminClient.LoadRules(ctx, &cortexadmin.LoadRuleRequest{ ClusterId: "agent", - YamlContent: string(outAlerts), + Namespace: "slo", + YamlContent: outAlerts, }) Expect(err).NotTo(HaveOccurred()) diff --git a/test/e2e/monitoring_test.go b/test/e2e/monitoring_test.go index ad96045749..4ddc5f274c 100644 --- a/test/e2e/monitoring_test.go +++ b/test/e2e/monitoring_test.go @@ -253,8 +253,9 @@ var _ = Describe("Monitoring Test", Ordered, Label("e2e", "slow"), func() { sampleRule := fmt.Sprintf("%s/sampleRule.yaml", ruleTestDataDir) sampleRuleYamlBytes, err := ioutil.ReadFile(sampleRule) Expect(err).To(Succeed()) - _, err = adminClient.LoadRules(ctx, &cortexadmin.PostRuleRequest{ - YamlContent: string(sampleRuleYamlBytes), + _, err = adminClient.LoadRules(ctx, &cortexadmin.LoadRuleRequest{ + YamlContent: sampleRuleYamlBytes, + Namespace: "test", ClusterId: agentId, }) Expect(err).NotTo(HaveOccurred()) diff --git a/test/plugins/cortexadmin/cortexadmin_test.go b/test/plugins/cortexadmin/cortexadmin_test.go index 7e07270797..1afe9b6575 100644 --- a/test/plugins/cortexadmin/cortexadmin_test.go +++ b/test/plugins/cortexadmin/cortexadmin_test.go @@ -3,13 +3,14 @@ package plugins_test import ( "context" "fmt" - "github.com/rancher/opni/pkg/alerting/metrics" - "github.com/tidwall/gjson" "io/ioutil" "net/http" "net/url" "time" + "github.com/rancher/opni/pkg/alerting/metrics" + "github.com/tidwall/gjson" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" managementv1 "github.com/rancher/opni/pkg/apis/management/v1" @@ -23,8 +24,9 @@ import ( func expectRuleGroupToExist(adminClient apis.CortexAdminClient, ctx context.Context, tenant string, groupName string, expectedYaml []byte) error { for i := 0; i < 10; i++ { - resp, err := adminClient.GetRule(ctx, &apis.RuleRequest{ + resp, err := adminClient.GetRule(ctx, &apis.GetRuleRequest{ ClusterId: tenant, + Namespace: "test", GroupName: groupName, }) if err == nil { @@ -39,8 +41,9 @@ func expectRuleGroupToExist(adminClient apis.CortexAdminClient, ctx context.Cont func expectRuleGroupToNotExist(adminClient apis.CortexAdminClient, ctx context.Context, tenant string, groupName string) error { for i := 0; i < 10; i++ { - _, err := adminClient.GetRule(ctx, &apis.RuleRequest{ + _, err := adminClient.GetRule(ctx, &apis.GetRuleRequest{ ClusterId: tenant, + Namespace: "test", GroupName: groupName, }) if err != nil { @@ -328,9 +331,10 @@ var _ = Describe("Converting ServiceLevelObjective Messages to Prometheus Rules" sampleRuleYamlString, err := ioutil.ReadFile(sampleRule) Expect(err).To(Succeed()) _, err = adminClient.LoadRules(ctx, - &apis.PostRuleRequest{ + &apis.LoadRuleRequest{ ClusterId: "agent", - YamlContent: string(sampleRuleYamlString), + Namespace: "test", + YamlContent: sampleRuleYamlString, }) Expect(err).To(Succeed()) @@ -340,9 +344,10 @@ var _ = Describe("Converting ServiceLevelObjective Messages to Prometheus Rules" slothGeneratedGroupYamlString, err := ioutil.ReadFile(slothGeneratedGroup) Expect(err).To(Succeed()) _, err = adminClient.LoadRules(ctx, - &apis.PostRuleRequest{ + &apis.LoadRuleRequest{ ClusterId: "agent", - YamlContent: string(slothGeneratedGroupYamlString), + Namespace: "test", + YamlContent: slothGeneratedGroupYamlString, }) Expect(err).To(Succeed()) Expect(err).NotTo(HaveOccurred()) @@ -360,9 +365,10 @@ var _ = Describe("Converting ServiceLevelObjective Messages to Prometheus Rules" sampleRuleYamlUpdateString, err := ioutil.ReadFile(sampleRuleUpdate) Expect(err).To(Succeed()) _, err = adminClient.LoadRules(ctx, - &apis.PostRuleRequest{ + &apis.LoadRuleRequest{ ClusterId: "agent", - YamlContent: string(sampleRuleYamlUpdateString), + Namespace: "test", + YamlContent: sampleRuleYamlUpdateString, }) Expect(err).To(Succeed()) @@ -375,8 +381,9 @@ var _ = Describe("Converting ServiceLevelObjective Messages to Prometheus Rules" It("Should be able to delete existing rule groups", func() { deleteGroupName := "opni-test-slo-rule" - _, err := adminClient.DeleteRule(ctx, &apis.RuleRequest{ + _, err := adminClient.DeleteRule(ctx, &apis.DeleteRuleRequest{ ClusterId: "agent", + Namespace: "test", GroupName: deleteGroupName, }) Expect(err).To(Succeed()) @@ -395,15 +402,17 @@ var _ = Describe("Converting ServiceLevelObjective Messages to Prometheus Rules" sampleRuleYamlString, err := ioutil.ReadFile(sampleRule) Expect(err).To(Succeed()) _, err = adminClient.LoadRules(ctx, - &apis.PostRuleRequest{ + &apis.LoadRuleRequest{ ClusterId: "agent", - YamlContent: string(sampleRuleYamlString), + Namespace: "test", + YamlContent: sampleRuleYamlString, }) Expect(err).To(Succeed()) _, err = adminClient.LoadRules(ctx, - &apis.PostRuleRequest{ + &apis.LoadRuleRequest{ + Namespace: "test", ClusterId: "agent2", - YamlContent: string(sampleRuleYamlString), + YamlContent: sampleRuleYamlString, }) Expect(err).To(Succeed()) @@ -421,8 +430,9 @@ var _ = Describe("Converting ServiceLevelObjective Messages to Prometheus Rules" }).Should(Succeed()) deleteGroupName := "opni-test-slo-rule" - _, err = adminClient.DeleteRule(ctx, &apis.RuleRequest{ + _, err = adminClient.DeleteRule(ctx, &apis.DeleteRuleRequest{ ClusterId: "agent", + Namespace: "test", GroupName: deleteGroupName, }) Expect(err).To(Succeed()) diff --git a/test/plugins/slo/test_helpers_test.go b/test/plugins/slo/test_helpers_test.go index c37b9d603f..524a0d2fce 100644 --- a/test/plugins/slo/test_helpers_test.go +++ b/test/plugins/slo/test_helpers_test.go @@ -3,13 +3,14 @@ package plugins_test import ( "context" "fmt" + "sync" + "time" + . "github.com/onsi/gomega" "github.com/rancher/opni/plugins/metrics/pkg/apis/cortexadmin" "github.com/rancher/opni/plugins/slo/pkg/slo" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "sync" - "time" ) func sloCortexGroupsToCheck(groupName string) []string { @@ -61,8 +62,9 @@ func expectSLOGroupNotToExist(adminClient cortexadmin.CortexAdminClient, ctx con // potentially "long" running function, call asynchronously func expectRuleGroupToExist(adminClient cortexadmin.CortexAdminClient, ctx context.Context, tenant string, groupName string) error { for i := 0; i < 10; i++ { - resp, err := adminClient.GetRule(ctx, &cortexadmin.RuleRequest{ + resp, err := adminClient.GetRule(ctx, &cortexadmin.GetRuleRequest{ ClusterId: tenant, + Namespace: "test", GroupName: groupName, }) if err == nil { @@ -77,8 +79,9 @@ func expectRuleGroupToExist(adminClient cortexadmin.CortexAdminClient, ctx conte // potentially "long" running function, call asynchronously func expectRuleGroupNotToExist(adminClient cortexadmin.CortexAdminClient, ctx context.Context, tenant string, groupName string) error { for i := 0; i < 10; i++ { - _, err := adminClient.GetRule(ctx, &cortexadmin.RuleRequest{ + _, err := adminClient.GetRule(ctx, &cortexadmin.GetRuleRequest{ ClusterId: tenant, + Namespace: "test", GroupName: groupName, }) if err != nil { From f100f9c07c02a5d1a154b4b25bd729ba59e3467c Mon Sep 17 00:00:00 2001 From: Alexandre Lamarre Date: Fri, 6 Jan 2023 16:10:25 +0000 Subject: [PATCH 2/2] namespace filter for list rules --- pkg/opni/commands/admin.go | 3 + .../pkg/alerting/condition_handlers.go | 1 + .../pkg/apis/cortexadmin/cortexadmin.pb.go | 347 +++++++++--------- .../pkg/apis/cortexadmin/cortexadmin.proto | 1 + .../pkg/apis/cortexadmin/extensions.go | 18 +- 5 files changed, 201 insertions(+), 169 deletions(-) diff --git a/pkg/opni/commands/admin.go b/pkg/opni/commands/admin.go index bfc1f0629a..152091b525 100644 --- a/pkg/opni/commands/admin.go +++ b/pkg/opni/commands/admin.go @@ -175,6 +175,7 @@ func BuildListRulesCmd() *cobra.Command { var stateFilter []string var ruleNameFilter string var groupNameFilter string + var namespaceFilter string var outputFormat string var invalidDiagnosticRequested bool var all bool @@ -208,6 +209,7 @@ func BuildListRulesCmd() *cobra.Command { StateFilter: stateFilter, RuleNameRegexp: ruleNameFilter, GroupNameRegexp: groupNameFilter, + NamespaceRegexp: namespaceFilter, ListInvalid: &invalidDiagnosticRequested, RequestAll: &all, }) @@ -228,6 +230,7 @@ func BuildListRulesCmd() *cobra.Command { cmd.Flags().StringSliceVar(&stateFilter, "state", []string{}, "Rule state to list (default=all)") cmd.Flags().StringVar(&groupNameFilter, "group-name", "", "Group names to list (supports go regex) (default=all)") cmd.Flags().StringVar(&ruleNameFilter, "rule-name", "", "Rule names to list (supports go regex) (default=all)") + cmd.Flags().StringVar(&namespaceFilter, "namespace", "", "Namespaces to match against (supports go regex) (default=all)") cmd.Flags().BoolVar(&invalidDiagnosticRequested, "invalid", false, "List invalid rules (default=false)") cmd.Flags().BoolVar(&all, "all", false, "List all rules present in cortex, regardless of cluster (default=false)") cmd.Flags().StringVar(&outputFormat, "output", "table", "Output format : table,json (default=table)") diff --git a/plugins/alerting/pkg/alerting/condition_handlers.go b/plugins/alerting/pkg/alerting/condition_handlers.go index 0fd0fb1a17..1a641756ab 100644 --- a/plugins/alerting/pkg/alerting/condition_handlers.go +++ b/plugins/alerting/pkg/alerting/condition_handlers.go @@ -324,6 +324,7 @@ func (p *Plugin) handlePrometheusQueryAlertCreation(ctx context.Context, q *aler p.Logger.With("Expr", "user-query").Debugf("%s", string(out)) _, err = p.adminClient.Get().LoadRules(ctx, &cortexadmin.LoadRuleRequest{ ClusterId: q.ClusterId.GetId(), + Namespace: shared.OpniAlertingCortexNamespace, YamlContent: out, }) diff --git a/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.pb.go b/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.pb.go index 8a8c377888..14400ffef7 100644 --- a/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.pb.go +++ b/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.pb.go @@ -1586,6 +1586,7 @@ type ListRulesRequest struct { GroupNameRegexp string `protobuf:"bytes,6,opt,name=groupNameRegexp,proto3" json:"groupNameRegexp,omitempty"` ListInvalid *bool `protobuf:"varint,7,opt,name=listInvalid,proto3,oneof" json:"listInvalid,omitempty"` RequestAll *bool `protobuf:"varint,8,opt,name=requestAll,proto3,oneof" json:"requestAll,omitempty"` + NamespaceRegexp string `protobuf:"bytes,9,opt,name=namespaceRegexp,proto3" json:"namespaceRegexp,omitempty"` } func (x *ListRulesRequest) Reset() { @@ -1676,6 +1677,13 @@ func (x *ListRulesRequest) GetRequestAll() bool { return false } +func (x *ListRulesRequest) GetNamespaceRegexp() string { + if x != nil { + return x.NamespaceRegexp + } + return "" +} + // matches the return of cortex ruler api // https://github.com/cortexproject/cortex/blob/c0e4545fd26f33ca5cc3323ee48e4c2ccd182b83/pkg/ruler/api.go#L215 type ListRulesResponse struct { @@ -2272,7 +2280,7 @@ var file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmi 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, - 0x65, 0x22, 0xcf, 0x02, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, + 0x65, 0x22, 0xf9, 0x02, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, @@ -2291,177 +2299,180 @@ var file_github_com_rancher_opni_plugins_metrics_pkg_apis_cortexadmin_cortexadmi 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x6c, - 0x6c, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x41, 0x6c, 0x6c, 0x22, 0x58, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, 0x6c, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3c, 0x0a, - 0x0a, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x2e, 0x0a, 0x06, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, - 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x09, - 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, - 0x65, 0x12, 0x27, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, - 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x76, - 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x6c, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x42, 0x0e, + 0x0a, 0x0c, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x42, 0x0d, + 0x0a, 0x0b, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x22, 0x58, 0x0a, + 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, + 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3c, 0x0a, 0x0a, 0x52, 0x75, 0x6c, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x2e, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x09, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x72, + 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x12, 0x26, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x65, 0x76, 0x61, 0x6c, + 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x0e, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0xa0, + 0x04, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x44, 0x0a, 0x0b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, + 0x6c, 0x65, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x2a, 0x0a, 0x06, 0x61, 0x6c, 0x65, 0x72, + 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, + 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x06, 0x61, 0x6c, + 0x65, 0x72, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0e, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x49, 0x64, 0x22, 0xa0, 0x04, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1a, 0x0a, - 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x06, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x72, 0x74, - 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x12, 0x44, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x2a, - 0x0a, 0x06, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x6c, 0x65, - 0x72, 0x74, 0x52, 0x06, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x61, - 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, - 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, - 0x6c, 0x61, 0x73, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0e, 0x65, 0x76, - 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x39, 0x0a, 0x0b, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc9, 0x02, 0x0a, 0x05, 0x41, 0x6c, 0x65, 0x72, - 0x74, 0x12, 0x36, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x41, 0x6c, 0x65, 0x72, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x6c, 0x65, - 0x72, 0x74, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x32, 0xd2, 0x0a, 0x0a, 0x0b, 0x43, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x41, 0x64, - 0x6d, 0x69, 0x6e, 0x12, 0x5d, 0x0a, 0x0c, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, - 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x11, 0x12, 0x0f, 0x2f, 0x61, 0x6c, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x73, 0x12, 0x60, 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x12, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, - 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x72, 0x69, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x12, 0x5b, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x19, 0x2e, - 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, - 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x5a, 0x0b, 0x3a, 0x01, - 0x2a, 0x22, 0x06, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x06, 0x2f, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x12, 0x71, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, - 0x1e, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x21, 0x5a, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x0c, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x72, - 0x61, 0x6e, 0x67, 0x65, 0x12, 0x6a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x12, - 0x1b, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, - 0x74, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x63, - 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, - 0x12, 0x1e, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x7d, - 0x12, 0x5a, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x2e, - 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x63, - 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x08, 0x12, 0x06, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x51, 0x0a, 0x09, - 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x63, 0x6f, 0x72, 0x74, - 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x75, 0x6c, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x0e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x08, 0x22, 0x06, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, - 0x60, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1e, 0x2e, - 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0e, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0xc9, 0x02, 0x0a, 0x05, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, + 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x2e, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, + 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x2e, 0x41, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, + 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xd2, 0x0a, + 0x0a, 0x0b, 0x43, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x5d, 0x0a, + 0x0c, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, - 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, - 0x7d, 0x12, 0x54, 0x0a, 0x0b, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, - 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x22, 0x0d, 0x2f, 0x66, 0x6c, 0x75, 0x73, 0x68, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x65, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x65, - 0x72, 0x69, 0x65, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1a, 0x2e, 0x63, 0x6f, - 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, - 0x4c, 0x69, 0x73, 0x74, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x73, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x62, - 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x53, 0x65, 0x74, 0x73, 0x12, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x12, 0x55, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e, - 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x72, 0x74, - 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, - 0x12, 0x07, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x47, 0x65, 0x74, - 0x43, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x2e, 0x63, - 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, - 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x60, 0x0a, 0x10, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x52, 0x61, 0x77, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x72, - 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x53, 0x74, 0x61, 0x74, 0x73, 0x4c, + 0x69, 0x73, 0x74, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x61, 0x6c, + 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x60, 0x0a, 0x0c, + 0x57, 0x72, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x19, 0x2e, 0x63, + 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x73, 0x65, - 0x72, 0x69, 0x65, 0x73, 0x2f, 0x72, 0x61, 0x77, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x6f, - 0x70, 0x6e, 0x69, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6f, 0x72, - 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, + 0x2f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x5b, + 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x5a, 0x0b, 0x3a, 0x01, 0x2a, 0x22, 0x06, 0x2f, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x12, 0x06, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x71, 0x0a, 0x0a, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x72, 0x74, + 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x74, + 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x5a, 0x11, 0x3a, + 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x12, 0x0c, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x6a, + 0x0a, 0x07, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x72, 0x74, + 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x5a, 0x0a, 0x09, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x08, 0x12, 0x06, + 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x51, 0x0a, 0x09, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x0e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x08, 0x22, 0x06, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x60, 0x0a, 0x0a, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2f, + 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x54, 0x0a, 0x0b, 0x46, + 0x6c, 0x75, 0x73, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x0f, 0x22, 0x0d, 0x2f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x12, 0x65, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x18, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x2f, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x62, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x53, 0x65, 0x74, 0x73, 0x12, 0x19, + 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x74, + 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x73, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x55, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x74, 0x65, 0x78, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x60, 0x0a, 0x10, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x61, 0x77, 0x53, 0x65, + 0x72, 0x69, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x72, + 0x61, 0x77, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x6e, 0x69, 0x2f, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x70, 0x6b, + 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x78, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.proto b/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.proto index bb8fac4477..685d9ec9c8 100644 --- a/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.proto +++ b/plugins/metrics/pkg/apis/cortexadmin/cortexadmin.proto @@ -257,6 +257,7 @@ message ListRulesRequest { string groupNameRegexp = 6; optional bool listInvalid = 7; optional bool requestAll = 8; + string namespaceRegexp = 9; } // matches the return of cortex ruler api diff --git a/plugins/metrics/pkg/apis/cortexadmin/extensions.go b/plugins/metrics/pkg/apis/cortexadmin/extensions.go index 378655fcb4..6175a2fcb1 100644 --- a/plugins/metrics/pkg/apis/cortexadmin/extensions.go +++ b/plugins/metrics/pkg/apis/cortexadmin/extensions.go @@ -73,6 +73,14 @@ func (l *ListRulesRequest) Validate() error { l.RuleNameRegexp = ".*" } + if l.NamespaceRegexp != "" { + if _, err := regexp.Compile(l.NamespaceRegexp); err != nil { + return validation.Errorf("invalid regex for namespace filter %s", l.NamespaceRegexp) + } + } else { + l.NamespaceRegexp = ".*" + } + if len(l.RuleType) != 0 { for _, rt := range l.RuleType { if rt == "" { @@ -117,9 +125,10 @@ func (l *ListRulesRequest) Filter(groups *RuleGroups, clusterId string) *RuleGro } ruleNameRegex := regexp.MustCompile(l.RuleNameRegexp) groupNameRegex := regexp.MustCompile(l.GroupNameRegexp) + namespaceRegex := regexp.MustCompile(l.NamespaceRegexp) for _, group := range groups.Groups { - if !l.MatchesCluster(clusterId) || !l.MatchesRuleGroup(groupNameRegex, group.Name) { + if !l.MatchesCluster(clusterId) || !l.MatchesRuleGroup(groupNameRegex, group.Name) || !l.MatchesNamespace(namespaceRegex, group.File) { continue } group.ClusterId = clusterId @@ -153,6 +162,13 @@ func xOR(expr1, expr2 bool) bool { return expr1 != expr2 } +func (l *ListRulesRequest) MatchesNamespace(namespaceRegex *regexp.Regexp, namespace string) bool { + if l.All() { + return true + } + return namespaceRegex.MatchString(namespace) +} + func (l *ListRulesRequest) All() bool { return l.RequestAll != nil && *l.RequestAll }