mirror of
https://github.com/kubenetworks/kubevpn.git
synced 2025-09-27 03:36:09 +08:00
feat: support connect one namespace but proxy workload in another namespace (#496)
This commit is contained in:
@@ -34,13 +34,18 @@ func CmdLeave(f cmdutil.Factory) *cobra.Command {
|
|||||||
return daemon.StartupDaemon(cmd.Context())
|
return daemon.StartupDaemon(cmd.Context())
|
||||||
},
|
},
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
leave, err := daemon.GetClient(false).Leave(cmd.Context(), &rpc.LeaveRequest{
|
_, ns, err := util.ConvertToKubeConfigBytes(f)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
resp, err := daemon.GetClient(false).Leave(cmd.Context(), &rpc.LeaveRequest{
|
||||||
|
Namespace: ns,
|
||||||
Workloads: args,
|
Workloads: args,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
err = util.PrintGRPCStream[rpc.LeaveResponse](leave)
|
err = util.PrintGRPCStream[rpc.LeaveResponse](resp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if status.Code(err) == codes.Canceled {
|
if status.Code(err) == codes.Canceled {
|
||||||
return nil
|
return nil
|
||||||
|
@@ -146,7 +146,7 @@ func CmdProxy(f cmdutil.Factory) *cobra.Command {
|
|||||||
err = util.PrintGRPCStream[rpc.ConnectResponse](client)
|
err = util.PrintGRPCStream[rpc.ConnectResponse](client)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if status.Code(err) == codes.Canceled {
|
if status.Code(err) == codes.Canceled {
|
||||||
err = leave(cli, args)
|
err = leave(cli, ns, args)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
@@ -157,7 +157,7 @@ func CmdProxy(f cmdutil.Factory) *cobra.Command {
|
|||||||
// leave from cluster resources
|
// leave from cluster resources
|
||||||
<-cmd.Context().Done()
|
<-cmd.Context().Done()
|
||||||
|
|
||||||
err = leave(cli, args)
|
err = leave(cli, ns, args)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -176,8 +176,9 @@ func CmdProxy(f cmdutil.Factory) *cobra.Command {
|
|||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
func leave(cli rpc.DaemonClient, args []string) error {
|
func leave(cli rpc.DaemonClient, ns string, args []string) error {
|
||||||
stream, err := cli.Leave(context.Background(), &rpc.LeaveRequest{
|
stream, err := cli.Leave(context.Background(), &rpc.LeaveRequest{
|
||||||
|
Namespace: ns,
|
||||||
Workloads: args,
|
Workloads: args,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@@ -42,10 +42,6 @@ func CmdServe(_ cmdutil.Factory) *cobra.Command {
|
|||||||
rand.Seed(time.Now().UnixNano())
|
rand.Seed(time.Now().UnixNano())
|
||||||
_, _ = maxprocs.Set(maxprocs.Logger(nil))
|
_, _ = maxprocs.Set(maxprocs.Logger(nil))
|
||||||
ctx := cmd.Context()
|
ctx := cmd.Context()
|
||||||
err := handler.Complete(ctx, route)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
servers, err := handler.Parse(*route)
|
servers, err := handler.Parse(*route)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
plog.G(ctx).Errorf("Parse server failed: %v", err)
|
plog.G(ctx).Errorf("Parse server failed: %v", err)
|
||||||
|
@@ -71,8 +71,8 @@ func CmdStatus(f cmdutil.Factory) *cobra.Command {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
for _, config := range configs {
|
for _, conf := range configs {
|
||||||
clusterID, err := GetClusterIDByConfig(cmd, config)
|
clusterID, err := GetClusterIDByConfig(cmd, conf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -157,7 +157,7 @@ func genProxyMsg(w *tabwriter.Writer, list []*rpc.Status) {
|
|||||||
|
|
||||||
_, _ = fmt.Fprintf(w, "\n")
|
_, _ = fmt.Fprintf(w, "\n")
|
||||||
w.SetRememberedWidths(nil)
|
w.SetRememberedWidths(nil)
|
||||||
_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\n", "ID", "Name", "Headers", "IP", "PortMap", "CurrentPC")
|
_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "ID", "Namespace", "Name", "Headers", "IP", "PortMap", "CurrentPC")
|
||||||
for _, c := range list {
|
for _, c := range list {
|
||||||
for _, proxy := range c.ProxyList {
|
for _, proxy := range c.ProxyList {
|
||||||
for _, rule := range proxy.RuleList {
|
for _, rule := range proxy.RuleList {
|
||||||
@@ -172,8 +172,9 @@ func genProxyMsg(w *tabwriter.Writer, list []*rpc.Status) {
|
|||||||
for k, v := range rule.PortMap {
|
for k, v := range rule.PortMap {
|
||||||
portmap = append(portmap, fmt.Sprintf("%d->%d", k, v))
|
portmap = append(portmap, fmt.Sprintf("%d->%d", k, v))
|
||||||
}
|
}
|
||||||
_, _ = fmt.Fprintf(w, "%d\t%s\t%s\t%s\t%s\t%v\n",
|
_, _ = fmt.Fprintf(w, "%d\t%s\t%s\t%s\t%s\t%s\t%v\n",
|
||||||
c.ID,
|
c.ID,
|
||||||
|
proxy.Namespace,
|
||||||
proxy.Workload,
|
proxy.Workload,
|
||||||
strings.Join(headers, ","),
|
strings.Join(headers, ","),
|
||||||
rule.LocalTunIPv4,
|
rule.LocalTunIPv4,
|
||||||
@@ -199,7 +200,7 @@ func genCloneMsg(w *tabwriter.Writer, list []*rpc.Status) {
|
|||||||
|
|
||||||
_, _ = fmt.Fprintf(w, "\n")
|
_, _ = fmt.Fprintf(w, "\n")
|
||||||
w.SetRememberedWidths(nil)
|
w.SetRememberedWidths(nil)
|
||||||
_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "ID", "Name", "Headers", "ToName", "ToKubeconfig", "ToNamespace", "SyncthingGUI")
|
_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "ID", "Namespace", "Name", "Headers", "ToName", "ToKubeconfig", "ToNamespace", "SyncthingGUI")
|
||||||
for _, c := range list {
|
for _, c := range list {
|
||||||
for _, clone := range c.CloneList {
|
for _, clone := range c.CloneList {
|
||||||
//_, _ = fmt.Fprintf(w, "%s\n", clone.Workload)
|
//_, _ = fmt.Fprintf(w, "%s\n", clone.Workload)
|
||||||
@@ -211,8 +212,9 @@ func genCloneMsg(w *tabwriter.Writer, list []*rpc.Status) {
|
|||||||
if len(headers) == 0 {
|
if len(headers) == 0 {
|
||||||
headers = []string{"*"}
|
headers = []string{"*"}
|
||||||
}
|
}
|
||||||
_, _ = fmt.Fprintf(w, "%d\t%s\t%s\t%s\t%s\t%s\t%s\n",
|
_, _ = fmt.Fprintf(w, "%d\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n",
|
||||||
c.ID,
|
c.ID,
|
||||||
|
clone.Namespace,
|
||||||
clone.Workload,
|
clone.Workload,
|
||||||
strings.Join(headers, ","),
|
strings.Join(headers, ","),
|
||||||
rule.DstWorkload,
|
rule.DstWorkload,
|
||||||
|
@@ -14,6 +14,9 @@ const (
|
|||||||
// configmap name
|
// configmap name
|
||||||
ConfigMapPodTrafficManager = "kubevpn-traffic-manager"
|
ConfigMapPodTrafficManager = "kubevpn-traffic-manager"
|
||||||
|
|
||||||
|
// const namespace
|
||||||
|
KubevpnNamespace = "kubevpn-system"
|
||||||
|
|
||||||
// config map keys
|
// config map keys
|
||||||
KeyDHCP = "DHCP"
|
KeyDHCP = "DHCP"
|
||||||
KeyDHCP6 = "DHCP6"
|
KeyDHCP6 = "DHCP6"
|
||||||
|
@@ -38,9 +38,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Virtual struct {
|
type Virtual struct {
|
||||||
Uid string // group.resource.name
|
Namespace string
|
||||||
Ports []ContainerPort
|
Uid string // group.resource.name
|
||||||
Rules []*Rule
|
Ports []ContainerPort
|
||||||
|
Rules []*Rule
|
||||||
}
|
}
|
||||||
|
|
||||||
type ContainerPort struct {
|
type ContainerPort struct {
|
||||||
@@ -100,7 +101,7 @@ func (a *Virtual) To(enableIPv6 bool, logger *log.Logger) (
|
|||||||
for _, port := range a.Ports {
|
for _, port := range a.Ports {
|
||||||
isFargateMode := port.EnvoyListenerPort != 0
|
isFargateMode := port.EnvoyListenerPort != 0
|
||||||
|
|
||||||
listenerName := fmt.Sprintf("%s_%v_%s", a.Uid, util.If(isFargateMode, port.EnvoyListenerPort, port.ContainerPort), port.Protocol)
|
listenerName := fmt.Sprintf("%s_%s_%v_%s", a.Namespace, a.Uid, util.If(isFargateMode, port.EnvoyListenerPort, port.ContainerPort), port.Protocol)
|
||||||
routeName := listenerName
|
routeName := listenerName
|
||||||
listeners = append(listeners, ToListener(listenerName, routeName, util.If(isFargateMode, port.EnvoyListenerPort, port.ContainerPort), port.Protocol, isFargateMode))
|
listeners = append(listeners, ToListener(listenerName, routeName, util.If(isFargateMode, port.EnvoyListenerPort, port.ContainerPort), port.Protocol, isFargateMode))
|
||||||
|
|
||||||
|
@@ -57,7 +57,8 @@ func (p *Processor) ProcessFile(file NotifyMessage) error {
|
|||||||
if len(config.Uid) == 0 {
|
if len(config.Uid) == 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
lastConfig, ok := p.expireCache.Get(config.Uid)
|
uid := fmt.Sprintf("%s_%s", config.Namespace, config.Uid)
|
||||||
|
lastConfig, ok := p.expireCache.Get(uid)
|
||||||
if ok && reflect.DeepEqual(lastConfig.(*Virtual), config) {
|
if ok && reflect.DeepEqual(lastConfig.(*Virtual), config) {
|
||||||
marshal, _ := json.Marshal(config)
|
marshal, _ := json.Marshal(config)
|
||||||
p.logger.Debugf("config are same, not needs to update, config: %s", string(marshal))
|
p.logger.Debugf("config are same, not needs to update, config: %s", string(marshal))
|
||||||
@@ -86,13 +87,13 @@ func (p *Processor) ProcessFile(file NotifyMessage) error {
|
|||||||
p.logger.Errorf("snapshot inconsistency: %v, err: %v", snapshot, err)
|
p.logger.Errorf("snapshot inconsistency: %v, err: %v", snapshot, err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
p.logger.Debugf("will serve snapshot %+v, nodeID: %s", snapshot, config.Uid)
|
p.logger.Debugf("will serve snapshot %+v, nodeID: %s", snapshot, uid)
|
||||||
if err = p.cache.SetSnapshot(context.Background(), config.Uid, snapshot); err != nil {
|
if err = p.cache.SetSnapshot(context.Background(), uid, snapshot); err != nil {
|
||||||
p.logger.Errorf("snapshot error %q for %v", err, snapshot)
|
p.logger.Errorf("snapshot error %q for %v", err, snapshot)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
p.expireCache.Set(config.Uid, config, time.Minute*5)
|
p.expireCache.Set(uid, config, time.Minute*5)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@@ -128,8 +128,8 @@ func (svr *Server) redirectConnectForkToSudoDaemon(req *rpc.ConnectRequest, resp
|
|||||||
for _, options := range svr.secondaryConnect {
|
for _, options := range svr.secondaryConnect {
|
||||||
isSameCluster, _ := util.IsSameCluster(
|
isSameCluster, _ := util.IsSameCluster(
|
||||||
sshCtx,
|
sshCtx,
|
||||||
options.GetClientset().CoreV1().ConfigMaps(options.Namespace), options.Namespace,
|
options.GetClientset().CoreV1(), options.Namespace,
|
||||||
connect.GetClientset().CoreV1().ConfigMaps(connect.Namespace), connect.Namespace,
|
connect.GetClientset().CoreV1(), connect.Namespace,
|
||||||
)
|
)
|
||||||
if isSameCluster {
|
if isSameCluster {
|
||||||
// same cluster, do nothing
|
// same cluster, do nothing
|
||||||
|
@@ -143,8 +143,8 @@ func (svr *Server) redirectToSudoDaemon(req *rpc.ConnectRequest, resp rpc.Daemon
|
|||||||
if svr.connect != nil {
|
if svr.connect != nil {
|
||||||
isSameCluster, _ := util.IsSameCluster(
|
isSameCluster, _ := util.IsSameCluster(
|
||||||
sshCtx,
|
sshCtx,
|
||||||
svr.connect.GetClientset().CoreV1().ConfigMaps(svr.connect.Namespace), svr.connect.Namespace,
|
svr.connect.GetClientset().CoreV1(), svr.connect.Namespace,
|
||||||
connect.GetClientset().CoreV1().ConfigMaps(connect.Namespace), connect.Namespace,
|
connect.GetClientset().CoreV1(), connect.Namespace,
|
||||||
)
|
)
|
||||||
if isSameCluster {
|
if isSameCluster {
|
||||||
// same cluster, do nothing
|
// same cluster, do nothing
|
||||||
|
@@ -156,8 +156,8 @@ func disconnect(ctx context.Context, svr *Server, connect *handler.ConnectOption
|
|||||||
if svr.connect != nil {
|
if svr.connect != nil {
|
||||||
isSameCluster, _ := util.IsSameCluster(
|
isSameCluster, _ := util.IsSameCluster(
|
||||||
ctx,
|
ctx,
|
||||||
svr.connect.GetClientset().CoreV1().ConfigMaps(svr.connect.Namespace), svr.connect.Namespace,
|
svr.connect.GetClientset().CoreV1(), svr.connect.Namespace,
|
||||||
connect.GetClientset().CoreV1().ConfigMaps(connect.Namespace), connect.Namespace,
|
connect.GetClientset().CoreV1(), connect.Namespace,
|
||||||
)
|
)
|
||||||
if isSameCluster {
|
if isSameCluster {
|
||||||
plog.G(ctx).Infof("Disconnecting from the cluster...")
|
plog.G(ctx).Infof("Disconnecting from the cluster...")
|
||||||
@@ -170,8 +170,8 @@ func disconnect(ctx context.Context, svr *Server, connect *handler.ConnectOption
|
|||||||
options := svr.secondaryConnect[i]
|
options := svr.secondaryConnect[i]
|
||||||
isSameCluster, _ := util.IsSameCluster(
|
isSameCluster, _ := util.IsSameCluster(
|
||||||
ctx,
|
ctx,
|
||||||
options.GetClientset().CoreV1().ConfigMaps(options.Namespace), options.Namespace,
|
options.GetClientset().CoreV1(), options.Namespace,
|
||||||
connect.GetClientset().CoreV1().ConfigMaps(connect.Namespace), connect.Namespace,
|
connect.GetClientset().CoreV1(), connect.Namespace,
|
||||||
)
|
)
|
||||||
if isSameCluster {
|
if isSameCluster {
|
||||||
plog.G(ctx).Infof("Disconnecting from the cluster...")
|
plog.G(ctx).Infof("Disconnecting from the cluster...")
|
||||||
|
@@ -25,10 +25,10 @@ func (svr *Server) Leave(req *rpc.LeaveRequest, resp rpc.Daemon_LeaveServer) err
|
|||||||
|
|
||||||
factory := svr.connect.GetFactory()
|
factory := svr.connect.GetFactory()
|
||||||
namespace := svr.connect.Namespace
|
namespace := svr.connect.Namespace
|
||||||
maps := svr.connect.GetClientset().CoreV1().ConfigMaps(namespace)
|
mapInterface := svr.connect.GetClientset().CoreV1().ConfigMaps(namespace)
|
||||||
v4, _ := svr.connect.GetLocalTunIP()
|
v4, _ := svr.connect.GetLocalTunIP()
|
||||||
for _, workload := range req.GetWorkloads() {
|
for _, workload := range req.GetWorkloads() {
|
||||||
object, err := util.GetUnstructuredObject(factory, namespace, workload)
|
object, err := util.GetUnstructuredObject(factory, req.Namespace, workload)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Errorf("Failed to get unstructured object: %v", err)
|
logger.Errorf("Failed to get unstructured object: %v", err)
|
||||||
return err
|
return err
|
||||||
@@ -41,9 +41,9 @@ func (svr *Server) Leave(req *rpc.LeaveRequest, resp rpc.Daemon_LeaveServer) err
|
|||||||
}
|
}
|
||||||
// add rollback func to remove envoy config
|
// add rollback func to remove envoy config
|
||||||
var empty bool
|
var empty bool
|
||||||
empty, err = inject.UnPatchContainer(ctx, factory, maps, object, func(isFargateMode bool, rule *controlplane.Rule) bool {
|
empty, err = inject.UnPatchContainer(ctx, factory, mapInterface, object, func(isFargateMode bool, rule *controlplane.Rule) bool {
|
||||||
if isFargateMode {
|
if isFargateMode {
|
||||||
return svr.connect.IsMe(util.ConvertWorkloadToUid(workload), rule.Headers)
|
return svr.connect.IsMe(req.Namespace, util.ConvertWorkloadToUid(workload), rule.Headers)
|
||||||
}
|
}
|
||||||
return rule.LocalTunIPv4 == v4
|
return rule.LocalTunIPv4 == v4
|
||||||
})
|
})
|
||||||
@@ -52,10 +52,10 @@ func (svr *Server) Leave(req *rpc.LeaveRequest, resp rpc.Daemon_LeaveServer) err
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if empty {
|
if empty {
|
||||||
err = inject.ModifyServiceTargetPort(ctx, svr.connect.GetClientset(), namespace, templateSpec.Labels, map[int32]int32{})
|
err = inject.ModifyServiceTargetPort(ctx, svr.connect.GetClientset(), req.Namespace, templateSpec.Labels, map[int32]int32{})
|
||||||
}
|
}
|
||||||
svr.connect.LeavePortMap(workload)
|
svr.connect.LeavePortMap(req.Namespace, workload)
|
||||||
err = util.RolloutStatus(ctx, factory, namespace, workload, time.Minute*60)
|
err = util.RolloutStatus(ctx, factory, req.Namespace, workload, time.Minute*60)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@@ -28,13 +28,6 @@ func (svr *Server) Proxy(req *rpc.ProxyRequest, resp rpc.Daemon_ProxyServer) (e
|
|||||||
logger := plog.GetLoggerForClient(int32(log.InfoLevel), io.MultiWriter(newProxyWarp(resp), svr.LogFile))
|
logger := plog.GetLoggerForClient(int32(log.InfoLevel), io.MultiWriter(newProxyWarp(resp), svr.LogFile))
|
||||||
config.Image = req.Image
|
config.Image = req.Image
|
||||||
ctx := plog.WithLogger(resp.Context(), logger)
|
ctx := plog.WithLogger(resp.Context(), logger)
|
||||||
connect := &handler.ConnectOptions{
|
|
||||||
Namespace: req.Namespace,
|
|
||||||
ExtraRouteInfo: *handler.ParseExtraRouteFromRPC(req.ExtraRoute),
|
|
||||||
Engine: config.Engine(req.Engine),
|
|
||||||
OriginKubeconfigPath: req.OriginKubeconfigPath,
|
|
||||||
ImagePullSecretName: req.ImagePullSecretName,
|
|
||||||
}
|
|
||||||
var sshConf = ssh.ParseSshFromRPC(req.SshJump)
|
var sshConf = ssh.ParseSshFromRPC(req.SshJump)
|
||||||
|
|
||||||
file, err := util.ConvertToTempKubeconfigFile([]byte(req.KubeconfigBytes))
|
file, err := util.ConvertToTempKubeconfigFile([]byte(req.KubeconfigBytes))
|
||||||
@@ -51,12 +44,19 @@ func (svr *Server) Proxy(req *rpc.ProxyRequest, resp rpc.Daemon_ProxyServer) (e
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
connect := &handler.ConnectOptions{
|
||||||
|
Namespace: req.Namespace,
|
||||||
|
ExtraRouteInfo: *handler.ParseExtraRouteFromRPC(req.ExtraRoute),
|
||||||
|
Engine: config.Engine(req.Engine),
|
||||||
|
OriginKubeconfigPath: req.OriginKubeconfigPath,
|
||||||
|
ImagePullSecretName: req.ImagePullSecretName,
|
||||||
|
}
|
||||||
err = connect.InitClient(util.InitFactoryByPath(path, req.Namespace))
|
err = connect.InitClient(util.InitFactoryByPath(path, req.Namespace))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
var workloads []string
|
var workloads []string
|
||||||
workloads, err = util.NormalizedResource(ctx, connect.GetFactory(), connect.GetClientset(), connect.Namespace, req.Workloads)
|
workloads, err = util.NormalizedResource(ctx, connect.GetFactory(), connect.GetClientset(), req.Namespace, req.Workloads)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -74,8 +74,8 @@ func (svr *Server) Proxy(req *rpc.ProxyRequest, resp rpc.Daemon_ProxyServer) (e
|
|||||||
if svr.connect != nil {
|
if svr.connect != nil {
|
||||||
isSameCluster, _ := util.IsSameCluster(
|
isSameCluster, _ := util.IsSameCluster(
|
||||||
ctx,
|
ctx,
|
||||||
svr.connect.GetClientset().CoreV1().ConfigMaps(svr.connect.Namespace), svr.connect.Namespace,
|
svr.connect.GetClientset().CoreV1(), svr.connect.Namespace,
|
||||||
connect.GetClientset().CoreV1().ConfigMaps(connect.Namespace), connect.Namespace,
|
connect.GetClientset().CoreV1(), connect.Namespace,
|
||||||
)
|
)
|
||||||
if isSameCluster {
|
if isSameCluster {
|
||||||
// same cluster, do nothing
|
// same cluster, do nothing
|
||||||
@@ -85,7 +85,7 @@ func (svr *Server) Proxy(req *rpc.ProxyRequest, resp rpc.Daemon_ProxyServer) (e
|
|||||||
var disconnectResp rpc.Daemon_DisconnectClient
|
var disconnectResp rpc.Daemon_DisconnectClient
|
||||||
disconnectResp, err = daemonClient.Disconnect(ctx, &rpc.DisconnectRequest{
|
disconnectResp, err = daemonClient.Disconnect(ctx, &rpc.DisconnectRequest{
|
||||||
KubeconfigBytes: ptr.To(req.KubeconfigBytes),
|
KubeconfigBytes: ptr.To(req.KubeconfigBytes),
|
||||||
Namespace: ptr.To(connect.Namespace),
|
Namespace: ptr.To(req.Namespace),
|
||||||
SshJump: sshConf.ToRPC(),
|
SshJump: sshConf.ToRPC(),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -117,7 +117,7 @@ func (svr *Server) Proxy(req *rpc.ProxyRequest, resp rpc.Daemon_ProxyServer) (e
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err = svr.connect.CreateRemoteInboundPod(ctx, workloads, req.Headers, req.PortMap)
|
err = svr.connect.CreateRemoteInboundPod(ctx, req.Namespace, workloads, req.Headers, req.PortMap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
plog.G(ctx).Errorf("Failed to inject inbound sidecar: %v", err)
|
plog.G(ctx).Errorf("Failed to inject inbound sidecar: %v", err)
|
||||||
return err
|
return err
|
||||||
|
@@ -15,9 +15,6 @@ import (
|
|||||||
|
|
||||||
func (svr *Server) Reset(req *rpc.ResetRequest, resp rpc.Daemon_ResetServer) error {
|
func (svr *Server) Reset(req *rpc.ResetRequest, resp rpc.Daemon_ResetServer) error {
|
||||||
logger := plog.GetLoggerForClient(int32(log.InfoLevel), io.MultiWriter(newResetWarp(resp), svr.LogFile))
|
logger := plog.GetLoggerForClient(int32(log.InfoLevel), io.MultiWriter(newResetWarp(resp), svr.LogFile))
|
||||||
connect := &handler.ConnectOptions{
|
|
||||||
Namespace: req.Namespace,
|
|
||||||
}
|
|
||||||
|
|
||||||
file, err := util.ConvertToTempKubeconfigFile([]byte(req.KubeconfigBytes))
|
file, err := util.ConvertToTempKubeconfigFile([]byte(req.KubeconfigBytes))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -35,11 +32,12 @@ func (svr *Server) Reset(req *rpc.ResetRequest, resp rpc.Daemon_ResetServer) err
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
connect := &handler.ConnectOptions{}
|
||||||
err = connect.InitClient(util.InitFactoryByPath(path, req.Namespace))
|
err = connect.InitClient(util.InitFactoryByPath(path, req.Namespace))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
err = connect.Reset(ctx, req.Workloads)
|
err = connect.Reset(ctx, req.Namespace, req.Workloads)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@@ -108,18 +108,21 @@ func gen(ctx context.Context, connect *handler.ConnectOptions, clone *handler.Cl
|
|||||||
var proxyRule []*rpc.ProxyRule
|
var proxyRule []*rpc.ProxyRule
|
||||||
for _, rule := range virtual.Rules {
|
for _, rule := range virtual.Rules {
|
||||||
proxyRule = append(proxyRule, &rpc.ProxyRule{
|
proxyRule = append(proxyRule, &rpc.ProxyRule{
|
||||||
Headers: rule.Headers,
|
Headers: rule.Headers,
|
||||||
LocalTunIPv4: rule.LocalTunIPv4,
|
LocalTunIPv4: rule.LocalTunIPv4,
|
||||||
LocalTunIPv6: rule.LocalTunIPv6,
|
LocalTunIPv6: rule.LocalTunIPv6,
|
||||||
CurrentDevice: util.If(isFargateMode, connect.IsMe(util.ConvertWorkloadToUid(virtual.Uid), rule.Headers), v4 == rule.LocalTunIPv4 && v6 == rule.LocalTunIPv6),
|
CurrentDevice: util.If(isFargateMode,
|
||||||
PortMap: useSecondPort(rule.PortMap),
|
connect.IsMe(virtual.Namespace, util.ConvertWorkloadToUid(virtual.Uid), rule.Headers),
|
||||||
|
v4 == rule.LocalTunIPv4 && v6 == rule.LocalTunIPv6,
|
||||||
|
),
|
||||||
|
PortMap: useSecondPort(rule.PortMap),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
proxyList = append(proxyList, &rpc.Proxy{
|
proxyList = append(proxyList, &rpc.Proxy{
|
||||||
ClusterID: connect.GetClusterID(),
|
ClusterID: connect.GetClusterID(),
|
||||||
Cluster: util.GetKubeconfigCluster(connect.GetFactory()),
|
Cluster: util.GetKubeconfigCluster(connect.GetFactory()),
|
||||||
Kubeconfig: connect.OriginKubeconfigPath,
|
Kubeconfig: connect.OriginKubeconfigPath,
|
||||||
Namespace: connect.Namespace,
|
Namespace: virtual.Namespace,
|
||||||
Workload: virtual.Uid,
|
Workload: virtual.Uid,
|
||||||
RuleList: proxyRule,
|
RuleList: proxyRule,
|
||||||
})
|
})
|
||||||
|
@@ -545,7 +545,8 @@ type LeaveRequest struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Workloads []string `protobuf:"bytes,1,rep,name=Workloads,proto3" json:"Workloads,omitempty"`
|
Namespace string `protobuf:"bytes,1,opt,name=Namespace,proto3" json:"Namespace,omitempty"`
|
||||||
|
Workloads []string `protobuf:"bytes,2,rep,name=Workloads,proto3" json:"Workloads,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *LeaveRequest) Reset() {
|
func (x *LeaveRequest) Reset() {
|
||||||
@@ -580,6 +581,13 @@ func (*LeaveRequest) Descriptor() ([]byte, []int) {
|
|||||||
return file_daemon_proto_rawDescGZIP(), []int{6}
|
return file_daemon_proto_rawDescGZIP(), []int{6}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *LeaveRequest) GetNamespace() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Namespace
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
func (x *LeaveRequest) GetWorkloads() []string {
|
func (x *LeaveRequest) GetWorkloads() []string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Workloads
|
return x.Workloads
|
||||||
@@ -3176,371 +3184,373 @@ var file_daemon_proto_rawDesc = []byte{
|
|||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
||||||
0x01, 0x22, 0x29, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
0x01, 0x22, 0x29, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20,
|
0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2c, 0x0a, 0x0c,
|
0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x4a, 0x0a, 0x0c,
|
||||||
0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09,
|
0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09,
|
||||||
0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52,
|
0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x09, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x22, 0x29, 0x0a, 0x0d, 0x4c, 0x65,
|
0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x57, 0x6f,
|
||||||
0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d,
|
0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x57,
|
||||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
|
0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x22, 0x29, 0x0a, 0x0d, 0x4c, 0x65, 0x61, 0x76,
|
||||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xcf, 0x06, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52,
|
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73,
|
||||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f,
|
0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,
|
||||||
0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x61, 0x67, 0x65, 0x22, 0xcf, 0x06, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71,
|
||||||
0x0f, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73,
|
|
||||||
0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20,
|
|
||||||
0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x38,
|
|
||||||
0x0a, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
|
||||||
0x1e, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
|
|
||||||
0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
|
|
||||||
0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6b,
|
|
||||||
0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x57, 0x6f, 0x72,
|
|
||||||
0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65,
|
|
||||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x2f,
|
|
||||||
0x0a, 0x0a, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01,
|
|
||||||
0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x6f,
|
|
||||||
0x75, 0x74, 0x65, 0x52, 0x0a, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12,
|
|
||||||
0x26, 0x0a, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
|
|
||||||
0x32, 0x0c, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x52, 0x07,
|
|
||||||
0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x12, 0x2a, 0x0a, 0x10, 0x54, 0x61, 0x72, 0x67, 0x65,
|
|
||||||
0x74, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28,
|
|
||||||
0x09, 0x52, 0x10, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e,
|
|
||||||
0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, 0x0f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x61, 0x6d,
|
|
||||||
0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x54, 0x61,
|
|
||||||
0x72, 0x67, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x28, 0x0a,
|
|
||||||
0x0f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
|
|
||||||
0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f,
|
|
||||||
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x54, 0x61, 0x72, 0x67, 0x65,
|
|
||||||
0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x54, 0x61,
|
|
||||||
0x72, 0x67, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x54, 0x61, 0x72,
|
|
||||||
0x67, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28,
|
|
||||||
0x09, 0x52, 0x0e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
|
|
||||||
0x79, 0x12, 0x36, 0x0a, 0x16, 0x49, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x72,
|
|
||||||
0x67, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28,
|
|
||||||
0x08, 0x52, 0x16, 0x49, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65,
|
|
||||||
0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x12, 0x24, 0x0a, 0x0d, 0x54, 0x72, 0x61,
|
|
||||||
0x6e, 0x73, 0x66, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08,
|
|
||||||
0x52, 0x0d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12,
|
|
||||||
0x14, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
|
||||||
0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x75,
|
|
||||||
0x6c, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01,
|
|
||||||
0x28, 0x09, 0x52, 0x13, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x65, 0x63,
|
|
||||||
0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c,
|
|
||||||
0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x32, 0x0a,
|
|
||||||
0x14, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
|
||||||
0x67, 0x50, 0x61, 0x74, 0x68, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x4f, 0x72, 0x69,
|
|
||||||
0x67, 0x69, 0x6e, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x61, 0x74,
|
|
||||||
0x68, 0x12, 0x1a, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x44, 0x69, 0x72, 0x18, 0x14, 0x20,
|
|
||||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x44, 0x69, 0x72, 0x12, 0x1c, 0x0a,
|
|
||||||
0x09, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x44, 0x69, 0x72, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09,
|
|
||||||
0x52, 0x09, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x44, 0x69, 0x72, 0x1a, 0x3a, 0x0a, 0x0c, 0x48,
|
|
||||||
0x65, 0x61, 0x64, 0x65, 0x72, 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, 0x29, 0x0a, 0x0d, 0x43, 0x6c, 0x6f, 0x6e, 0x65,
|
|
||||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73,
|
|
||||||
0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
|
|
||||||
0x67, 0x65, 0x22, 0x2d, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75,
|
|
||||||
0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73,
|
|
||||||
0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64,
|
|
||||||
0x73, 0x22, 0x2a, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
|
||||||
0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01,
|
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x0d, 0x0a,
|
|
||||||
0x0b, 0x51, 0x75, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x28, 0x0a, 0x0c,
|
|
||||||
0x51, 0x75, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07,
|
|
||||||
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d,
|
|
||||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
|
||||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x6c, 0x75, 0x73, 0x74,
|
|
||||||
0x65, 0x72, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x43, 0x6c, 0x75,
|
|
||||||
0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x73, 0x22, 0x31, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75,
|
|
||||||
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x4c, 0x69, 0x73,
|
|
||||||
0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74,
|
|
||||||
0x61, 0x74, 0x75, 0x73, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xa4, 0x02, 0x0a, 0x06, 0x53,
|
|
||||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
||||||
0x05, 0x52, 0x02, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
|
|
||||||
0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65,
|
|
||||||
0x72, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03,
|
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a,
|
|
||||||
0x04, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4d, 0x6f, 0x64,
|
|
||||||
0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18,
|
|
||||||
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
|
||||||
0x67, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x06,
|
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12,
|
|
||||||
0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
|
|
||||||
0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x4e, 0x65, 0x74, 0x69, 0x66,
|
|
||||||
0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4e, 0x65, 0x74, 0x69, 0x66, 0x12, 0x28, 0x0a,
|
|
||||||
0x09, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b,
|
|
||||||
0x32, 0x0a, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x09, 0x50, 0x72,
|
|
||||||
0x6f, 0x78, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x09, 0x43, 0x6c, 0x6f, 0x6e, 0x65,
|
|
||||||
0x4c, 0x69, 0x73, 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x72, 0x70, 0x63,
|
|
||||||
0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x09, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x4c, 0x69, 0x73,
|
|
||||||
0x74, 0x22, 0xc5, 0x01, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x43,
|
|
||||||
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
|
||||||
0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x6c, 0x75,
|
|
||||||
0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x6c, 0x75, 0x73,
|
|
||||||
0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
|
||||||
0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e,
|
|
||||||
0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
|
|
||||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
|
|
||||||
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x05, 0x20,
|
|
||||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2a, 0x0a,
|
|
||||||
0x08, 0x52, 0x75, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
|
||||||
0x0e, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x52,
|
|
||||||
0x08, 0x52, 0x75, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xdf, 0x02, 0x0a, 0x09, 0x50, 0x72,
|
|
||||||
0x6f, 0x78, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65,
|
|
||||||
0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50,
|
|
||||||
0x72, 0x6f, 0x78, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73,
|
|
||||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x22,
|
|
||||||
0x0a, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x75, 0x6e, 0x49, 0x50, 0x76, 0x34, 0x18, 0x02,
|
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x75, 0x6e, 0x49, 0x50,
|
|
||||||
0x76, 0x34, 0x12, 0x22, 0x0a, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x75, 0x6e, 0x49, 0x50,
|
|
||||||
0x76, 0x36, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54,
|
|
||||||
0x75, 0x6e, 0x49, 0x50, 0x76, 0x36, 0x12, 0x24, 0x0a, 0x0d, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e,
|
|
||||||
0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x43,
|
|
||||||
0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x07,
|
|
||||||
0x50, 0x6f, 0x72, 0x74, 0x4d, 0x61, 0x70, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e,
|
|
||||||
0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x50, 0x6f,
|
|
||||||
0x72, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x50, 0x6f, 0x72, 0x74,
|
|
||||||
0x4d, 0x61, 0x70, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 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,
|
|
||||||
0x3a, 0x0a, 0x0c, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
|
|
||||||
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65,
|
|
||||||
0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
|
||||||
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf1, 0x01, 0x0a, 0x05,
|
|
||||||
0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
|
|
||||||
0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65,
|
|
||||||
0x72, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02,
|
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a,
|
|
||||||
0x0a, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28,
|
|
||||||
0x09, 0x52, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a,
|
|
||||||
0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
|
|
||||||
0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x57,
|
|
||||||
0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x57,
|
|
||||||
0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x74,
|
|
||||||
0x68, 0x69, 0x6e, 0x67, 0x47, 0x55, 0x49, 0x41, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28,
|
|
||||||
0x09, 0x52, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x47, 0x55, 0x49, 0x41,
|
|
||||||
0x64, 0x64, 0x72, 0x12, 0x2a, 0x0a, 0x08, 0x52, 0x75, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x18,
|
|
||||||
0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x6e,
|
|
||||||
0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x08, 0x52, 0x75, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22,
|
|
||||||
0xae, 0x02, 0x0a, 0x09, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x35, 0x0a,
|
|
||||||
0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b,
|
|
||||||
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x48,
|
|
||||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x48, 0x65, 0x61,
|
|
||||||
0x64, 0x65, 0x72, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x44, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74,
|
|
||||||
0x65, 0x72, 0x49, 0x44, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x44, 0x73, 0x74, 0x43,
|
|
||||||
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x73, 0x74, 0x43,
|
|
||||||
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x44, 0x73,
|
|
||||||
0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x44, 0x73, 0x74, 0x4b,
|
|
||||||
0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52,
|
|
||||||
0x0d, 0x44, 0x73, 0x74, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x22,
|
|
||||||
0x0a, 0x0c, 0x44, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0c,
|
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x44, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
|
|
||||||
0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61,
|
|
||||||
0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x44, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b,
|
|
||||||
0x6c, 0x6f, 0x61, 0x64, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 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, 0x10, 0x0a, 0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
|
||||||
0x73, 0x74, 0x22, 0x2b, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
|
|
||||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22,
|
|
||||||
0x82, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71,
|
|
||||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66,
|
0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66,
|
||||||
0x69, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x4b,
|
0x69, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x4b,
|
||||||
0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1c,
|
0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1c,
|
||||||
0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x07,
|
0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x07,
|
||||||
0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e,
|
0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
|
||||||
0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x52, 0x07, 0x53, 0x73, 0x68,
|
0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
0x4a, 0x75, 0x6d, 0x70, 0x22, 0x2d, 0x0a, 0x0f, 0x53, 0x73, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74,
|
0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x48,
|
||||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6c, 0x69, 0x65, 0x6e,
|
0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f,
|
||||||
0x74, 0x49, 0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, 0x6c, 0x69, 0x65, 0x6e,
|
0x61, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x6c,
|
||||||
0x74, 0x49, 0x50, 0x22, 0x2e, 0x0a, 0x10, 0x53, 0x73, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52,
|
0x6f, 0x61, 0x64, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x06,
|
||||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x65, 0x72, 0x76, 0x65,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x2f, 0x0a, 0x0a,
|
||||||
0x72, 0x49, 0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x53, 0x65, 0x72, 0x76, 0x65,
|
0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b,
|
||||||
0x72, 0x49, 0x50, 0x22, 0x2c, 0x0a, 0x0e, 0x53, 0x73, 0x68, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65,
|
0x32, 0x0f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x6f, 0x75, 0x74,
|
||||||
|
0x65, 0x52, 0x0a, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x26, 0x0a,
|
||||||
|
0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c,
|
||||||
|
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x52, 0x07, 0x53, 0x73,
|
||||||
|
0x68, 0x4a, 0x75, 0x6d, 0x70, 0x12, 0x2a, 0x0a, 0x10, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b,
|
||||||
|
0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
|
0x10, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
||||||
|
0x67, 0x12, 0x28, 0x0a, 0x0f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73,
|
||||||
|
0x70, 0x61, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x54, 0x61, 0x72, 0x67,
|
||||||
|
0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x54,
|
||||||
|
0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x0b,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74,
|
||||||
|
0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49,
|
||||||
|
0x6d, 0x61, 0x67, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x54, 0x61, 0x72, 0x67,
|
||||||
|
0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x54, 0x61, 0x72, 0x67, 0x65,
|
||||||
|
0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
|
0x0e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x12,
|
||||||
|
0x36, 0x0a, 0x16, 0x49, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65,
|
||||||
|
0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||||
|
0x16, 0x49, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52,
|
||||||
|
0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x12, 0x24, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x6e, 0x73,
|
||||||
|
0x66, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d,
|
||||||
|
0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a,
|
||||||
|
0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x49, 0x6d,
|
||||||
|
0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x75, 0x6c, 0x6c,
|
||||||
|
0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x13, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65,
|
||||||
|
0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x12,
|
||||||
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x32, 0x0a, 0x14, 0x4f,
|
||||||
|
0x72, 0x69, 0x67, 0x69, 0x6e, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50,
|
||||||
|
0x61, 0x74, 0x68, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x4f, 0x72, 0x69, 0x67, 0x69,
|
||||||
|
0x6e, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12,
|
||||||
|
0x1a, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x44, 0x69, 0x72, 0x18, 0x14, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x52, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x44, 0x69, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x52,
|
||||||
|
0x65, 0x6d, 0x6f, 0x74, 0x65, 0x44, 0x69, 0x72, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||||
|
0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x44, 0x69, 0x72, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61,
|
||||||
|
0x64, 0x65, 0x72, 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, 0x29, 0x0a, 0x0d, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x65,
|
||||||
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||||
|
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||||
|
0x22, 0x2d, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
|
0x74, 0x12, 0x1c, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x01,
|
||||||
|
0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x22,
|
||||||
|
0x2a, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||||
|
0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x51,
|
||||||
|
0x75, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x28, 0x0a, 0x0c, 0x51, 0x75,
|
||||||
|
0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65,
|
||||||
|
0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73,
|
||||||
|
0x73, 0x61, 0x67, 0x65, 0x22, 0x2f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
|
||||||
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
|
||||||
|
0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x43, 0x6c, 0x75, 0x73, 0x74,
|
||||||
|
0x65, 0x72, 0x49, 0x44, 0x73, 0x22, 0x31, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
|
||||||
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18,
|
||||||
|
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74,
|
||||||
|
0x75, 0x73, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xa4, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61,
|
||||||
|
0x74, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||||
|
0x02, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44,
|
||||||
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49,
|
||||||
|
0x44, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4d,
|
||||||
|
0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12,
|
||||||
|
0x1e, 0x0a, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x52, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
|
||||||
|
0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a,
|
||||||
|
0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53,
|
||||||
|
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x4e, 0x65, 0x74, 0x69, 0x66, 0x18, 0x08,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4e, 0x65, 0x74, 0x69, 0x66, 0x12, 0x28, 0x0a, 0x09, 0x50,
|
||||||
|
0x72, 0x6f, 0x78, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a,
|
||||||
|
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x09, 0x50, 0x72, 0x6f, 0x78,
|
||||||
|
0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x09, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x4c, 0x69,
|
||||||
|
0x73, 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43,
|
||||||
|
0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x09, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22,
|
||||||
|
0xc5, 0x01, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x6c, 0x75,
|
||||||
|
0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x6c,
|
||||||
|
0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74,
|
||||||
|
0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65,
|
||||||
|
0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18,
|
||||||
|
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
||||||
|
0x67, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12,
|
||||||
|
0x1a, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x52, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x52,
|
||||||
|
0x75, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e,
|
||||||
|
0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x08, 0x52,
|
||||||
|
0x75, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xdf, 0x02, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x78,
|
||||||
|
0x79, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73,
|
||||||
|
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f,
|
||||||
|
0x78, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e,
|
||||||
|
0x74, 0x72, 0x79, 0x52, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x22, 0x0a, 0x0c,
|
||||||
|
0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x75, 0x6e, 0x49, 0x50, 0x76, 0x34, 0x18, 0x02, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x75, 0x6e, 0x49, 0x50, 0x76, 0x34,
|
||||||
|
0x12, 0x22, 0x0a, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x75, 0x6e, 0x49, 0x50, 0x76, 0x36,
|
||||||
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x75, 0x6e,
|
||||||
|
0x49, 0x50, 0x76, 0x36, 0x12, 0x24, 0x0a, 0x0d, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x44,
|
||||||
|
0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x43, 0x75, 0x72,
|
||||||
|
0x72, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x50, 0x6f,
|
||||||
|
0x72, 0x74, 0x4d, 0x61, 0x70, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72, 0x70,
|
||||||
|
0x63, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x50, 0x6f, 0x72, 0x74,
|
||||||
|
0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x61,
|
||||||
|
0x70, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 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, 0x3a, 0x0a,
|
||||||
|
0x0c, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
|
||||||
|
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
|
||||||
|
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
|
||||||
|
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf1, 0x01, 0x0a, 0x05, 0x43, 0x6c,
|
||||||
|
0x6f, 0x6e, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44,
|
||||||
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49,
|
||||||
|
0x44, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x4b,
|
||||||
|
0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
|
0x0a, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x4e,
|
||||||
|
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||||
|
0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x57, 0x6f, 0x72,
|
||||||
|
0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x57, 0x6f, 0x72,
|
||||||
|
0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x74, 0x68, 0x69,
|
||||||
|
0x6e, 0x67, 0x47, 0x55, 0x49, 0x41, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
|
0x10, 0x53, 0x79, 0x6e, 0x63, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x47, 0x55, 0x49, 0x41, 0x64, 0x64,
|
||||||
|
0x72, 0x12, 0x2a, 0x0a, 0x08, 0x52, 0x75, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x07, 0x20,
|
||||||
|
0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52,
|
||||||
|
0x75, 0x6c, 0x65, 0x52, 0x08, 0x52, 0x75, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xae, 0x02,
|
||||||
|
0x0a, 0x09, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x48,
|
||||||
|
0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72,
|
||||||
|
0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x48, 0x65, 0x61,
|
||||||
|
0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65,
|
||||||
|
0x72, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x44, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
|
||||||
|
0x49, 0x44, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x44, 0x73, 0x74, 0x43, 0x6c, 0x75,
|
||||||
|
0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x73, 0x74, 0x43, 0x6c, 0x75,
|
||||||
|
0x73, 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x44, 0x73, 0x74, 0x43,
|
||||||
|
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x44, 0x73, 0x74, 0x4b, 0x75, 0x62,
|
||||||
|
0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x44,
|
||||||
|
0x73, 0x74, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x22, 0x0a, 0x0c,
|
||||||
|
0x44, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0c, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x0c, 0x44, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||||
|
0x12, 0x20, 0x0a, 0x0b, 0x44, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x18,
|
||||||
|
0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x44, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f,
|
||||||
|
0x61, 0x64, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 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, 0x10,
|
||||||
|
0x0a, 0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
|
0x22, 0x2b, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
|
0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x82, 0x01,
|
||||||
|
0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||||
|
0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||||
|
0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x4b, 0x75, 0x62,
|
||||||
|
0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09,
|
||||||
|
0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
|
0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x53, 0x73,
|
||||||
|
0x68, 0x4a, 0x75, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x72, 0x70,
|
||||||
|
0x63, 0x2e, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x52, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75,
|
||||||
|
0x6d, 0x70, 0x22, 0x2d, 0x0a, 0x0f, 0x53, 0x73, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65,
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49,
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49,
|
||||||
0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49,
|
0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49,
|
||||||
0x50, 0x22, 0x2d, 0x0a, 0x0f, 0x53, 0x73, 0x68, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70,
|
0x50, 0x22, 0x2e, 0x0a, 0x10, 0x53, 0x73, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73,
|
||||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x50,
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x50,
|
0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49,
|
||||||
0x22, 0x51, 0x0a, 0x11, 0x53, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65,
|
0x50, 0x22, 0x2c, 0x0a, 0x0e, 0x53, 0x73, 0x68, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75,
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x64, 0x69, 0x6e, 0x18, 0x01,
|
0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x50, 0x18,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x53, 0x74, 0x64, 0x69, 0x6e, 0x12, 0x26, 0x0a, 0x07, 0x53,
|
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x50, 0x22,
|
||||||
0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x72,
|
0x2d, 0x0a, 0x0f, 0x53, 0x73, 0x68, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x52, 0x07, 0x53, 0x73, 0x68, 0x4a,
|
0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x50, 0x18, 0x01,
|
||||||
0x75, 0x6d, 0x70, 0x22, 0x44, 0x0a, 0x12, 0x53, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x50, 0x22, 0x51,
|
||||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x64,
|
0x0a, 0x11, 0x53, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75,
|
||||||
0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x74, 0x64, 0x6f, 0x75,
|
0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x64, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01,
|
||||||
0x74, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x28, 0x09, 0x52, 0x05, 0x53, 0x74, 0x64, 0x69, 0x6e, 0x12, 0x26, 0x0a, 0x07, 0x53, 0x73, 0x68,
|
||||||
0x09, 0x52, 0x06, 0x53, 0x74, 0x64, 0x65, 0x72, 0x72, 0x22, 0x31, 0x0a, 0x11, 0x43, 0x6f, 0x6e,
|
0x4a, 0x75, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x72, 0x70, 0x63,
|
||||||
0x66, 0x69, 0x67, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c,
|
0x2e, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x52, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d,
|
||||||
0x0a, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x70, 0x22, 0x44, 0x0a, 0x12, 0x53, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52,
|
||||||
0x09, 0x52, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x22, 0x33, 0x0a, 0x13,
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x64, 0x6f, 0x75,
|
||||||
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75,
|
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x12,
|
||||||
0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44,
|
0x16, 0x0a, 0x06, 0x53, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49,
|
0x06, 0x53, 0x74, 0x64, 0x65, 0x72, 0x72, 0x22, 0x31, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
||||||
0x44, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76,
|
0x67, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09,
|
||||||
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x0a, 0x4c, 0x6f, 0x67,
|
0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x46, 0x6f, 0x6c, 0x6c, 0x6f,
|
0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x22, 0x33, 0x0a, 0x13, 0x43, 0x6f,
|
||||||
0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x12,
|
0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
0x14, 0x0a, 0x05, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
|
0x74, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01,
|
||||||
0x4c, 0x69, 0x6e, 0x65, 0x73, 0x22, 0x27, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x22,
|
||||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18,
|
0x16, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x0d,
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x0a, 0x4c, 0x6f, 0x67, 0x52, 0x65,
|
||||||
0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x28, 0x0a,
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x18,
|
||||||
0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a,
|
0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x14, 0x0a,
|
||||||
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
0x05, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x4c, 0x69,
|
||||||
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x46, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65,
|
0x6e, 0x65, 0x73, 0x22, 0x27, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
|
0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20,
|
||||||
0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70,
|
0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x0d, 0x0a, 0x0b,
|
||||||
0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18,
|
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x28, 0x0a, 0x0c, 0x4c,
|
||||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22,
|
0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d,
|
||||||
0x29, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a,
|
|
||||||
0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09,
|
|
||||||
0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x36, 0x0a, 0x0e, 0x55, 0x70,
|
|
||||||
0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d,
|
|
||||||
0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20,
|
|
||||||
0x01, 0x28, 0x09, 0x52, 0x0d, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69,
|
|
||||||
0x6f, 0x6e, 0x22, 0x33, 0x0a, 0x0f, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73,
|
|
||||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4e, 0x65, 0x65, 0x64, 0x55, 0x70, 0x67,
|
|
||||||
0x72, 0x61, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x4e, 0x65, 0x65, 0x64,
|
|
||||||
0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x10, 0x55, 0x6e, 0x69, 0x6e,
|
|
||||||
0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f,
|
|
||||||
0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18,
|
|
||||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
|
||||||
0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70,
|
|
||||||
0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73,
|
|
||||||
0x70, 0x61, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x18,
|
|
||||||
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x4a,
|
|
||||||
0x75, 0x6d, 0x70, 0x52, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x22, 0x2d, 0x0a, 0x11,
|
|
||||||
0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
|
||||||
0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01,
|
|
||||||
0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x0c,
|
|
||||||
0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f,
|
|
||||||
0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18,
|
|
||||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
|
||||||
0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70,
|
|
||||||
0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73,
|
|
||||||
0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64,
|
|
||||||
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61,
|
|
||||||
0x64, 0x73, 0x12, 0x26, 0x0a, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x18, 0x04, 0x20,
|
|
||||||
0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d,
|
|
||||||
0x70, 0x52, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x22, 0x29, 0x0a, 0x0d, 0x52, 0x65,
|
|
||||||
0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d,
|
|
||||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
|
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
|
||||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xc7, 0x02, 0x0a, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d,
|
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x46, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75,
|
||||||
0x70, 0x12, 0x12, 0x0a, 0x04, 0x41, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||||
0x04, 0x41, 0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x73,
|
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20,
|
||||||
0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x61, 0x73,
|
0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x29, 0x0a,
|
||||||
0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x66, 0x69, 0x6c, 0x65,
|
0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08,
|
||||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4b, 0x65, 0x79, 0x66, 0x69, 0x6c, 0x65, 0x12,
|
0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08,
|
||||||
0x12, 0x0a, 0x04, 0x4a, 0x75, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4a,
|
0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x36, 0x0a, 0x0e, 0x55, 0x70, 0x67, 0x72,
|
||||||
0x75, 0x6d, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x6c, 0x69,
|
0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x43, 0x6c,
|
||||||
0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
0x69, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b,
|
0x09, 0x52, 0x0d, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
||||||
0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x22, 0x33, 0x0a, 0x0f, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
0x10, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4e, 0x65, 0x65, 0x64, 0x55, 0x70, 0x67, 0x72, 0x61,
|
||||||
0x67, 0x12, 0x2a, 0x0a, 0x10, 0x47, 0x53, 0x53, 0x41, 0x50, 0x49, 0x4b, 0x65, 0x79, 0x74, 0x61,
|
0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x4e, 0x65, 0x65, 0x64, 0x55, 0x70,
|
||||||
0x62, 0x43, 0x6f, 0x6e, 0x66, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x47, 0x53, 0x53,
|
0x67, 0x72, 0x61, 0x64, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x10, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74,
|
||||||
0x41, 0x50, 0x49, 0x4b, 0x65, 0x79, 0x74, 0x61, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x26, 0x0a,
|
0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x4b, 0x75,
|
||||||
0x0e, 0x47, 0x53, 0x53, 0x41, 0x50, 0x49, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18,
|
0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20,
|
||||||
0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x47, 0x53, 0x53, 0x41, 0x50, 0x49, 0x50, 0x61, 0x73,
|
0x01, 0x28, 0x09, 0x52, 0x0f, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42,
|
||||||
0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x47, 0x53, 0x53, 0x41, 0x50, 0x49, 0x43,
|
0x79, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
|
||||||
0x61, 0x63, 0x68, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f,
|
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
|
||||||
0x47, 0x53, 0x53, 0x41, 0x50, 0x49, 0x43, 0x61, 0x63, 0x68, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x22,
|
0x63, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x18, 0x03, 0x20,
|
||||||
0x6e, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1c, 0x0a,
|
0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d,
|
||||||
0x09, 0x45, 0x78, 0x74, 0x72, 0x61, 0x43, 0x49, 0x44, 0x52, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09,
|
0x70, 0x52, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x22, 0x2d, 0x0a, 0x11, 0x55, 0x6e,
|
||||||
0x52, 0x09, 0x45, 0x78, 0x74, 0x72, 0x61, 0x43, 0x49, 0x44, 0x52, 0x12, 0x20, 0x0a, 0x0b, 0x45,
|
0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||||
0x78, 0x74, 0x72, 0x61, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09,
|
0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x52, 0x0b, 0x45, 0x78, 0x74, 0x72, 0x61, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x20, 0x0a,
|
0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x0c, 0x52, 0x65,
|
||||||
0x0b, 0x45, 0x78, 0x74, 0x72, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x18, 0x03, 0x20, 0x01,
|
0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x4b, 0x75,
|
||||||
0x28, 0x08, 0x52, 0x0b, 0x45, 0x78, 0x74, 0x72, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x22,
|
0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20,
|
||||||
0x11, 0x0a, 0x0f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
|
0x01, 0x28, 0x09, 0x52, 0x0f, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42,
|
||||||
0x73, 0x74, 0x22, 0x22, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65,
|
0x79, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
|
||||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
|
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
|
||||||
0x28, 0x09, 0x52, 0x02, 0x49, 0x44, 0x32, 0xe2, 0x09, 0x0a, 0x06, 0x44, 0x61, 0x65, 0x6d, 0x6f,
|
0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18,
|
||||||
0x6e, 0x12, 0x38, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x13, 0x2e, 0x72,
|
0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73,
|
||||||
0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
0x12, 0x26, 0x0a, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||||
0x74, 0x1a, 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52,
|
0x0b, 0x32, 0x0c, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x52,
|
||||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3c, 0x0a, 0x0b, 0x43,
|
0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x22, 0x29, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65,
|
||||||
0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x46, 0x6f, 0x72, 0x6b, 0x12, 0x13, 0x2e, 0x72, 0x70, 0x63,
|
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73,
|
||||||
|
0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,
|
||||||
|
0x61, 0x67, 0x65, 0x22, 0xc7, 0x02, 0x0a, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x12,
|
||||||
|
0x12, 0x0a, 0x04, 0x41, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x41,
|
||||||
|
0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x52, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x73, 0x73, 0x77,
|
||||||
|
0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x61, 0x73, 0x73, 0x77,
|
||||||
|
0x6f, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x04,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4b, 0x65, 0x79, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a,
|
||||||
|
0x04, 0x4a, 0x75, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4a, 0x75, 0x6d,
|
||||||
|
0x70, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x6c, 0x69, 0x61, 0x73,
|
||||||
|
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x6c,
|
||||||
|
0x69, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x75, 0x62,
|
||||||
|
0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x52,
|
||||||
|
0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
|
||||||
|
0x2a, 0x0a, 0x10, 0x47, 0x53, 0x53, 0x41, 0x50, 0x49, 0x4b, 0x65, 0x79, 0x74, 0x61, 0x62, 0x43,
|
||||||
|
0x6f, 0x6e, 0x66, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x47, 0x53, 0x53, 0x41, 0x50,
|
||||||
|
0x49, 0x4b, 0x65, 0x79, 0x74, 0x61, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x26, 0x0a, 0x0e, 0x47,
|
||||||
|
0x53, 0x53, 0x41, 0x50, 0x49, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x09, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x52, 0x0e, 0x47, 0x53, 0x53, 0x41, 0x50, 0x49, 0x50, 0x61, 0x73, 0x73, 0x77,
|
||||||
|
0x6f, 0x72, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x47, 0x53, 0x53, 0x41, 0x50, 0x49, 0x43, 0x61, 0x63,
|
||||||
|
0x68, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x47, 0x53,
|
||||||
|
0x53, 0x41, 0x50, 0x49, 0x43, 0x61, 0x63, 0x68, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x22, 0x6e, 0x0a,
|
||||||
|
0x0a, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x45,
|
||||||
|
0x78, 0x74, 0x72, 0x61, 0x43, 0x49, 0x44, 0x52, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09,
|
||||||
|
0x45, 0x78, 0x74, 0x72, 0x61, 0x43, 0x49, 0x44, 0x52, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x78, 0x74,
|
||||||
|
0x72, 0x61, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b,
|
||||||
|
0x45, 0x78, 0x74, 0x72, 0x61, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x45,
|
||||||
|
0x78, 0x74, 0x72, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
|
||||||
|
0x52, 0x0b, 0x45, 0x78, 0x74, 0x72, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x22, 0x11, 0x0a,
|
||||||
|
0x0f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
|
0x22, 0x22, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70,
|
||||||
|
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x02, 0x49, 0x44, 0x32, 0xe2, 0x09, 0x0a, 0x06, 0x44, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x12,
|
||||||
|
0x38, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x13, 0x2e, 0x72, 0x70, 0x63,
|
||||||
0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||||
0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73,
|
0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73,
|
||||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x41, 0x0a, 0x0a, 0x44, 0x69, 0x73,
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3c, 0x0a, 0x0b, 0x43, 0x6f, 0x6e,
|
||||||
0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x16, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69,
|
0x6e, 0x65, 0x63, 0x74, 0x46, 0x6f, 0x72, 0x6b, 0x12, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43,
|
||||||
0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e,
|
||||||
0x17, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
|
0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x32, 0x0a, 0x05,
|
0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x41, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x63, 0x6f,
|
||||||
0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x78,
|
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x16, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x63,
|
||||||
0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50,
|
|
||||||
0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01,
|
|
||||||
0x12, 0x32, 0x0a, 0x05, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x12, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e,
|
|
||||||
0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x72,
|
|
||||||
0x70, 0x63, 0x2e, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
|
||||||
0x22, 0x00, 0x30, 0x01, 0x12, 0x32, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x12, 0x11, 0x2e,
|
|
||||||
0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
|
||||||
0x1a, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70,
|
|
||||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x35, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x6f,
|
|
||||||
0x76, 0x65, 0x12, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52,
|
|
||||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6d,
|
|
||||||
0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12,
|
|
||||||
0x3c, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x64, 0x64, 0x12, 0x15, 0x2e, 0x72,
|
|
||||||
0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75,
|
|
||||||
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
|
||||||
0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a,
|
|
||||||
0x0c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x18, 0x2e,
|
|
||||||
0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65,
|
|
||||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f,
|
|
||||||
0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
|
||||||
0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x08, 0x53, 0x73, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74,
|
|
||||||
0x12, 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52,
|
|
||||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68,
|
|
||||||
0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
|
|
||||||
0x36, 0x0a, 0x07, 0x53, 0x73, 0x68, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x13, 0x2e, 0x72, 0x70, 0x63,
|
|
||||||
0x2e, 0x53, 0x73, 0x68, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
|
||||||
0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73,
|
|
||||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0a, 0x53, 0x73, 0x68, 0x43, 0x6f,
|
|
||||||
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x16, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x43,
|
|
||||||
0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e,
|
0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e,
|
||||||
0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65,
|
0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65,
|
||||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x2d, 0x0a, 0x04,
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x32, 0x0a, 0x05, 0x50, 0x72,
|
||||||
0x4c, 0x6f, 0x67, 0x73, 0x12, 0x0f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x65,
|
0x6f, 0x78, 0x79, 0x12, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52,
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x67, 0x52,
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f,
|
||||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x2d, 0x0a, 0x04, 0x4c,
|
0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x32,
|
||||||
0x69, 0x73, 0x74, 0x12, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
0x0a, 0x05, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x12, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x65,
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74,
|
0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x72, 0x70, 0x63,
|
||||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2a, 0x0a, 0x03, 0x47, 0x65,
|
0x2e, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||||
0x74, 0x12, 0x0f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
|
0x30, 0x01, 0x12, 0x32, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x12, 0x11, 0x2e, 0x72, 0x70,
|
||||||
0x73, 0x74, 0x1a, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70,
|
0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12,
|
||||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x07, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64,
|
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
0x65, 0x12, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52,
|
0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x35, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65,
|
||||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x67,
|
0x12, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71,
|
||||||
0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x33,
|
0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76,
|
||||||
0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53,
|
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3c, 0x0a,
|
||||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x72,
|
0x09, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x64, 0x64, 0x12, 0x15, 0x2e, 0x72, 0x70, 0x63,
|
||||||
0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
0x65, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x13,
|
0x74, 0x1a, 0x16, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x64,
|
||||||
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
|
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0c, 0x43,
|
||||||
0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
|
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x18, 0x2e, 0x72, 0x70,
|
||||||
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x05, 0x52,
|
0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65,
|
||||||
0x65, 0x73, 0x65, 0x74, 0x12, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74,
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66,
|
||||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,
|
0x69, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||||
0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12,
|
0x22, 0x00, 0x12, 0x39, 0x0a, 0x08, 0x53, 0x73, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x14,
|
||||||
0x3e, 0x0a, 0x09, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x15, 0x2e, 0x72,
|
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71,
|
||||||
0x70, 0x63, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75,
|
0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x53, 0x74,
|
||||||
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74,
|
0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x36, 0x0a,
|
||||||
0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12,
|
0x07, 0x53, 0x73, 0x68, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53,
|
||||||
0x2f, 0x0a, 0x04, 0x51, 0x75, 0x69, 0x74, 0x12, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75,
|
0x73, 0x68, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e,
|
||||||
0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e,
|
0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
0x51, 0x75, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01,
|
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0a, 0x53, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x6e,
|
||||||
0x12, 0x39, 0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x12, 0x14, 0x2e, 0x72,
|
0x65, 0x63, 0x74, 0x12, 0x16, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x43, 0x6f, 0x6e,
|
||||||
0x70, 0x63, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
|
0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x72, 0x70,
|
||||||
0x73, 0x74, 0x1a, 0x15, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66,
|
0x63, 0x2e, 0x53, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x07, 0x5a, 0x05, 0x2e,
|
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x2d, 0x0a, 0x04, 0x4c, 0x6f,
|
||||||
0x3b, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x67, 0x73, 0x12, 0x0f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75,
|
||||||
|
0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73,
|
||||||
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x2d, 0x0a, 0x04, 0x4c, 0x69, 0x73,
|
||||||
|
0x74, 0x12, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
|
||||||
|
0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||||
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2a, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12,
|
||||||
|
0x0f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
|
0x1a, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
|
0x73, 0x65, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x07, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12,
|
||||||
|
0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71,
|
||||||
|
0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61,
|
||||||
|
0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x06,
|
||||||
|
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61,
|
||||||
|
0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x72, 0x70, 0x63,
|
||||||
|
0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||||
|
0x00, 0x12, 0x36, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x2e, 0x72,
|
||||||
|
0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
|
0x74, 0x1a, 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52,
|
||||||
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x05, 0x52, 0x65, 0x73,
|
||||||
|
0x65, 0x74, 0x12, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65,
|
||||||
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x65,
|
||||||
|
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3e, 0x0a,
|
||||||
|
0x09, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x15, 0x2e, 0x72, 0x70, 0x63,
|
||||||
|
0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
|
0x74, 0x1a, 0x16, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c,
|
||||||
|
0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x2f, 0x0a,
|
||||||
|
0x04, 0x51, 0x75, 0x69, 0x74, 0x12, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x69, 0x74,
|
||||||
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75,
|
||||||
|
0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x39,
|
||||||
|
0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x12, 0x14, 0x2e, 0x72, 0x70, 0x63,
|
||||||
|
0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
|
0x1a, 0x15, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x52,
|
||||||
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x3b, 0x72,
|
||||||
|
0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@@ -112,7 +112,8 @@ message ProxyResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message LeaveRequest {
|
message LeaveRequest {
|
||||||
repeated string Workloads = 1;
|
string Namespace = 1;
|
||||||
|
repeated string Workloads = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message LeaveResponse {
|
message LeaveResponse {
|
||||||
|
@@ -29,8 +29,8 @@ func (s *Server) RentIP(ctx context.Context, req *rpc.RentIPRequest) (*rpc.RentI
|
|||||||
defer s.Unlock()
|
defer s.Unlock()
|
||||||
|
|
||||||
plog.G(ctx).Infof("Handling rent IP request, pod name: %s, ns: %s", req.PodName, req.PodNamespace)
|
plog.G(ctx).Infof("Handling rent IP request, pod name: %s, ns: %s", req.PodName, req.PodNamespace)
|
||||||
cmi := s.clientset.CoreV1().ConfigMaps(req.PodNamespace)
|
mapInterface := s.clientset.CoreV1().ConfigMaps(req.PodNamespace)
|
||||||
manager := NewDHCPManager(cmi, req.PodNamespace)
|
manager := NewDHCPManager(mapInterface, req.PodNamespace)
|
||||||
v4, v6, err := manager.RentIP(ctx)
|
v4, v6, err := manager.RentIP(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
plog.G(ctx).Errorf("Failed to rent IP: %v", err)
|
plog.G(ctx).Errorf("Failed to rent IP: %v", err)
|
||||||
@@ -59,8 +59,8 @@ func (s *Server) ReleaseIP(ctx context.Context, req *rpc.ReleaseIPRequest) (*rpc
|
|||||||
ips = append(ips, ip)
|
ips = append(ips, ip)
|
||||||
}
|
}
|
||||||
|
|
||||||
cmi := s.clientset.CoreV1().ConfigMaps(req.PodNamespace)
|
mapInterface := s.clientset.CoreV1().ConfigMaps(req.PodNamespace)
|
||||||
manager := NewDHCPManager(cmi, req.PodNamespace)
|
manager := NewDHCPManager(mapInterface, req.PodNamespace)
|
||||||
if err := manager.ReleaseIP(ctx, ips...); err != nil {
|
if err := manager.ReleaseIP(ctx, ips...); err != nil {
|
||||||
plog.G(ctx).Errorf("Failed to release IP: %v", err)
|
plog.G(ctx).Errorf("Failed to release IP: %v", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@@ -147,7 +147,7 @@ func (c *ConnectOptions) GetIPFromContext(ctx context.Context, logger *log.Logge
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ConnectOptions) CreateRemoteInboundPod(ctx context.Context, workloads []string, headers map[string]string, portMap []string) (err error) {
|
func (c *ConnectOptions) CreateRemoteInboundPod(ctx context.Context, namespace string, workloads []string, headers map[string]string, portMap []string) (err error) {
|
||||||
if c.localTunIPv4 == nil || c.localTunIPv6 == nil {
|
if c.localTunIPv4 == nil || c.localTunIPv6 == nil {
|
||||||
return fmt.Errorf("local tun IP is invalid")
|
return fmt.Errorf("local tun IP is invalid")
|
||||||
}
|
}
|
||||||
@@ -162,7 +162,7 @@ func (c *ConnectOptions) CreateRemoteInboundPod(ctx context.Context, workloads [
|
|||||||
LocalTunIPv6: c.localTunIPv6.IP.String(),
|
LocalTunIPv6: c.localTunIPv6.IP.String(),
|
||||||
}
|
}
|
||||||
var object *runtimeresource.Info
|
var object *runtimeresource.Info
|
||||||
object, err = util.GetUnstructuredObject(c.factory, c.Namespace, workload)
|
object, err = util.GetUnstructuredObject(c.factory, namespace, workload)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -175,21 +175,22 @@ func (c *ConnectOptions) CreateRemoteInboundPod(ctx context.Context, workloads [
|
|||||||
// https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/
|
// https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/
|
||||||
// means mesh mode
|
// means mesh mode
|
||||||
if c.Engine == config.EngineGvisor {
|
if c.Engine == config.EngineGvisor {
|
||||||
err = inject.InjectEnvoySidecar(ctx, c.factory, c.clientset, c.Namespace, workload, object, headers, portMap)
|
err = inject.InjectEnvoySidecar(ctx, c.factory, c.clientset, c.Namespace, object, headers, portMap)
|
||||||
} else if len(headers) != 0 || len(portMap) != 0 {
|
} else if len(headers) != 0 || len(portMap) != 0 {
|
||||||
err = inject.InjectVPNAndEnvoySidecar(ctx, c.factory, c.clientset.CoreV1().ConfigMaps(c.Namespace), c.Namespace, workload, object, configInfo, headers, portMap)
|
err = inject.InjectVPNAndEnvoySidecar(ctx, c.factory, c.clientset.CoreV1().ConfigMaps(c.Namespace), c.Namespace, object, configInfo, headers, portMap)
|
||||||
} else {
|
} else {
|
||||||
err = inject.InjectVPNSidecar(ctx, c.factory, c.Namespace, workload, object, configInfo)
|
err = inject.InjectVPNSidecar(ctx, c.factory, c.Namespace, object, configInfo)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
plog.G(ctx).Errorf("Injecting inbound sidecar for %s failed: %s", workload, err.Error())
|
plog.G(ctx).Errorf("Injecting inbound sidecar for %s failed: %s", workload, err.Error())
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
c.proxyWorkloads.Add(&Proxy{
|
c.proxyWorkloads.Add(c.Namespace, &Proxy{
|
||||||
headers: headers,
|
headers: headers,
|
||||||
portMap: portMap,
|
portMap: portMap,
|
||||||
workload: workload,
|
workload: workload,
|
||||||
portMapper: util.If(c.Engine == config.EngineGvisor, NewMapper(c.clientset, c.Namespace, labels.SelectorFromSet(templateSpec.Labels).String(), headers, workload), nil),
|
namespace: namespace,
|
||||||
|
portMapper: util.If(c.Engine == config.EngineGvisor, NewMapper(c.clientset, namespace, labels.SelectorFromSet(templateSpec.Labels).String(), headers, workload), nil),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@@ -1152,18 +1153,14 @@ func (c *ConnectOptions) getRolloutFunc() []func() error {
|
|||||||
return c.rollbackFuncList
|
return c.rollbackFuncList
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ConnectOptions) LeavePortMap(workload string) {
|
func (c *ConnectOptions) LeavePortMap(ns, workload string) {
|
||||||
c.proxyWorkloads.Remove(workload)
|
c.proxyWorkloads.Remove(ns, workload)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ConnectOptions) IsMe(uid string, headers map[string]string) bool {
|
func (c *ConnectOptions) IsMe(ns, uid string, headers map[string]string) bool {
|
||||||
return c.proxyWorkloads.IsMe(uid, headers)
|
return c.proxyWorkloads.IsMe(ns, uid, headers)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ConnectOptions) ProxyResources() []string {
|
func (c *ConnectOptions) ProxyResources() ProxyList {
|
||||||
var resources []string
|
return c.proxyWorkloads
|
||||||
for _, workload := range c.proxyWorkloads {
|
|
||||||
resources = append(resources, workload.workload)
|
|
||||||
}
|
|
||||||
return resources
|
|
||||||
}
|
}
|
||||||
|
@@ -23,22 +23,23 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Proxy struct {
|
type Proxy struct {
|
||||||
headers map[string]string
|
headers map[string]string
|
||||||
portMap []string
|
portMap []string
|
||||||
workload string
|
workload string
|
||||||
|
namespace string
|
||||||
|
|
||||||
portMapper *Mapper
|
portMapper *Mapper
|
||||||
}
|
}
|
||||||
|
|
||||||
type ProxyList []*Proxy
|
type ProxyList []*Proxy
|
||||||
|
|
||||||
func (l *ProxyList) Remove(workload string) {
|
func (l *ProxyList) Remove(ns, workload string) {
|
||||||
if l == nil {
|
if l == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for i := 0; i < len(*l); i++ {
|
for i := 0; i < len(*l); i++ {
|
||||||
p := (*l)[i]
|
p := (*l)[i]
|
||||||
if p.workload == workload {
|
if p.workload == workload && p.namespace == ns {
|
||||||
*l = append((*l)[:i], (*l)[i+1:]...)
|
*l = append((*l)[:i], (*l)[i+1:]...)
|
||||||
i--
|
i--
|
||||||
}
|
}
|
||||||
@@ -46,17 +47,19 @@ func (l *ProxyList) Remove(workload string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *ProxyList) Add(proxy *Proxy) {
|
func (l *ProxyList) Add(connectNamespace string, proxy *Proxy) {
|
||||||
go proxy.portMapper.Run()
|
go proxy.portMapper.Run(connectNamespace)
|
||||||
*l = append(*l, proxy)
|
*l = append(*l, proxy)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *ProxyList) IsMe(uid string, headers map[string]string) bool {
|
func (l *ProxyList) IsMe(ns, uid string, headers map[string]string) bool {
|
||||||
if l == nil {
|
if l == nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
for _, proxy := range *l {
|
for _, proxy := range *l {
|
||||||
if proxy.workload == util.ConvertUidToWorkload(uid) && reflect.DeepEqual(proxy.headers, headers) {
|
if proxy.workload == util.ConvertUidToWorkload(uid) &&
|
||||||
|
proxy.namespace == ns &&
|
||||||
|
reflect.DeepEqual(proxy.headers, headers) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -87,7 +90,7 @@ type Mapper struct {
|
|||||||
clientset *kubernetes.Clientset
|
clientset *kubernetes.Clientset
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Mapper) Run() {
|
func (m *Mapper) Run(connectNamespace string) {
|
||||||
if m == nil {
|
if m == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -102,7 +105,7 @@ func (m *Mapper) Run() {
|
|||||||
|
|
||||||
var lastLocalPort2EnvoyRulePort map[int32]int32
|
var lastLocalPort2EnvoyRulePort map[int32]int32
|
||||||
for m.ctx.Err() == nil {
|
for m.ctx.Err() == nil {
|
||||||
localPort2EnvoyRulePort, err := m.getLocalPort2EnvoyRulePort()
|
localPort2EnvoyRulePort, err := m.getLocalPort2EnvoyRulePort(connectNamespace)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errors.Is(err, context.Canceled) {
|
if errors.Is(err, context.Canceled) {
|
||||||
continue
|
continue
|
||||||
@@ -177,8 +180,9 @@ func (m *Mapper) Run() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Mapper) getLocalPort2EnvoyRulePort() (map[int32]int32, error) {
|
func (m *Mapper) getLocalPort2EnvoyRulePort(connectNamespace string) (map[int32]int32, error) {
|
||||||
configMap, err := m.clientset.CoreV1().ConfigMaps(m.ns).Get(m.ctx, config.ConfigMapPodTrafficManager, v1.GetOptions{})
|
// todo get kubevpn-system configmap
|
||||||
|
configMap, err := m.clientset.CoreV1().ConfigMaps(connectNamespace).Get(m.ctx, config.ConfigMapPodTrafficManager, v1.GetOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -191,7 +195,7 @@ func (m *Mapper) getLocalPort2EnvoyRulePort() (map[int32]int32, error) {
|
|||||||
|
|
||||||
var localPort2EnvoyRulePort = make(map[int32]int32)
|
var localPort2EnvoyRulePort = make(map[int32]int32)
|
||||||
for _, virtual := range v {
|
for _, virtual := range v {
|
||||||
if util.ConvertWorkloadToUid(m.workload) == virtual.Uid {
|
if util.ConvertWorkloadToUid(m.workload) == virtual.Uid && m.ns == virtual.Namespace {
|
||||||
for _, rule := range virtual.Rules {
|
for _, rule := range virtual.Rules {
|
||||||
if reflect.DeepEqual(m.headers, rule.Headers) {
|
if reflect.DeepEqual(m.headers, rule.Headers) {
|
||||||
for containerPort, portPair := range rule.PortMap {
|
for containerPort, portPair := range rule.PortMap {
|
||||||
|
@@ -134,7 +134,7 @@ func createOutboundPod(ctx context.Context, factory cmdutil.Factory, clientset *
|
|||||||
plog.G(ctx).Infof("Creating MutatingWebhookConfiguration %s", config.ConfigMapPodTrafficManager)
|
plog.G(ctx).Infof("Creating MutatingWebhookConfiguration %s", config.ConfigMapPodTrafficManager)
|
||||||
mutatingWebhookConfiguration := genMutatingWebhookConfiguration(namespace, crt)
|
mutatingWebhookConfiguration := genMutatingWebhookConfiguration(namespace, crt)
|
||||||
_, err = clientset.AdmissionregistrationV1().MutatingWebhookConfigurations().Create(ctx, mutatingWebhookConfiguration, metav1.CreateOptions{})
|
_, err = clientset.AdmissionregistrationV1().MutatingWebhookConfigurations().Create(ctx, mutatingWebhookConfiguration, metav1.CreateOptions{})
|
||||||
if err != nil && !k8serrors.IsForbidden(err) && !k8serrors.IsAlreadyExists(err) {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to create MutatingWebhookConfigurations: %v", err)
|
return fmt.Errorf("failed to create MutatingWebhookConfigurations: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -27,24 +27,24 @@ import (
|
|||||||
// 1) reset configmap
|
// 1) reset configmap
|
||||||
// 2) remove inject containers envoy and vpn
|
// 2) remove inject containers envoy and vpn
|
||||||
// 3) restore service targetPort to containerPort
|
// 3) restore service targetPort to containerPort
|
||||||
func (c *ConnectOptions) Reset(ctx context.Context, workloads []string) error {
|
func (c *ConnectOptions) Reset(ctx context.Context, namespace string, workloads []string) error {
|
||||||
if c == nil || c.clientset == nil {
|
if c == nil || c.clientset == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
workloads, err = util.NormalizedResource(ctx, c.factory, c.clientset, c.Namespace, workloads)
|
workloads, err = util.NormalizedResource(ctx, c.factory, c.clientset, namespace, workloads)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = resetConfigMap(ctx, c.clientset.CoreV1().ConfigMaps(c.Namespace), workloads)
|
err = resetConfigMap(ctx, c.clientset.CoreV1().ConfigMaps(c.Namespace), namespace, workloads)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
plog.G(ctx).Error(err)
|
plog.G(ctx).Error(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, workload := range workloads {
|
for _, workload := range workloads {
|
||||||
err = removeInjectContainer(ctx, c.factory, c.clientset, c.Namespace, workload)
|
err = removeInjectContainer(ctx, c.factory, c.clientset, namespace, workload)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
plog.G(ctx).Error(err)
|
plog.G(ctx).Error(err)
|
||||||
}
|
}
|
||||||
@@ -53,7 +53,7 @@ func (c *ConnectOptions) Reset(ctx context.Context, workloads []string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func resetConfigMap(ctx context.Context, mapInterface v1.ConfigMapInterface, workloads []string) error {
|
func resetConfigMap(ctx context.Context, mapInterface v1.ConfigMapInterface, namespace string, workloads []string) error {
|
||||||
cm, err := mapInterface.Get(ctx, config.ConfigMapPodTrafficManager, metav1.GetOptions{})
|
cm, err := mapInterface.Get(ctx, config.ConfigMapPodTrafficManager, metav1.GetOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if apierrors.IsNotFound(err) {
|
if apierrors.IsNotFound(err) {
|
||||||
|
@@ -1,112 +0,0 @@
|
|||||||
package handler
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"crypto/tls"
|
|
||||||
"crypto/x509"
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"google.golang.org/grpc"
|
|
||||||
"google.golang.org/grpc/credentials"
|
|
||||||
"google.golang.org/grpc/health/grpc_health_v1"
|
|
||||||
|
|
||||||
"github.com/wencaiwulue/kubevpn/v2/pkg/config"
|
|
||||||
"github.com/wencaiwulue/kubevpn/v2/pkg/core"
|
|
||||||
"github.com/wencaiwulue/kubevpn/v2/pkg/dhcp/rpc"
|
|
||||||
plog "github.com/wencaiwulue/kubevpn/v2/pkg/log"
|
|
||||||
"github.com/wencaiwulue/kubevpn/v2/pkg/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Complete(ctx context.Context, route *core.Route) error {
|
|
||||||
if v, ok := os.LookupEnv(config.EnvInboundPodTunIPv4); !ok || v != "" {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
ns := os.Getenv(config.EnvPodNamespace)
|
|
||||||
if ns == "" {
|
|
||||||
return fmt.Errorf("can not get namespace")
|
|
||||||
}
|
|
||||||
client, err := getDHCPServerClient(ctx, ns)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var resp *rpc.RentIPResponse
|
|
||||||
resp, err = client.RentIP(ctx, &rpc.RentIPRequest{
|
|
||||||
PodName: os.Getenv(config.EnvPodName),
|
|
||||||
PodNamespace: ns,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
go func() {
|
|
||||||
<-ctx.Done()
|
|
||||||
_, err2 := client.ReleaseIP(context.Background(), &rpc.ReleaseIPRequest{
|
|
||||||
PodName: os.Getenv(config.EnvPodName),
|
|
||||||
PodNamespace: os.Getenv(config.EnvPodNamespace),
|
|
||||||
IPv4CIDR: os.Getenv(config.EnvInboundPodTunIPv4),
|
|
||||||
IPv6CIDR: os.Getenv(config.EnvInboundPodTunIPv6),
|
|
||||||
})
|
|
||||||
if err2 != nil {
|
|
||||||
plog.G(ctx).Errorf("Failed to release IP %s and %s: %v", resp.IPv4CIDR, resp.IPv6CIDR, err2)
|
|
||||||
} else {
|
|
||||||
plog.G(ctx).Debugf("Release IP %s and %s", resp.IPv4CIDR, resp.IPv6CIDR)
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
|
|
||||||
plog.G(ctx).Infof("Rent an IPv4: %s, IPv6: %s", resp.IPv4CIDR, resp.IPv6CIDR)
|
|
||||||
if err = os.Setenv(config.EnvInboundPodTunIPv4, resp.IPv4CIDR); err != nil {
|
|
||||||
plog.G(ctx).Errorf("Failed to set IP: %v", err)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if err = os.Setenv(config.EnvInboundPodTunIPv6, resp.IPv6CIDR); err != nil {
|
|
||||||
plog.G(ctx).Errorf("Failed to set IP: %v", err)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
for i := 0; i < len(route.ServeNodes); i++ {
|
|
||||||
var node *core.Node
|
|
||||||
node, err = core.ParseNode(route.ServeNodes[i])
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if node.Protocol == "tun" {
|
|
||||||
if get := node.Get("net"); get == "" {
|
|
||||||
route.ServeNodes[i] = route.ServeNodes[i] + "&net=" + resp.IPv4CIDR
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func getDHCPServerClient(ctx context.Context, namespace string) (rpc.DHCPClient, error) {
|
|
||||||
cert, ok := os.LookupEnv(config.TLSCertKey)
|
|
||||||
if !ok {
|
|
||||||
return nil, fmt.Errorf("can not get %s from env", config.TLSCertKey)
|
|
||||||
}
|
|
||||||
caCertPool := x509.NewCertPool()
|
|
||||||
caCertPool.AppendCertsFromPEM([]byte(cert))
|
|
||||||
|
|
||||||
conn, err := grpc.DialContext(ctx,
|
|
||||||
fmt.Sprintf("%s:80", util.GetTlsDomain(namespace)),
|
|
||||||
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{
|
|
||||||
RootCAs: caCertPool,
|
|
||||||
})),
|
|
||||||
)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
healthClient := grpc_health_v1.NewHealthClient(conn)
|
|
||||||
var resp *grpc_health_v1.HealthCheckResponse
|
|
||||||
resp, err = healthClient.Check(ctx, &grpc_health_v1.HealthCheckRequest{})
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if resp.Status != grpc_health_v1.HealthCheckResponse_SERVING {
|
|
||||||
return nil, fmt.Errorf("grpc service is not heath: %s", resp.Status)
|
|
||||||
}
|
|
||||||
|
|
||||||
cli := rpc.NewDHCPClient(conn)
|
|
||||||
return cli, nil
|
|
||||||
}
|
|
@@ -91,7 +91,7 @@ func (c *ConnectOptions) LeaveAllProxyResources(ctx context.Context) (err error)
|
|||||||
v4, _ := c.GetLocalTunIP()
|
v4, _ := c.GetLocalTunIP()
|
||||||
for _, workload := range c.ProxyResources() {
|
for _, workload := range c.ProxyResources() {
|
||||||
// deployments.apps.ry-server --> deployments.apps/ry-server
|
// deployments.apps.ry-server --> deployments.apps/ry-server
|
||||||
object, err := util.GetUnstructuredObject(c.factory, c.Namespace, workload)
|
object, err := util.GetUnstructuredObject(c.factory, workload.namespace, workload.workload)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
plog.G(ctx).Errorf("Failed to get unstructured object: %v", err)
|
plog.G(ctx).Errorf("Failed to get unstructured object: %v", err)
|
||||||
return err
|
return err
|
||||||
@@ -105,7 +105,7 @@ func (c *ConnectOptions) LeaveAllProxyResources(ctx context.Context) (err error)
|
|||||||
var empty bool
|
var empty bool
|
||||||
empty, err = inject.UnPatchContainer(ctx, c.factory, c.clientset.CoreV1().ConfigMaps(c.Namespace), object, func(isFargateMode bool, rule *controlplane.Rule) bool {
|
empty, err = inject.UnPatchContainer(ctx, c.factory, c.clientset.CoreV1().ConfigMaps(c.Namespace), object, func(isFargateMode bool, rule *controlplane.Rule) bool {
|
||||||
if isFargateMode {
|
if isFargateMode {
|
||||||
return c.IsMe(util.ConvertWorkloadToUid(workload), rule.Headers)
|
return c.IsMe(workload.namespace, util.ConvertWorkloadToUid(workload.workload), rule.Headers)
|
||||||
}
|
}
|
||||||
return rule.LocalTunIPv4 == v4
|
return rule.LocalTunIPv4 == v4
|
||||||
})
|
})
|
||||||
@@ -114,9 +114,9 @@ func (c *ConnectOptions) LeaveAllProxyResources(ctx context.Context) (err error)
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if empty {
|
if empty {
|
||||||
err = inject.ModifyServiceTargetPort(ctx, c.clientset, c.Namespace, templateSpec.Labels, map[int32]int32{})
|
err = inject.ModifyServiceTargetPort(ctx, c.clientset, workload.namespace, templateSpec.Labels, map[int32]int32{})
|
||||||
}
|
}
|
||||||
c.LeavePortMap(workload)
|
c.LeavePortMap(workload.namespace, workload.workload)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@@ -11,12 +11,13 @@ import (
|
|||||||
|
|
||||||
func TestAddVirtualRule(t *testing.T) {
|
func TestAddVirtualRule(t *testing.T) {
|
||||||
testdatas := []struct {
|
testdatas := []struct {
|
||||||
Rule []*controlplane.Virtual
|
Rule []*controlplane.Virtual
|
||||||
Ports []controlplane.ContainerPort
|
Ports []controlplane.ContainerPort
|
||||||
Headers map[string]string
|
Headers map[string]string
|
||||||
TunIP util.PodRouteConfig
|
TunIP util.PodRouteConfig
|
||||||
Uid string
|
Uid string
|
||||||
PortMap map[int32]string
|
Namespace string
|
||||||
|
PortMap map[int32]string
|
||||||
|
|
||||||
Expect []*controlplane.Virtual
|
Expect []*controlplane.Virtual
|
||||||
}{
|
}{
|
||||||
@@ -52,7 +53,7 @@ func TestAddVirtualRule(t *testing.T) {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, data := range testdatas {
|
for _, data := range testdatas {
|
||||||
rule := addVirtualRule(data.Rule, data.Uid, data.Ports, data.Headers, data.TunIP, nil)
|
rule := addVirtualRule(data.Rule, data.Namespace, data.Uid, data.Ports, data.Headers, data.TunIP, nil)
|
||||||
if !reflect.DeepEqual(rule, data.Expect) {
|
if !reflect.DeepEqual(rule, data.Expect) {
|
||||||
t.FailNow()
|
t.FailNow()
|
||||||
}
|
}
|
||||||
|
@@ -28,7 +28,7 @@ import (
|
|||||||
|
|
||||||
// InjectEnvoySidecar patch a sidecar, using iptables to do port-forward let this pod decide should go to 233.254.254.100 or request to 127.0.0.1
|
// InjectEnvoySidecar patch a sidecar, using iptables to do port-forward let this pod decide should go to 233.254.254.100 or request to 127.0.0.1
|
||||||
// https://istio.io/latest/docs/ops/deployment/requirements/#ports-used-by-istio
|
// https://istio.io/latest/docs/ops/deployment/requirements/#ports-used-by-istio
|
||||||
func InjectEnvoySidecar(ctx context.Context, f cmdutil.Factory, clientset *kubernetes.Clientset, namespace, workload string, object *runtimeresource.Info, headers map[string]string, portMap []string) (err error) {
|
func InjectEnvoySidecar(ctx context.Context, f cmdutil.Factory, clientset *kubernetes.Clientset, connectNamespace string, object *runtimeresource.Info, headers map[string]string, portMap []string) (err error) {
|
||||||
u := object.Object.(*unstructured.Unstructured)
|
u := object.Object.(*unstructured.Unstructured)
|
||||||
var templateSpec *v1.PodTemplateSpec
|
var templateSpec *v1.PodTemplateSpec
|
||||||
var path []string
|
var path []string
|
||||||
@@ -48,23 +48,23 @@ func InjectEnvoySidecar(ctx context.Context, f cmdutil.Factory, clientset *kuber
|
|||||||
port[i].EnvoyListenerPort = int32(randomPort)
|
port[i].EnvoyListenerPort = int32(randomPort)
|
||||||
containerPort2EnvoyListenerPort[port[i].ContainerPort] = int32(randomPort)
|
containerPort2EnvoyListenerPort[port[i].ContainerPort] = int32(randomPort)
|
||||||
}
|
}
|
||||||
err = addEnvoyConfig(clientset.CoreV1().ConfigMaps(namespace), nodeID, c, headers, port, portmap)
|
err = addEnvoyConfig(clientset.CoreV1().ConfigMaps(connectNamespace), object.Namespace, nodeID, c, headers, port, portmap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
plog.G(ctx).Errorf("Failed to add envoy config: %v", err)
|
plog.G(ctx).Errorf("Failed to add envoy config: %v", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
workload := fmt.Sprintf("%s/%s", object.Mapping.Resource.Resource, object.Name)
|
||||||
// already inject container envoy-proxy, do nothing
|
// already inject container envoy-proxy, do nothing
|
||||||
containerNames := sets.New[string]()
|
containerNames := sets.New[string]()
|
||||||
for _, container := range templateSpec.Spec.Containers {
|
for _, container := range templateSpec.Spec.Containers {
|
||||||
containerNames.Insert(container.Name)
|
containerNames.Insert(container.Name)
|
||||||
}
|
}
|
||||||
if containerNames.HasAll(config.ContainerSidecarVPN, config.ContainerSidecarEnvoyProxy) {
|
if containerNames.HasAll(config.ContainerSidecarVPN, config.ContainerSidecarEnvoyProxy) {
|
||||||
plog.G(ctx).Infof("Workload %s/%s has already been injected with sidecar", namespace, workload)
|
plog.G(ctx).Infof("Workload %s/%s has already been injected with sidecar", object.Namespace, workload)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
enableIPv6, _ := util.DetectPodSupportIPv6(ctx, f, namespace)
|
enableIPv6, _ := util.DetectPodSupportIPv6(ctx, f, connectNamespace)
|
||||||
// (1) add mesh container
|
// (1) add mesh container
|
||||||
AddEnvoyContainer(templateSpec, nodeID, enableIPv6)
|
AddEnvoyContainer(templateSpec, nodeID, enableIPv6)
|
||||||
helper := pkgresource.NewHelper(object.Client, object.Mapping)
|
helper := pkgresource.NewHelper(object.Client, object.Mapping)
|
||||||
@@ -86,13 +86,13 @@ func InjectEnvoySidecar(ctx context.Context, f cmdutil.Factory, clientset *kuber
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
plog.G(ctx).Infof("Patching workload %s", workload)
|
plog.G(ctx).Infof("Patching workload %s", workload)
|
||||||
err = util.RolloutStatus(ctx, f, namespace, workload, time.Minute*60)
|
err = util.RolloutStatus(ctx, f, object.Namespace, workload, time.Minute*60)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2) modify service containerPort to envoy listener port
|
// 2) modify service containerPort to envoy listener port
|
||||||
err = ModifyServiceTargetPort(ctx, clientset, namespace, templateSpec.Labels, containerPort2EnvoyListenerPort)
|
err = ModifyServiceTargetPort(ctx, clientset, object.Namespace, templateSpec.Labels, containerPort2EnvoyListenerPort)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@@ -31,7 +31,7 @@ import (
|
|||||||
// https://istio.io/latest/docs/ops/deployment/requirements/#ports-used-by-istio
|
// https://istio.io/latest/docs/ops/deployment/requirements/#ports-used-by-istio
|
||||||
|
|
||||||
// InjectVPNAndEnvoySidecar patch a sidecar, using iptables to do port-forward let this pod decide should go to 233.254.254.100 or request to 127.0.0.1
|
// InjectVPNAndEnvoySidecar patch a sidecar, using iptables to do port-forward let this pod decide should go to 233.254.254.100 or request to 127.0.0.1
|
||||||
func InjectVPNAndEnvoySidecar(ctx context.Context, f cmdutil.Factory, clientset v12.ConfigMapInterface, namespace, workload string, object *runtimeresource.Info, c util.PodRouteConfig, headers map[string]string, portMaps []string) (err error) {
|
func InjectVPNAndEnvoySidecar(ctx context.Context, f cmdutil.Factory, mapInterface v12.ConfigMapInterface, connectNamespace string, object *runtimeresource.Info, c util.PodRouteConfig, headers map[string]string, portMaps []string) (err error) {
|
||||||
u := object.Object.(*unstructured.Unstructured)
|
u := object.Object.(*unstructured.Unstructured)
|
||||||
var templateSpec *v1.PodTemplateSpec
|
var templateSpec *v1.PodTemplateSpec
|
||||||
var path []string
|
var path []string
|
||||||
@@ -72,23 +72,23 @@ func InjectVPNAndEnvoySidecar(ctx context.Context, f cmdutil.Factory, clientset
|
|||||||
|
|
||||||
nodeID := fmt.Sprintf("%s.%s", object.Mapping.Resource.GroupResource().String(), object.Name)
|
nodeID := fmt.Sprintf("%s.%s", object.Mapping.Resource.GroupResource().String(), object.Name)
|
||||||
|
|
||||||
err = addEnvoyConfig(clientset, nodeID, c, headers, ports, portmap)
|
err = addEnvoyConfig(mapInterface, object.Namespace, nodeID, c, headers, ports, portmap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
plog.G(ctx).Errorf("Failed to add envoy config: %v", err)
|
plog.G(ctx).Errorf("Failed to add envoy config: %v", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
workload := fmt.Sprintf("%s/%s", object.Mapping.Resource.Resource, object.Name)
|
||||||
// already inject container vpn and envoy-proxy, do nothing
|
// already inject container vpn and envoy-proxy, do nothing
|
||||||
containerNames := sets.New[string]()
|
containerNames := sets.New[string]()
|
||||||
for _, container := range templateSpec.Spec.Containers {
|
for _, container := range templateSpec.Spec.Containers {
|
||||||
containerNames.Insert(container.Name)
|
containerNames.Insert(container.Name)
|
||||||
}
|
}
|
||||||
if containerNames.HasAll(config.ContainerSidecarVPN, config.ContainerSidecarEnvoyProxy) {
|
if containerNames.HasAll(config.ContainerSidecarVPN, config.ContainerSidecarEnvoyProxy) {
|
||||||
plog.G(ctx).Infof("Workload %s/%s has already been injected with sidecar", namespace, workload)
|
plog.G(ctx).Infof("Workload %s/%s has already been injected with sidecar", connectNamespace, workload)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
enableIPv6, _ := util.DetectPodSupportIPv6(ctx, f, namespace)
|
enableIPv6, _ := util.DetectPodSupportIPv6(ctx, f, connectNamespace)
|
||||||
// (1) add mesh container
|
// (1) add mesh container
|
||||||
AddMeshContainer(templateSpec, nodeID, c, enableIPv6)
|
AddMeshContainer(templateSpec, nodeID, c, enableIPv6)
|
||||||
helper := pkgresource.NewHelper(object.Client, object.Mapping)
|
helper := pkgresource.NewHelper(object.Client, object.Mapping)
|
||||||
@@ -110,7 +110,7 @@ func InjectVPNAndEnvoySidecar(ctx context.Context, f cmdutil.Factory, clientset
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
plog.G(ctx).Infof("Patching workload %s", workload)
|
plog.G(ctx).Infof("Patching workload %s", workload)
|
||||||
err = util.RolloutStatus(ctx, f, namespace, workload, time.Minute*60)
|
err = util.RolloutStatus(ctx, f, object.Namespace, workload, time.Minute*60)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ func UnPatchContainer(ctx context.Context, factory cmdutil.Factory, mapInterface
|
|||||||
nodeID := fmt.Sprintf("%s.%s", object.Mapping.Resource.GroupResource().String(), object.Name)
|
nodeID := fmt.Sprintf("%s.%s", object.Mapping.Resource.GroupResource().String(), object.Name)
|
||||||
workload := util.ConvertUidToWorkload(nodeID)
|
workload := util.ConvertUidToWorkload(nodeID)
|
||||||
var empty, found bool
|
var empty, found bool
|
||||||
empty, found, err = removeEnvoyConfig(mapInterface, nodeID, isMeFunc)
|
empty, found, err = removeEnvoyConfig(mapInterface, object.Namespace, nodeID, isMeFunc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
plog.G(ctx).Errorf("Failed to remove envoy config: %v", err)
|
plog.G(ctx).Errorf("Failed to remove envoy config: %v", err)
|
||||||
return false, err
|
return false, err
|
||||||
@@ -173,7 +173,7 @@ func UnPatchContainer(ctx context.Context, factory cmdutil.Factory, mapInterface
|
|||||||
return empty, err
|
return empty, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func addEnvoyConfig(mapInterface v12.ConfigMapInterface, nodeID string, tunIP util.PodRouteConfig, headers map[string]string, port []controlplane.ContainerPort, portmap map[int32]string) error {
|
func addEnvoyConfig(mapInterface v12.ConfigMapInterface, ns, nodeID string, tunIP util.PodRouteConfig, headers map[string]string, port []controlplane.ContainerPort, portmap map[int32]string) error {
|
||||||
configMap, err := mapInterface.Get(context.Background(), config.ConfigMapPodTrafficManager, metav1.GetOptions{})
|
configMap, err := mapInterface.Get(context.Background(), config.ConfigMapPodTrafficManager, metav1.GetOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -185,7 +185,7 @@ func addEnvoyConfig(mapInterface v12.ConfigMapInterface, nodeID string, tunIP ut
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
v = addVirtualRule(v, nodeID, port, headers, tunIP, portmap)
|
v = addVirtualRule(v, ns, nodeID, port, headers, tunIP, portmap)
|
||||||
marshal, err := yaml.Marshal(v)
|
marshal, err := yaml.Marshal(v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -195,10 +195,10 @@ func addEnvoyConfig(mapInterface v12.ConfigMapInterface, nodeID string, tunIP ut
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func addVirtualRule(v []*controlplane.Virtual, nodeID string, port []controlplane.ContainerPort, headers map[string]string, tunIP util.PodRouteConfig, portmap map[int32]string) []*controlplane.Virtual {
|
func addVirtualRule(v []*controlplane.Virtual, ns, nodeID string, port []controlplane.ContainerPort, headers map[string]string, tunIP util.PodRouteConfig, portmap map[int32]string) []*controlplane.Virtual {
|
||||||
var index = -1
|
var index = -1
|
||||||
for i, virtual := range v {
|
for i, virtual := range v {
|
||||||
if nodeID == virtual.Uid {
|
if nodeID == virtual.Uid && virtual.Namespace == ns {
|
||||||
index = i
|
index = i
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -206,8 +206,9 @@ func addVirtualRule(v []*controlplane.Virtual, nodeID string, port []controlplan
|
|||||||
// 1) if not found uid, means nobody proxying it, just add it
|
// 1) if not found uid, means nobody proxying it, just add it
|
||||||
if index < 0 {
|
if index < 0 {
|
||||||
return append(v, &controlplane.Virtual{
|
return append(v, &controlplane.Virtual{
|
||||||
Uid: nodeID,
|
Uid: nodeID,
|
||||||
Ports: port,
|
Namespace: ns,
|
||||||
|
Ports: port,
|
||||||
Rules: []*controlplane.Rule{{
|
Rules: []*controlplane.Rule{{
|
||||||
Headers: headers,
|
Headers: headers,
|
||||||
LocalTunIPv4: tunIP.LocalTunIPv4,
|
LocalTunIPv4: tunIP.LocalTunIPv4,
|
||||||
@@ -258,7 +259,7 @@ func addVirtualRule(v []*controlplane.Virtual, nodeID string, port []controlplan
|
|||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
func removeEnvoyConfig(mapInterface v12.ConfigMapInterface, nodeID string, isMeFunc func(isFargateMode bool, rule *controlplane.Rule) bool) (empty bool, found bool, err error) {
|
func removeEnvoyConfig(mapInterface v12.ConfigMapInterface, namespace string, nodeID string, isMeFunc func(isFargateMode bool, rule *controlplane.Rule) bool) (empty bool, found bool, err error) {
|
||||||
configMap, err := mapInterface.Get(context.Background(), config.ConfigMapPodTrafficManager, metav1.GetOptions{})
|
configMap, err := mapInterface.Get(context.Background(), config.ConfigMapPodTrafficManager, metav1.GetOptions{})
|
||||||
if k8serrors.IsNotFound(err) {
|
if k8serrors.IsNotFound(err) {
|
||||||
return true, false, nil
|
return true, false, nil
|
||||||
@@ -275,7 +276,7 @@ func removeEnvoyConfig(mapInterface v12.ConfigMapInterface, nodeID string, isMeF
|
|||||||
return false, false, err
|
return false, false, err
|
||||||
}
|
}
|
||||||
for _, virtual := range v {
|
for _, virtual := range v {
|
||||||
if nodeID == virtual.Uid {
|
if nodeID == virtual.Uid && namespace == virtual.Namespace {
|
||||||
var isFargateMode bool
|
var isFargateMode bool
|
||||||
for _, port := range virtual.Ports {
|
for _, port := range virtual.Ports {
|
||||||
if port.EnvoyListenerPort != 0 {
|
if port.EnvoyListenerPort != 0 {
|
||||||
@@ -297,7 +298,7 @@ func removeEnvoyConfig(mapInterface v12.ConfigMapInterface, nodeID string, isMeF
|
|||||||
|
|
||||||
// remove default
|
// remove default
|
||||||
for i := 0; i < len(v); i++ {
|
for i := 0; i < len(v); i++ {
|
||||||
if nodeID == v[i].Uid && len(v[i].Rules) == 0 {
|
if nodeID == v[i].Uid && namespace == v[i].Namespace && len(v[i].Rules) == 0 {
|
||||||
v = append(v[:i], v[i+1:]...)
|
v = append(v[:i], v[i+1:]...)
|
||||||
i--
|
i--
|
||||||
empty = true
|
empty = true
|
||||||
|
@@ -24,7 +24,7 @@ import (
|
|||||||
util2 "github.com/wencaiwulue/kubevpn/v2/pkg/util"
|
util2 "github.com/wencaiwulue/kubevpn/v2/pkg/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
func InjectVPNSidecar(ctx context.Context, f util.Factory, namespace, workload string, object *resource.Info, c util2.PodRouteConfig) error {
|
func InjectVPNSidecar(ctx context.Context, f util.Factory, connectNamespace string, object *resource.Info, c util2.PodRouteConfig) error {
|
||||||
u := object.Object.(*unstructured.Unstructured)
|
u := object.Object.(*unstructured.Unstructured)
|
||||||
|
|
||||||
podTempSpec, path, err := util2.GetPodTemplateSpecPath(u)
|
podTempSpec, path, err := util2.GetPodTemplateSpecPath(u)
|
||||||
@@ -45,7 +45,7 @@ func InjectVPNSidecar(ctx context.Context, f util.Factory, namespace, workload s
|
|||||||
for _, port := range ports {
|
for _, port := range ports {
|
||||||
portmap[port.ContainerPort] = fmt.Sprintf("%d", port.ContainerPort)
|
portmap[port.ContainerPort] = fmt.Sprintf("%d", port.ContainerPort)
|
||||||
}
|
}
|
||||||
err = addEnvoyConfig(clientset.CoreV1().ConfigMaps(namespace), nodeID, c, nil, controlplane.ConvertContainerPort(ports...), portmap)
|
err = addEnvoyConfig(clientset.CoreV1().ConfigMaps(connectNamespace), object.Namespace, nodeID, c, nil, controlplane.ConvertContainerPort(ports...), portmap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
plog.G(ctx).Errorf("Failed to add envoy config: %v", err)
|
plog.G(ctx).Errorf("Failed to add envoy config: %v", err)
|
||||||
return err
|
return err
|
||||||
@@ -53,10 +53,11 @@ func InjectVPNSidecar(ctx context.Context, f util.Factory, namespace, workload s
|
|||||||
|
|
||||||
AddContainer(&podTempSpec.Spec, c)
|
AddContainer(&podTempSpec.Spec, c)
|
||||||
|
|
||||||
|
workload := fmt.Sprintf("%s/%s", object.Mapping.Resource.Resource, object.Name)
|
||||||
helper := resource.NewHelper(object.Client, object.Mapping)
|
helper := resource.NewHelper(object.Client, object.Mapping)
|
||||||
// pods without controller
|
// pods without controller
|
||||||
if len(path) == 0 {
|
if len(path) == 0 {
|
||||||
plog.G(ctx).Infof("Workload %s/%s is not controlled by any controller", namespace, workload)
|
plog.G(ctx).Infof("Workload %s is not controlled by any controller", workload)
|
||||||
p := &v1.Pod{ObjectMeta: podTempSpec.ObjectMeta, Spec: podTempSpec.Spec}
|
p := &v1.Pod{ObjectMeta: podTempSpec.ObjectMeta, Spec: podTempSpec.Spec}
|
||||||
CleanupUselessInfo(p)
|
CleanupUselessInfo(p)
|
||||||
if err = CreateAfterDeletePod(ctx, f, p, helper); err != nil {
|
if err = CreateAfterDeletePod(ctx, f, p, helper); err != nil {
|
||||||
@@ -80,7 +81,7 @@ func InjectVPNSidecar(ctx context.Context, f util.Factory, namespace, workload s
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err = util2.RolloutStatus(ctx, f, namespace, workload, time.Minute*60)
|
err = util2.RolloutStatus(ctx, f, object.Namespace, workload, time.Minute*60)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -38,22 +38,32 @@ func GetClusterIDByCM(cm *v1.ConfigMap) types.UID {
|
|||||||
return cm.UID
|
return cm.UID
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsSameCluster(ctx context.Context, client v12.ConfigMapInterface, namespace string, clientB v12.ConfigMapInterface, namespaceB string) (bool, error) {
|
func IsSameCluster(ctx context.Context, client v12.CoreV1Interface, namespace string, clientB v12.CoreV1Interface, namespaceB string) (bool, error) {
|
||||||
|
if UseDefaultNs(ctx, client) {
|
||||||
|
namespace = config.KubevpnNamespace
|
||||||
|
namespaceB = config.KubevpnNamespace
|
||||||
|
}
|
||||||
|
|
||||||
if namespace != namespaceB {
|
if namespace != namespaceB {
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
clusterIDA, err := GetClusterID(ctx, client)
|
clusterIDA, err := GetClusterID(ctx, client.ConfigMaps(namespace))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
var clusterIDB types.UID
|
var clusterIDB types.UID
|
||||||
clusterIDB, err = GetClusterID(ctx, clientB)
|
clusterIDB, err = GetClusterID(ctx, clientB.ConfigMaps(namespaceB))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
return clusterIDA == clusterIDB, nil
|
return clusterIDA == clusterIDB, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UseDefaultNs(ctx context.Context, client v12.CoreV1Interface) bool {
|
||||||
|
_, err := client.Services(config.KubevpnNamespace).Get(ctx, config.ConfigMapPodTrafficManager, metav1.GetOptions{})
|
||||||
|
return err == nil
|
||||||
|
}
|
||||||
|
|
||||||
func ConvertToKubeConfigBytes(factory cmdutil.Factory) ([]byte, string, error) {
|
func ConvertToKubeConfigBytes(factory cmdutil.Factory) ([]byte, string, error) {
|
||||||
loader := factory.ToRawKubeConfigLoader()
|
loader := factory.ToRawKubeConfigLoader()
|
||||||
namespace, _, err := loader.Namespace()
|
namespace, _, err := loader.Namespace()
|
||||||
|
@@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
@@ -28,8 +29,13 @@ func Main(f util.Factory) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
var ns string
|
||||||
|
_, err = clientset.CoreV1().Services(config.KubevpnNamespace).Get(context.Background(), config.ConfigMapPodTrafficManager, metav1.GetOptions{})
|
||||||
|
if err == nil {
|
||||||
|
ns = config.KubevpnNamespace
|
||||||
|
}
|
||||||
|
|
||||||
h := &admissionReviewHandler{f: f, clientset: clientset}
|
h := &admissionReviewHandler{f: f, clientset: clientset, ns: ns}
|
||||||
http.HandleFunc("/pods", func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc("/pods", func(w http.ResponseWriter, r *http.Request) {
|
||||||
serve(w, r, newDelegateToV1AdmitHandler(h.admitPods))
|
serve(w, r, newDelegateToV1AdmitHandler(h.admitPods))
|
||||||
})
|
})
|
||||||
|
@@ -23,6 +23,7 @@ import (
|
|||||||
type admissionReviewHandler struct {
|
type admissionReviewHandler struct {
|
||||||
sync.Mutex
|
sync.Mutex
|
||||||
f cmdutil.Factory
|
f cmdutil.Factory
|
||||||
|
ns string
|
||||||
clientset *kubernetes.Clientset
|
clientset *kubernetes.Clientset
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -80,8 +80,8 @@ func (h *admissionReviewHandler) handleCreate(ar v1.AdmissionReview) *v1.Admissi
|
|||||||
// 2) release old ip
|
// 2) release old ip
|
||||||
h.Lock()
|
h.Lock()
|
||||||
defer h.Unlock()
|
defer h.Unlock()
|
||||||
cmi := h.clientset.CoreV1().ConfigMaps(ar.Request.Namespace)
|
mapInterface := h.clientset.CoreV1().ConfigMaps(util.If(h.ns != "", h.ns, ar.Request.Namespace))
|
||||||
manager := dhcp.NewDHCPManager(cmi, ar.Request.Namespace)
|
manager := dhcp.NewDHCPManager(mapInterface, util.If(h.ns != "", h.ns, ar.Request.Namespace))
|
||||||
var ips []net.IP
|
var ips []net.IP
|
||||||
for k := 0; k < len(container.Env); k++ {
|
for k := 0; k < len(container.Env); k++ {
|
||||||
envVar := container.Env[k]
|
envVar := container.Env[k]
|
||||||
@@ -180,8 +180,8 @@ func (h *admissionReviewHandler) handleDelete(ar v1.AdmissionReview) *v1.Admissi
|
|||||||
if len(ips) != 0 {
|
if len(ips) != 0 {
|
||||||
h.Lock()
|
h.Lock()
|
||||||
defer h.Unlock()
|
defer h.Unlock()
|
||||||
cmi := h.clientset.CoreV1().ConfigMaps(ar.Request.Namespace)
|
mapInterface := h.clientset.CoreV1().ConfigMaps(util.If(h.ns != "", h.ns, ar.Request.Namespace))
|
||||||
err := dhcp.NewDHCPManager(cmi, ar.Request.Namespace).ReleaseIP(context.Background(), ips...)
|
err := dhcp.NewDHCPManager(mapInterface, util.If(h.ns != "", h.ns, ar.Request.Namespace)).ReleaseIP(context.Background(), ips...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
plog.G(context.Background()).Errorf("Failed to release IP %v to DHCP server: %v", ips, err)
|
plog.G(context.Background()).Errorf("Failed to release IP %v to DHCP server: %v", ips, err)
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user