mirror of
https://github.com/siderolabs/talos.git
synced 2026-05-05 12:26:21 +02:00
chore: update RBAC rules, remove old APIs
Refs #3421. Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
This commit is contained in:
parent
9f24b519dc
commit
06209bba28
@ -141,8 +141,6 @@ FROM build AS generate-build
|
||||
COPY ./api/vendor/ /api/vendor/
|
||||
COPY ./api/common/common.proto /api/common/common.proto
|
||||
RUN protoc -I/api -I/api/vendor/ --go_out=paths=source_relative:/api --go-grpc_out=paths=source_relative:/api common/common.proto
|
||||
COPY ./api/health/health.proto /api/health/health.proto
|
||||
RUN protoc -I/api -I/api/vendor/ --go_out=paths=source_relative:/api --go-grpc_out=paths=source_relative:/api health/health.proto
|
||||
COPY ./api/security/security.proto /api/security/security.proto
|
||||
RUN protoc -I/api -I/api/vendor/ --go_out=paths=source_relative:/api --go-grpc_out=paths=source_relative:/api security/security.proto
|
||||
COPY ./api/storage/storage.proto /api/storage/storage.proto
|
||||
@ -171,7 +169,6 @@ RUN --mount=type=cache,target=/.cache go generate ./...
|
||||
|
||||
FROM --platform=${BUILDPLATFORM} scratch AS generate
|
||||
COPY --from=generate-build /api/common/*.pb.go /pkg/machinery/api/common/
|
||||
COPY --from=generate-build /api/health/*.pb.go /pkg/machinery/api/health/
|
||||
COPY --from=generate-build /api/security/*.pb.go /pkg/machinery/api/security/
|
||||
COPY --from=generate-build /api/machine/*.pb.go /pkg/machinery/api/machine/
|
||||
COPY --from=generate-build /api/time/*.pb.go /pkg/machinery/api/time/
|
||||
@ -653,7 +650,6 @@ COPY ./hack/protoc-gen-doc/markdown.tmpl /tmp/markdown.tmpl
|
||||
RUN protoc \
|
||||
-I/protos \
|
||||
-I/protos/common \
|
||||
-I/protos/health \
|
||||
-I/protos/inspect \
|
||||
-I/protos/machine \
|
||||
-I/protos/network \
|
||||
@ -665,7 +661,6 @@ RUN protoc \
|
||||
--doc_opt=/tmp/markdown.tmpl,api.md \
|
||||
--doc_out=/tmp \
|
||||
/protos/common/*.proto \
|
||||
/protos/health/*.proto \
|
||||
/protos/inspect/*.proto \
|
||||
/protos/machine/*.proto \
|
||||
/protos/network/*.proto \
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package health;
|
||||
|
||||
option go_package = "github.com/talos-systems/talos/pkg/machinery/api/health";
|
||||
|
||||
import "google/protobuf/empty.proto";
|
||||
|
||||
// The health service definition.
|
||||
service Health {
|
||||
rpc Check(google.protobuf.Empty) returns (HealthCheckResponse);
|
||||
rpc Watch(HealthWatchRequest) returns (stream HealthCheckResponse);
|
||||
rpc Ready(google.protobuf.Empty) returns (ReadyCheckResponse);
|
||||
}
|
||||
|
||||
message HealthWatchRequest {
|
||||
int64 interval_seconds = 1;
|
||||
}
|
||||
|
||||
message HealthCheck {
|
||||
enum ServingStatus {
|
||||
UNKNOWN = 0;
|
||||
SERVING = 1;
|
||||
NOT_SERVING = 2;
|
||||
}
|
||||
ServingStatus status = 1;
|
||||
}
|
||||
|
||||
message HealthCheckResponse {
|
||||
repeated HealthCheck messages = 1;
|
||||
}
|
||||
|
||||
message ReadyCheck {
|
||||
enum ReadyStatus {
|
||||
UNKNOWN = 0;
|
||||
READY = 1;
|
||||
NOT_READY = 2;
|
||||
}
|
||||
ReadyStatus status = 1;
|
||||
}
|
||||
|
||||
message ReadyCheckResponse {
|
||||
repeated ReadyCheck messages = 1;
|
||||
}
|
||||
@ -68,9 +68,9 @@ service MachineService {
|
||||
rpc Restart(RestartRequest) returns (RestartResponse);
|
||||
rpc Rollback(RollbackRequest) returns (RollbackResponse);
|
||||
rpc Reset(ResetRequest) returns (ResetResponse);
|
||||
rpc Recover(RecoverRequest) returns (RecoverResponse);
|
||||
rpc RemoveBootkubeInitializedKey(google.protobuf.Empty)
|
||||
returns (RemoveBootkubeInitializedKeyResponse);
|
||||
rpc RemoveBootkubeInitializedKey(google.protobuf.Empty) returns (RemoveBootkubeInitializedKeyResponse) {
|
||||
option deprecated = true;
|
||||
};
|
||||
rpc ServiceList(google.protobuf.Empty) returns (ServiceListResponse);
|
||||
rpc ServiceRestart(ServiceRestartRequest) returns (ServiceRestartResponse);
|
||||
rpc ServiceStart(ServiceStartRequest) returns (ServiceStartResponse);
|
||||
@ -207,21 +207,6 @@ message ResetRequest {
|
||||
message Reset { common.Metadata metadata = 1; }
|
||||
message ResetResponse { repeated Reset messages = 1; }
|
||||
|
||||
// rpc recover
|
||||
|
||||
message RecoverRequest {
|
||||
enum Source {
|
||||
ETCD = 0;
|
||||
APISERVER = 1;
|
||||
}
|
||||
|
||||
Source source = 1;
|
||||
}
|
||||
|
||||
// The recover message containing the recover status.
|
||||
message Recover { common.Metadata metadata = 1; }
|
||||
message RecoverResponse { repeated Recover messages = 1; }
|
||||
|
||||
// rpc shutdown
|
||||
// The messages message containing the shutdown status.
|
||||
message Shutdown { common.Metadata metadata = 1; }
|
||||
|
||||
@ -1,64 +0,0 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
package talos
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/machine"
|
||||
"github.com/talos-systems/talos/pkg/machinery/client"
|
||||
)
|
||||
|
||||
var (
|
||||
recoverSource string
|
||||
apiserverString = strings.ToLower(machine.RecoverRequest_APISERVER.String())
|
||||
etcdString = strings.ToLower(machine.RecoverRequest_ETCD.String())
|
||||
)
|
||||
|
||||
// recoverCmd represents the recover command.
|
||||
var recoverCmd = &cobra.Command{
|
||||
Use: "recover",
|
||||
Short: "Recover a control plane",
|
||||
Long: ``,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return WithClient(func(ctx context.Context, c *client.Client) error {
|
||||
var source machine.RecoverRequest_Source
|
||||
|
||||
switch recoverSource {
|
||||
case apiserverString:
|
||||
source = machine.RecoverRequest_APISERVER
|
||||
case etcdString:
|
||||
source = machine.RecoverRequest_ETCD
|
||||
default:
|
||||
return fmt.Errorf("unknown recovery source: %q", recoverSource)
|
||||
}
|
||||
|
||||
if err := c.Recover(ctx, source); err != nil {
|
||||
return fmt.Errorf("error executing recovery: %s", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
recoverCmd.Flags().StringVarP(
|
||||
&recoverSource,
|
||||
"source",
|
||||
"s",
|
||||
apiserverString,
|
||||
fmt.Sprintf(
|
||||
"The data source for restoring the control plane manifests from (valid options are %q and %q)",
|
||||
apiserverString,
|
||||
etcdString),
|
||||
)
|
||||
|
||||
addCommand(recoverCmd)
|
||||
}
|
||||
12
hack/protoc-lint/go.mod
Normal file
12
hack/protoc-lint/go.mod
Normal file
@ -0,0 +1,12 @@
|
||||
module github.com/talos-systems/talos-hack-protoc-lint
|
||||
|
||||
go 1.16
|
||||
|
||||
replace github.com/talos-systems/talos/pkg/machinery => ../../pkg/machinery
|
||||
|
||||
require (
|
||||
github.com/stretchr/testify v1.7.0
|
||||
github.com/talos-systems/talos/pkg/machinery v0.0.0-00010101000000-000000000000
|
||||
google.golang.org/grpc v1.38.0
|
||||
google.golang.org/protobuf v1.26.0
|
||||
)
|
||||
278
hack/protoc-lint/go.sum
Normal file
278
hack/protoc-lint/go.sum
Normal file
@ -0,0 +1,278 @@
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
github.com/AlekSi/pointer v1.1.0/go.mod h1:y7BvfRI3wXPWKXEBhU71nbnIEEZX0QTSB2Bj48UJIZE=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
||||
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
|
||||
github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cilium/ebpf v0.5.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs=
|
||||
github.com/cilium/ebpf v0.6.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk=
|
||||
github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
|
||||
github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
|
||||
github.com/cosi-project/runtime v0.0.0-20210603165903-ca95c7538d17/go.mod h1:v/3MIWNuuOSdXXMl3QgCSwZrAk1fTOmQHEnTAfvDqP4=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/gertd/go-pluralize v0.1.7/go.mod h1:O4eNeeIf91MHh1GJ2I47DNtaesm66NYvjYgAahcqSDQ=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
|
||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-memdb v1.3.2/go.mod h1:Mluclgwib3R93Hk5fxEfiRhB+6Dar64wWh71LpNSe3g=
|
||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/josharian/native v0.0.0-20200817173448-b6b71def0850/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
|
||||
github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw=
|
||||
github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ=
|
||||
github.com/jsimonetti/rtnetlink v0.0.0-20201009170750-9c6f07d100c1/go.mod h1:hqoO/u39cqLeBLebZ8fWdE96O7FxrAsRYhnVOdgHxok=
|
||||
github.com/jsimonetti/rtnetlink v0.0.0-20201216134343-bde56ed16391/go.mod h1:cR77jAZG3Y3bsb8hF6fHJbFoyFukLFOkQ98S0pQz3xw=
|
||||
github.com/jsimonetti/rtnetlink v0.0.0-20201220180245-69540ac93943/go.mod h1:z4c53zj6Eex712ROyh8WI0ihysb5j2ROyV42iNogmAs=
|
||||
github.com/jsimonetti/rtnetlink v0.0.0-20210122163228-8d122574c736/go.mod h1:ZXpIyOK59ZnN7J0BV99cZUPmsqDRZ3eq5X+st7u/oSA=
|
||||
github.com/jsimonetti/rtnetlink v0.0.0-20210212075122-66c871082f2b/go.mod h1:8w9Rh8m+aHZIG69YPGGem1i5VzoyRC8nw2kA8B+ik5U=
|
||||
github.com/jsimonetti/rtnetlink v0.0.0-20210525051524-4cc836578190/go.mod h1:NmKSdU4VGSiv1bMsdqNALI4RSvvjtz65tTMCnD05qLo=
|
||||
github.com/jsimonetti/rtnetlink v0.0.0-20210531051304-b34cb89a106b/go.mod h1:ZCK5BH4LTwHIDd0YTCwQmjryD2W/gFdigyDZzqY8dsw=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/mdlayher/ethtool v0.0.0-20210210192532-2b88debcdd43/go.mod h1:+t7E0lkKfbBsebllff1xdTmyJt8lH37niI6kwFk9OTo=
|
||||
github.com/mdlayher/genetlink v1.0.0/go.mod h1:0rJ0h4itni50A86M2kHcgS85ttZazNt7a8H2a2cw0Gc=
|
||||
github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA=
|
||||
github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M=
|
||||
github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY=
|
||||
github.com/mdlayher/netlink v1.1.1/go.mod h1:WTYpFb/WTvlRJAyKhZL5/uy69TDDpHHu2VZmb2XgV7o=
|
||||
github.com/mdlayher/netlink v1.2.0/go.mod h1:kwVW1io0AZy9A1E2YYgaD4Cj+C+GPkU6klXCMzIJ9p8=
|
||||
github.com/mdlayher/netlink v1.2.1/go.mod h1:bacnNlfhqHqqLo4WsYeXSqfyXkInQ9JneWI68v1KwSU=
|
||||
github.com/mdlayher/netlink v1.2.2-0.20210123213345-5cc92139ae3e/go.mod h1:bacnNlfhqHqqLo4WsYeXSqfyXkInQ9JneWI68v1KwSU=
|
||||
github.com/mdlayher/netlink v1.3.0/go.mod h1:xK/BssKuwcRXHrtN04UBkwQ6dY9VviGGuriDdoPSWys=
|
||||
github.com/mdlayher/netlink v1.4.0/go.mod h1:dRJi5IABcZpBD2A3D0Mv/AiX8I9uDEu5oGkAVrekmf8=
|
||||
github.com/mdlayher/netlink v1.4.1/go.mod h1:e4/KuJ+s8UhfUpO9z00/fDZZmhSrs+oxyqAS9cNgn6Q=
|
||||
github.com/mdlayher/socket v0.0.0-20210307095302-262dc9984e00/go.mod h1:GAFlyu4/XV68LkQKYzKhIo/WW7j3Zi0YRAz/BOoanUc=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc=
|
||||
github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/talos-systems/crypto v0.3.1-0.20210615131117-6bc5bb50c527/go.mod h1:xaNCB2/Bxaj+qrkdeodhRv5eKQVvKOGBBMj58MrIPY8=
|
||||
github.com/talos-systems/go-blockdevice v0.2.1-0.20210526155905-30c2bc3cb62a/go.mod h1:qnn/zDc09I1DA2BUDDCOSA2D0P8pIDjN8pGiRoRaQig=
|
||||
github.com/talos-systems/go-cmd v0.0.0-20210216164758-68eb0067e0f0/go.mod h1:kf+rZzTEmlDiYQ6ulslvRONnKLQH8x83TowltGMhO+k=
|
||||
github.com/talos-systems/go-retry v0.1.1-0.20201113203059-8c63d290a688/go.mod h1:HiXQqyVStZ35uSY/MTLWVvQVmC3lIW2MS5VdDaMtoKM=
|
||||
github.com/talos-systems/go-retry v0.2.1-0.20210119124456-b9dc1a990133/go.mod h1:HiXQqyVStZ35uSY/MTLWVvQVmC3lIW2MS5VdDaMtoKM=
|
||||
github.com/talos-systems/net v0.2.1-0.20210212213224-05190541b0fa/go.mod h1:VreSAyRmxMtqussAHSKMKkJQa1YwBTSVfkmE4Jydam4=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
|
||||
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
|
||||
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
|
||||
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
||||
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
|
||||
go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201216054612-986b41b23924/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
|
||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5 h1:wjuX4b5yYQnEQHzd+CBcrcC6OVR2J1CN6mUy0oSxIPo=
|
||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201118182958-a01c418693c7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201130171929-760e229fe7c5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201218084310-7d0127a74742/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210110051926-789bb1bd4061/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210123111255-9b0068b26619/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210216163648-f7da38b97c65/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea h1:+WiDlPBBaO+h9vPNZi8uJ3k4BkKQB7Iow3aqwHVA5hI=
|
||||
golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20210524171403-669157292da3 h1:xFyh6GBb+NO1L0xqb978I3sBPQpk6FrKO0jJGRvdj/0=
|
||||
google.golang.org/genproto v0.0.0-20210524171403-669157292da3/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0=
|
||||
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
5
hack/protoc-lint/lint.go
Normal file
5
hack/protoc-lint/lint.go
Normal file
@ -0,0 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
package lint
|
||||
85
hack/protoc-lint/lint_test.go
Normal file
85
hack/protoc-lint/lint_test.go
Normal file
@ -0,0 +1,85 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
package lint_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/cluster"
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/common"
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/inspect"
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/machine"
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/network"
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/resource"
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/security"
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/storage"
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/time"
|
||||
)
|
||||
|
||||
// TODO https://github.com/talos-systems/talos/issues/3760
|
||||
// Check messages, hook into build.
|
||||
|
||||
func TestProto(t *testing.T) {
|
||||
var protoreflectMethods, grpcServiceDescMethods []string
|
||||
|
||||
for _, services := range []protoreflect.ServiceDescriptors{
|
||||
common.File_common_common_proto.Services(),
|
||||
cluster.File_cluster_cluster_proto.Services(),
|
||||
inspect.File_inspect_inspect_proto.Services(),
|
||||
machine.File_machine_machine_proto.Services(),
|
||||
network.File_network_network_proto.Services(),
|
||||
resource.File_resource_resource_proto.Services(),
|
||||
security.File_security_security_proto.Services(),
|
||||
storage.File_storage_storage_proto.Services(),
|
||||
time.File_time_time_proto.Services(),
|
||||
} {
|
||||
for i := 0; i < services.Len(); i++ {
|
||||
service := services.Get(i)
|
||||
methods := service.Methods()
|
||||
|
||||
for j := 0; j < methods.Len(); j++ {
|
||||
s := fmt.Sprintf("/%s/%s", service.FullName(), methods.Get(j).Name())
|
||||
protoreflectMethods = append(protoreflectMethods, s)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for _, service := range []grpc.ServiceDesc{
|
||||
// no common
|
||||
cluster.ClusterService_ServiceDesc,
|
||||
inspect.InspectService_ServiceDesc,
|
||||
machine.MachineService_ServiceDesc,
|
||||
network.NetworkService_ServiceDesc,
|
||||
resource.ResourceService_ServiceDesc,
|
||||
security.SecurityService_ServiceDesc,
|
||||
storage.StorageService_ServiceDesc,
|
||||
time.TimeService_ServiceDesc,
|
||||
} {
|
||||
for _, method := range service.Methods {
|
||||
s := fmt.Sprintf("/%s/%s", service.ServiceName, method.MethodName)
|
||||
grpcServiceDescMethods = append(grpcServiceDescMethods, s)
|
||||
}
|
||||
|
||||
for _, stream := range service.Streams {
|
||||
s := fmt.Sprintf("/%s/%s", service.ServiceName, stream.StreamName)
|
||||
grpcServiceDescMethods = append(grpcServiceDescMethods, s)
|
||||
}
|
||||
}
|
||||
|
||||
sort.Strings(protoreflectMethods)
|
||||
sort.Strings(grpcServiceDescMethods)
|
||||
|
||||
for _, s := range protoreflectMethods {
|
||||
t.Log(s)
|
||||
}
|
||||
|
||||
require.Equal(t, protoreflectMethods, grpcServiceDescMethods)
|
||||
}
|
||||
@ -587,17 +587,6 @@ func (s *Server) Reset(ctx context.Context, in *machine.ResetRequest) (reply *ma
|
||||
return reply, nil
|
||||
}
|
||||
|
||||
// Recover recovers the control plane.
|
||||
func (s *Server) Recover(ctx context.Context, in *machine.RecoverRequest) (reply *machine.RecoverResponse, err error) {
|
||||
log.Printf("recover request received")
|
||||
|
||||
if s.Controller.Runtime().Config().Machine().Type() == machinetype.TypeJoin {
|
||||
return nil, fmt.Errorf("recover can only be performed on a control plane node")
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("recover is not supported since Talos 0.9, use apply-config to update control plane configuration")
|
||||
}
|
||||
|
||||
// ServiceList returns list of the registered services and their status.
|
||||
func (s *Server) ServiceList(ctx context.Context, in *empty.Empty) (result *machine.ServiceListResponse, err error) {
|
||||
services := system.Services(s.Controller.Runtime()).List()
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
//nolint:golint
|
||||
package services
|
||||
|
||||
import (
|
||||
@ -22,6 +21,65 @@ import (
|
||||
"github.com/talos-systems/talos/pkg/machinery/role"
|
||||
)
|
||||
|
||||
var rules = map[string]role.Set{
|
||||
"/cluster.ClusterService/HealthCheck": role.MakeSet(role.Admin, role.Reader),
|
||||
|
||||
"/inspect.InspectService/ControllerRuntimeDependencies": role.MakeSet(role.Admin, role.Reader),
|
||||
|
||||
"/machine.MachineService/ApplyConfiguration": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/Bootstrap": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/CPUInfo": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/Containers": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/Copy": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/DiskStats": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/DiskUsage": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/Dmesg": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/EtcdForfeitLeadership": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/EtcdLeaveCluster": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/EtcdMemberList": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/EtcdRecover": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/EtcdRemoveMember": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/EtcdSnapshot": role.MakeSet(role.Admin, role.EtcdBackup),
|
||||
"/machine.MachineService/Events": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/GenerateClientConfiguration": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/GenerateConfiguration": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/Hostname": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/Kubeconfig": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/List": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/LoadAvg": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/Logs": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/Memory": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/Mounts": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/NetworkDeviceStats": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/Processes": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/Read": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/Reboot": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/RemoveBootkubeInitializedKey": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/Reset": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/Restart": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/Rollback": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/ServiceList": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/ServiceRestart": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/ServiceStart": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/ServiceStop": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/Shutdown": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/Stats": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/SystemStat": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/Upgrade": role.MakeSet(role.Admin),
|
||||
"/machine.MachineService/Version": role.MakeSet(role.Admin, role.Reader),
|
||||
|
||||
"/network.NetworkService/Interfaces": role.MakeSet(role.Admin, role.Reader),
|
||||
"/network.NetworkService/Routes": role.MakeSet(role.Admin, role.Reader),
|
||||
|
||||
// per-type authorization is handled by the service itself
|
||||
"/resource.ResourceService": role.MakeSet(role.Admin, role.Reader),
|
||||
|
||||
"/storage.StorageService/Disks": role.MakeSet(role.Admin, role.Reader),
|
||||
|
||||
"/time.TimeService/Time": role.MakeSet(role.Admin, role.Reader),
|
||||
"/time.TimeService/TimeCheck": role.MakeSet(role.Admin, role.Reader),
|
||||
}
|
||||
|
||||
type machinedService struct {
|
||||
c runtime.Controller
|
||||
}
|
||||
@ -34,18 +92,7 @@ func (s *machinedService) Main(ctx context.Context, r runtime.Runtime, logWriter
|
||||
}
|
||||
|
||||
authorizer := &authz.Authorizer{
|
||||
Rules: map[string]role.Set{
|
||||
"/machine.MachineService/GenerateClientConfiguration": role.MakeSet(role.Admin),
|
||||
|
||||
"/cluster.ClusterService/HealthCheck": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/List": role.MakeSet(role.Admin, role.Reader),
|
||||
"/machine.MachineService/Version": role.MakeSet(role.Admin, role.Reader),
|
||||
|
||||
// per-type authorization is handled by the service itself
|
||||
"/resource.ResourceService": role.MakeSet(role.Admin, role.Reader),
|
||||
|
||||
// TODO(rbac): More rules
|
||||
},
|
||||
Rules: rules,
|
||||
FallbackRoles: role.MakeSet(role.Admin),
|
||||
Logger: log.New(logWriter, "machined/authz/authorizer ", log.Flags()).Printf,
|
||||
}
|
||||
|
||||
112
internal/app/machined/pkg/system/services/machined_test.go
Normal file
112
internal/app/machined/pkg/system/services/machined_test.go
Normal file
@ -0,0 +1,112 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
package services //nolint:testpackage // to test unexported variable
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/talos-systems/talos/pkg/grpc/middleware/authz"
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/cluster"
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/inspect"
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/machine"
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/network"
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/resource"
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/storage"
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/time"
|
||||
)
|
||||
|
||||
func collectMethods(t *testing.T) map[string]struct{} {
|
||||
methods := make(map[string]struct{})
|
||||
|
||||
for _, service := range []grpc.ServiceDesc{
|
||||
cluster.ClusterService_ServiceDesc,
|
||||
inspect.InspectService_ServiceDesc,
|
||||
machine.MachineService_ServiceDesc,
|
||||
network.NetworkService_ServiceDesc,
|
||||
resource.ResourceService_ServiceDesc,
|
||||
// security.SecurityService_ServiceDesc, - not in machined
|
||||
storage.StorageService_ServiceDesc,
|
||||
time.TimeService_ServiceDesc,
|
||||
} {
|
||||
for _, method := range service.Methods {
|
||||
s := fmt.Sprintf("/%s/%s", service.ServiceName, method.MethodName)
|
||||
require.NotContains(t, methods, s)
|
||||
methods[s] = struct{}{}
|
||||
}
|
||||
|
||||
for _, stream := range service.Streams {
|
||||
s := fmt.Sprintf("/%s/%s", service.ServiceName, stream.StreamName)
|
||||
require.NotContains(t, methods, s)
|
||||
methods[s] = struct{}{}
|
||||
}
|
||||
}
|
||||
|
||||
return methods
|
||||
}
|
||||
|
||||
func TestRules(t *testing.T) { //nolint:gocyclo
|
||||
t.Parallel()
|
||||
|
||||
methods := collectMethods(t)
|
||||
|
||||
// check that there are no rules without matching methods
|
||||
t.Run("NoMethodForRule", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
for rule := range rules {
|
||||
var found bool
|
||||
for method := range methods {
|
||||
prefix := method
|
||||
for prefix != "/" {
|
||||
if prefix == rule {
|
||||
found = true
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
prefix = authz.NextPrefix(prefix)
|
||||
}
|
||||
|
||||
if found {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
assert.True(t, found, "no method for rule %q", rule)
|
||||
}
|
||||
})
|
||||
|
||||
// check that there are no methods without matching rules
|
||||
t.Run("NoRuleForMethod", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
for method := range methods {
|
||||
var found bool
|
||||
for rule := range rules {
|
||||
prefix := method
|
||||
for prefix != "/" {
|
||||
if prefix == rule {
|
||||
found = true
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
prefix = authz.NextPrefix(prefix)
|
||||
}
|
||||
|
||||
if found {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
assert.True(t, found, "no rule for method %q", method)
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -443,9 +443,9 @@ func removeInitializedKey(ctx context.Context, cluster cluster.ClientProvider, n
|
||||
|
||||
fmt.Println("removing self-hosted initialized key")
|
||||
|
||||
_, err = c.MachineClient.RemoveBootkubeInitializedKey(ctx, &emptypb.Empty{})
|
||||
_, err = c.MachineClient.RemoveBootkubeInitializedKey(ctx, &emptypb.Empty{}) //nolint:staticcheck
|
||||
if err != nil {
|
||||
return fmt.Errorf("error removing self-hosted iniitialized key: %w", err)
|
||||
return fmt.Errorf("error removing self-hosted initialized key: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
@ -20,6 +20,7 @@ import (
|
||||
grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/reflection"
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
grpclog "github.com/talos-systems/talos/pkg/grpc/middleware/log"
|
||||
@ -37,11 +38,12 @@ type Options struct {
|
||||
SocketPath string
|
||||
Network string
|
||||
Config *tls.Config
|
||||
LogPrefix string
|
||||
LogDestination io.Writer
|
||||
ServerOptions []grpc.ServerOption
|
||||
UnaryInterceptors []grpc.UnaryServerInterceptor
|
||||
StreamInterceptors []grpc.StreamServerInterceptor
|
||||
LogPrefix string
|
||||
LogDestination io.Writer
|
||||
Reflection bool
|
||||
}
|
||||
|
||||
// Option is the functional option func.
|
||||
@ -111,6 +113,13 @@ func WithDefaultLog() Option {
|
||||
}
|
||||
}
|
||||
|
||||
// WithReflection enables gRPC reflection APIs: https://github.com/grpc/grpc/blob/master/doc/server-reflection.md
|
||||
func WithReflection() Option {
|
||||
return func(args *Options) {
|
||||
args.Reflection = true
|
||||
}
|
||||
}
|
||||
|
||||
func recoveryHandler(logger *log.Logger) grpc_recovery.RecoveryHandlerFunc {
|
||||
return func(p interface{}) error {
|
||||
if logger != nil {
|
||||
@ -167,6 +176,10 @@ func NewServer(r Registrator, setters ...Option) *grpc.Server {
|
||||
server := grpc.NewServer(opts.ServerOptions...)
|
||||
r.Register(server)
|
||||
|
||||
if opts.Reflection {
|
||||
reflection.Register(server)
|
||||
}
|
||||
|
||||
return server
|
||||
}
|
||||
|
||||
|
||||
@ -31,10 +31,10 @@ type Authorizer struct {
|
||||
Logger func(format string, v ...interface{})
|
||||
}
|
||||
|
||||
// nextPrefix returns path's prefix, stopping on slashes and dots:
|
||||
// NextPrefix returns path's prefix, stopping on slashes and dots:
|
||||
// /machine.MachineService/List -> /machine.MachineService -> /machine -> / -> / -> ...
|
||||
// The chain ends with "/" no matter what.
|
||||
func nextPrefix(path string) string {
|
||||
func NextPrefix(path string) string {
|
||||
if path == "" || path[0] != '/' {
|
||||
return "/"
|
||||
}
|
||||
@ -70,7 +70,7 @@ func (a *Authorizer) authorize(ctx context.Context, method string) error {
|
||||
break
|
||||
}
|
||||
|
||||
prefix = nextPrefix(prefix)
|
||||
prefix = NextPrefix(prefix)
|
||||
}
|
||||
|
||||
if !found {
|
||||
|
||||
@ -2,12 +2,14 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
package authz //nolint:testpackage // to test unexported method
|
||||
package authz_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/talos-systems/talos/pkg/grpc/middleware/authz"
|
||||
)
|
||||
|
||||
func TestNextPrefix(t *testing.T) {
|
||||
@ -27,7 +29,7 @@ func TestNextPrefix(t *testing.T) {
|
||||
|
||||
for i, path := range paths[:len(paths)-1] {
|
||||
expected := paths[i+1]
|
||||
actual := nextPrefix(path)
|
||||
actual := authz.NextPrefix(path)
|
||||
assert.Equal(t, expected, actual, "path = %q", path)
|
||||
}
|
||||
})
|
||||
|
||||
@ -1,544 +0,0 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.15.6
|
||||
// source: health/health.proto
|
||||
|
||||
package health
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type HealthCheck_ServingStatus int32
|
||||
|
||||
const (
|
||||
HealthCheck_UNKNOWN HealthCheck_ServingStatus = 0
|
||||
HealthCheck_SERVING HealthCheck_ServingStatus = 1
|
||||
HealthCheck_NOT_SERVING HealthCheck_ServingStatus = 2
|
||||
)
|
||||
|
||||
// Enum value maps for HealthCheck_ServingStatus.
|
||||
var (
|
||||
HealthCheck_ServingStatus_name = map[int32]string{
|
||||
0: "UNKNOWN",
|
||||
1: "SERVING",
|
||||
2: "NOT_SERVING",
|
||||
}
|
||||
HealthCheck_ServingStatus_value = map[string]int32{
|
||||
"UNKNOWN": 0,
|
||||
"SERVING": 1,
|
||||
"NOT_SERVING": 2,
|
||||
}
|
||||
)
|
||||
|
||||
func (x HealthCheck_ServingStatus) Enum() *HealthCheck_ServingStatus {
|
||||
p := new(HealthCheck_ServingStatus)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x HealthCheck_ServingStatus) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (HealthCheck_ServingStatus) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_health_health_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (HealthCheck_ServingStatus) Type() protoreflect.EnumType {
|
||||
return &file_health_health_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x HealthCheck_ServingStatus) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use HealthCheck_ServingStatus.Descriptor instead.
|
||||
func (HealthCheck_ServingStatus) EnumDescriptor() ([]byte, []int) {
|
||||
return file_health_health_proto_rawDescGZIP(), []int{1, 0}
|
||||
}
|
||||
|
||||
type ReadyCheck_ReadyStatus int32
|
||||
|
||||
const (
|
||||
ReadyCheck_UNKNOWN ReadyCheck_ReadyStatus = 0
|
||||
ReadyCheck_READY ReadyCheck_ReadyStatus = 1
|
||||
ReadyCheck_NOT_READY ReadyCheck_ReadyStatus = 2
|
||||
)
|
||||
|
||||
// Enum value maps for ReadyCheck_ReadyStatus.
|
||||
var (
|
||||
ReadyCheck_ReadyStatus_name = map[int32]string{
|
||||
0: "UNKNOWN",
|
||||
1: "READY",
|
||||
2: "NOT_READY",
|
||||
}
|
||||
ReadyCheck_ReadyStatus_value = map[string]int32{
|
||||
"UNKNOWN": 0,
|
||||
"READY": 1,
|
||||
"NOT_READY": 2,
|
||||
}
|
||||
)
|
||||
|
||||
func (x ReadyCheck_ReadyStatus) Enum() *ReadyCheck_ReadyStatus {
|
||||
p := new(ReadyCheck_ReadyStatus)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x ReadyCheck_ReadyStatus) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (ReadyCheck_ReadyStatus) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_health_health_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (ReadyCheck_ReadyStatus) Type() protoreflect.EnumType {
|
||||
return &file_health_health_proto_enumTypes[1]
|
||||
}
|
||||
|
||||
func (x ReadyCheck_ReadyStatus) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ReadyCheck_ReadyStatus.Descriptor instead.
|
||||
func (ReadyCheck_ReadyStatus) EnumDescriptor() ([]byte, []int) {
|
||||
return file_health_health_proto_rawDescGZIP(), []int{3, 0}
|
||||
}
|
||||
|
||||
type HealthWatchRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
IntervalSeconds int64 `protobuf:"varint,1,opt,name=interval_seconds,json=intervalSeconds,proto3" json:"interval_seconds,omitempty"`
|
||||
}
|
||||
|
||||
func (x *HealthWatchRequest) Reset() {
|
||||
*x = HealthWatchRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_health_health_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *HealthWatchRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*HealthWatchRequest) ProtoMessage() {}
|
||||
|
||||
func (x *HealthWatchRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_health_health_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use HealthWatchRequest.ProtoReflect.Descriptor instead.
|
||||
func (*HealthWatchRequest) Descriptor() ([]byte, []int) {
|
||||
return file_health_health_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *HealthWatchRequest) GetIntervalSeconds() int64 {
|
||||
if x != nil {
|
||||
return x.IntervalSeconds
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type HealthCheck struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Status HealthCheck_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=health.HealthCheck_ServingStatus" json:"status,omitempty"`
|
||||
}
|
||||
|
||||
func (x *HealthCheck) Reset() {
|
||||
*x = HealthCheck{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_health_health_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *HealthCheck) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*HealthCheck) ProtoMessage() {}
|
||||
|
||||
func (x *HealthCheck) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_health_health_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use HealthCheck.ProtoReflect.Descriptor instead.
|
||||
func (*HealthCheck) Descriptor() ([]byte, []int) {
|
||||
return file_health_health_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *HealthCheck) GetStatus() HealthCheck_ServingStatus {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return HealthCheck_UNKNOWN
|
||||
}
|
||||
|
||||
type HealthCheckResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Messages []*HealthCheck `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
|
||||
}
|
||||
|
||||
func (x *HealthCheckResponse) Reset() {
|
||||
*x = HealthCheckResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_health_health_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *HealthCheckResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*HealthCheckResponse) ProtoMessage() {}
|
||||
|
||||
func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_health_health_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.
|
||||
func (*HealthCheckResponse) Descriptor() ([]byte, []int) {
|
||||
return file_health_health_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *HealthCheckResponse) GetMessages() []*HealthCheck {
|
||||
if x != nil {
|
||||
return x.Messages
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ReadyCheck struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Status ReadyCheck_ReadyStatus `protobuf:"varint,1,opt,name=status,proto3,enum=health.ReadyCheck_ReadyStatus" json:"status,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ReadyCheck) Reset() {
|
||||
*x = ReadyCheck{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_health_health_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ReadyCheck) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ReadyCheck) ProtoMessage() {}
|
||||
|
||||
func (x *ReadyCheck) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_health_health_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ReadyCheck.ProtoReflect.Descriptor instead.
|
||||
func (*ReadyCheck) Descriptor() ([]byte, []int) {
|
||||
return file_health_health_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *ReadyCheck) GetStatus() ReadyCheck_ReadyStatus {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return ReadyCheck_UNKNOWN
|
||||
}
|
||||
|
||||
type ReadyCheckResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Messages []*ReadyCheck `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ReadyCheckResponse) Reset() {
|
||||
*x = ReadyCheckResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_health_health_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ReadyCheckResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ReadyCheckResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ReadyCheckResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_health_health_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ReadyCheckResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ReadyCheckResponse) Descriptor() ([]byte, []int) {
|
||||
return file_health_health_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ReadyCheckResponse) GetMessages() []*ReadyCheck {
|
||||
if x != nil {
|
||||
return x.Messages
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_health_health_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_health_health_proto_rawDesc = []byte{
|
||||
0x0a, 0x13, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x1a, 0x1b, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65,
|
||||
0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3f, 0x0a, 0x12, 0x48, 0x65,
|
||||
0x61, 0x6c, 0x74, 0x68, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x63,
|
||||
0x6f, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x69, 0x6e, 0x74, 0x65,
|
||||
0x72, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x0b,
|
||||
0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x39, 0x0a, 0x06, 0x73,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x68, 0x65,
|
||||
0x61, 0x6c, 0x74, 0x68, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b,
|
||||
0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06,
|
||||
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e,
|
||||
0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f,
|
||||
0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x52, 0x56, 0x49, 0x4e, 0x47, 0x10,
|
||||
0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x4e, 0x47,
|
||||
0x10, 0x02, 0x22, 0x46, 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63,
|
||||
0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x6d, 0x65, 0x73,
|
||||
0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x68, 0x65,
|
||||
0x61, 0x6c, 0x74, 0x68, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b,
|
||||
0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x7a, 0x0a, 0x0a, 0x52, 0x65,
|
||||
0x61, 0x64, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74,
|
||||
0x68, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x52, 0x65, 0x61,
|
||||
0x64, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x22, 0x34, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
|
||||
0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
|
||||
0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x52,
|
||||
0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x22, 0x44, 0x0a, 0x12, 0x52, 0x65, 0x61, 0x64, 0x79, 0x43,
|
||||
0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x08,
|
||||
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12,
|
||||
0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x79, 0x43, 0x68, 0x65,
|
||||
0x63, 0x6b, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x32, 0xc7, 0x01, 0x0a,
|
||||
0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x3c, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b,
|
||||
0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1b, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74,
|
||||
0x68, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x05, 0x57, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1a,
|
||||
0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x57, 0x61,
|
||||
0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x68, 0x65, 0x61,
|
||||
0x6c, 0x74, 0x68, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x3b, 0x0a, 0x05, 0x52, 0x65, 0x61,
|
||||
0x64, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x68, 0x65, 0x61,
|
||||
0x6c, 0x74, 0x68, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x61, 0x6c, 0x6f, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x74, 0x65,
|
||||
0x6d, 0x73, 0x2f, 0x74, 0x61, 0x6c, 0x6f, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x6d, 0x61, 0x63,
|
||||
0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74,
|
||||
0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_health_health_proto_rawDescOnce sync.Once
|
||||
file_health_health_proto_rawDescData = file_health_health_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_health_health_proto_rawDescGZIP() []byte {
|
||||
file_health_health_proto_rawDescOnce.Do(func() {
|
||||
file_health_health_proto_rawDescData = protoimpl.X.CompressGZIP(file_health_health_proto_rawDescData)
|
||||
})
|
||||
return file_health_health_proto_rawDescData
|
||||
}
|
||||
|
||||
var (
|
||||
file_health_health_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
file_health_health_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
file_health_health_proto_goTypes = []interface{}{
|
||||
(HealthCheck_ServingStatus)(0), // 0: health.HealthCheck.ServingStatus
|
||||
(ReadyCheck_ReadyStatus)(0), // 1: health.ReadyCheck.ReadyStatus
|
||||
(*HealthWatchRequest)(nil), // 2: health.HealthWatchRequest
|
||||
(*HealthCheck)(nil), // 3: health.HealthCheck
|
||||
(*HealthCheckResponse)(nil), // 4: health.HealthCheckResponse
|
||||
(*ReadyCheck)(nil), // 5: health.ReadyCheck
|
||||
(*ReadyCheckResponse)(nil), // 6: health.ReadyCheckResponse
|
||||
(*emptypb.Empty)(nil), // 7: google.protobuf.Empty
|
||||
}
|
||||
)
|
||||
|
||||
var file_health_health_proto_depIdxs = []int32{
|
||||
0, // 0: health.HealthCheck.status:type_name -> health.HealthCheck.ServingStatus
|
||||
3, // 1: health.HealthCheckResponse.messages:type_name -> health.HealthCheck
|
||||
1, // 2: health.ReadyCheck.status:type_name -> health.ReadyCheck.ReadyStatus
|
||||
5, // 3: health.ReadyCheckResponse.messages:type_name -> health.ReadyCheck
|
||||
7, // 4: health.Health.Check:input_type -> google.protobuf.Empty
|
||||
2, // 5: health.Health.Watch:input_type -> health.HealthWatchRequest
|
||||
7, // 6: health.Health.Ready:input_type -> google.protobuf.Empty
|
||||
4, // 7: health.Health.Check:output_type -> health.HealthCheckResponse
|
||||
4, // 8: health.Health.Watch:output_type -> health.HealthCheckResponse
|
||||
6, // 9: health.Health.Ready:output_type -> health.ReadyCheckResponse
|
||||
7, // [7:10] is the sub-list for method output_type
|
||||
4, // [4:7] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_health_health_proto_init() }
|
||||
func file_health_health_proto_init() {
|
||||
if File_health_health_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_health_health_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*HealthWatchRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_health_health_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*HealthCheck); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_health_health_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*HealthCheckResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_health_health_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ReadyCheck); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_health_health_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ReadyCheckResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_health_health_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 5,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_health_health_proto_goTypes,
|
||||
DependencyIndexes: file_health_health_proto_depIdxs,
|
||||
EnumInfos: file_health_health_proto_enumTypes,
|
||||
MessageInfos: file_health_health_proto_msgTypes,
|
||||
}.Build()
|
||||
File_health_health_proto = out.File
|
||||
file_health_health_proto_rawDesc = nil
|
||||
file_health_health_proto_goTypes = nil
|
||||
file_health_health_proto_depIdxs = nil
|
||||
}
|
||||
@ -1,204 +0,0 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
|
||||
package health
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// HealthClient is the client API for Health service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type HealthClient interface {
|
||||
Check(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error)
|
||||
Watch(ctx context.Context, in *HealthWatchRequest, opts ...grpc.CallOption) (Health_WatchClient, error)
|
||||
Ready(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ReadyCheckResponse, error)
|
||||
}
|
||||
|
||||
type healthClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewHealthClient(cc grpc.ClientConnInterface) HealthClient {
|
||||
return &healthClient{cc}
|
||||
}
|
||||
|
||||
func (c *healthClient) Check(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) {
|
||||
out := new(HealthCheckResponse)
|
||||
err := c.cc.Invoke(ctx, "/health.Health/Check", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *healthClient) Watch(ctx context.Context, in *HealthWatchRequest, opts ...grpc.CallOption) (Health_WatchClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Health_ServiceDesc.Streams[0], "/health.Health/Watch", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &healthWatchClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Health_WatchClient interface {
|
||||
Recv() (*HealthCheckResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type healthWatchClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *healthWatchClient) Recv() (*HealthCheckResponse, error) {
|
||||
m := new(HealthCheckResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *healthClient) Ready(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ReadyCheckResponse, error) {
|
||||
out := new(ReadyCheckResponse)
|
||||
err := c.cc.Invoke(ctx, "/health.Health/Ready", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// HealthServer is the server API for Health service.
|
||||
// All implementations must embed UnimplementedHealthServer
|
||||
// for forward compatibility
|
||||
type HealthServer interface {
|
||||
Check(context.Context, *emptypb.Empty) (*HealthCheckResponse, error)
|
||||
Watch(*HealthWatchRequest, Health_WatchServer) error
|
||||
Ready(context.Context, *emptypb.Empty) (*ReadyCheckResponse, error)
|
||||
mustEmbedUnimplementedHealthServer()
|
||||
}
|
||||
|
||||
// UnimplementedHealthServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedHealthServer struct{}
|
||||
|
||||
func (UnimplementedHealthServer) Check(context.Context, *emptypb.Empty) (*HealthCheckResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Check not implemented")
|
||||
}
|
||||
|
||||
func (UnimplementedHealthServer) Watch(*HealthWatchRequest, Health_WatchServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Watch not implemented")
|
||||
}
|
||||
|
||||
func (UnimplementedHealthServer) Ready(context.Context, *emptypb.Empty) (*ReadyCheckResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Ready not implemented")
|
||||
}
|
||||
func (UnimplementedHealthServer) mustEmbedUnimplementedHealthServer() {}
|
||||
|
||||
// UnsafeHealthServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to HealthServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeHealthServer interface {
|
||||
mustEmbedUnimplementedHealthServer()
|
||||
}
|
||||
|
||||
func RegisterHealthServer(s grpc.ServiceRegistrar, srv HealthServer) {
|
||||
s.RegisterService(&Health_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Health_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(emptypb.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HealthServer).Check(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/health.Health/Check",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HealthServer).Check(ctx, req.(*emptypb.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Health_Watch_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(HealthWatchRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(HealthServer).Watch(m, &healthWatchServer{stream})
|
||||
}
|
||||
|
||||
type Health_WatchServer interface {
|
||||
Send(*HealthCheckResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type healthWatchServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *healthWatchServer) Send(m *HealthCheckResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _Health_Ready_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(emptypb.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HealthServer).Ready(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/health.Health/Ready",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HealthServer).Ready(ctx, req.(*emptypb.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Health_ServiceDesc is the grpc.ServiceDesc for Health service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Health_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "health.Health",
|
||||
HandlerType: (*HealthServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Check",
|
||||
Handler: _Health_Check_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Ready",
|
||||
Handler: _Health_Ready_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Watch",
|
||||
Handler: _Health_Watch_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "health/health.proto",
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -60,7 +60,7 @@ type MachineServiceClient interface {
|
||||
Restart(ctx context.Context, in *RestartRequest, opts ...grpc.CallOption) (*RestartResponse, error)
|
||||
Rollback(ctx context.Context, in *RollbackRequest, opts ...grpc.CallOption) (*RollbackResponse, error)
|
||||
Reset(ctx context.Context, in *ResetRequest, opts ...grpc.CallOption) (*ResetResponse, error)
|
||||
Recover(ctx context.Context, in *RecoverRequest, opts ...grpc.CallOption) (*RecoverResponse, error)
|
||||
// Deprecated: Do not use.
|
||||
RemoveBootkubeInitializedKey(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*RemoveBootkubeInitializedKeyResponse, error)
|
||||
ServiceList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ServiceListResponse, error)
|
||||
ServiceRestart(ctx context.Context, in *ServiceRestartRequest, opts ...grpc.CallOption) (*ServiceRestartResponse, error)
|
||||
@ -585,15 +585,7 @@ func (c *machineServiceClient) Reset(ctx context.Context, in *ResetRequest, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *machineServiceClient) Recover(ctx context.Context, in *RecoverRequest, opts ...grpc.CallOption) (*RecoverResponse, error) {
|
||||
out := new(RecoverResponse)
|
||||
err := c.cc.Invoke(ctx, "/machine.MachineService/Recover", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (c *machineServiceClient) RemoveBootkubeInitializedKey(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*RemoveBootkubeInitializedKeyResponse, error) {
|
||||
out := new(RemoveBootkubeInitializedKeyResponse)
|
||||
err := c.cc.Invoke(ctx, "/machine.MachineService/RemoveBootkubeInitializedKey", in, out, opts...)
|
||||
@ -735,7 +727,7 @@ type MachineServiceServer interface {
|
||||
Restart(context.Context, *RestartRequest) (*RestartResponse, error)
|
||||
Rollback(context.Context, *RollbackRequest) (*RollbackResponse, error)
|
||||
Reset(context.Context, *ResetRequest) (*ResetResponse, error)
|
||||
Recover(context.Context, *RecoverRequest) (*RecoverResponse, error)
|
||||
// Deprecated: Do not use.
|
||||
RemoveBootkubeInitializedKey(context.Context, *emptypb.Empty) (*RemoveBootkubeInitializedKeyResponse, error)
|
||||
ServiceList(context.Context, *emptypb.Empty) (*ServiceListResponse, error)
|
||||
ServiceRestart(context.Context, *ServiceRestartRequest) (*ServiceRestartResponse, error)
|
||||
@ -874,10 +866,6 @@ func (UnimplementedMachineServiceServer) Reset(context.Context, *ResetRequest) (
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Reset not implemented")
|
||||
}
|
||||
|
||||
func (UnimplementedMachineServiceServer) Recover(context.Context, *RecoverRequest) (*RecoverResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Recover not implemented")
|
||||
}
|
||||
|
||||
func (UnimplementedMachineServiceServer) RemoveBootkubeInitializedKey(context.Context, *emptypb.Empty) (*RemoveBootkubeInitializedKeyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RemoveBootkubeInitializedKey not implemented")
|
||||
}
|
||||
@ -1509,24 +1497,6 @@ func _MachineService_Reset_Handler(srv interface{}, ctx context.Context, dec fun
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _MachineService_Recover_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RecoverRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MachineServiceServer).Recover(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/machine.MachineService/Recover",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MachineServiceServer).Recover(ctx, req.(*RecoverRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _MachineService_RemoveBootkubeInitializedKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(emptypb.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
@ -1812,10 +1782,6 @@ var MachineService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "Reset",
|
||||
Handler: _MachineService_Reset_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Recover",
|
||||
Handler: _MachineService_Recover_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RemoveBootkubeInitializedKey",
|
||||
Handler: _MachineService_RemoveBootkubeInitializedKey_Handler,
|
||||
|
||||
@ -498,17 +498,6 @@ func (c *Client) Reboot(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// Recover implements the proto.MachineServiceClient interface.
|
||||
func (c *Client) Recover(ctx context.Context, source machineapi.RecoverRequest_Source) (err error) {
|
||||
resp, err := c.MachineClient.Recover(ctx, &machineapi.RecoverRequest{Source: source})
|
||||
|
||||
if err == nil {
|
||||
_, err = FilterMessages(resp, err)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// Rollback implements the proto.MachineServiceClient interface.
|
||||
func (c *Client) Rollback(ctx context.Context) (err error) {
|
||||
resp, err := c.MachineClient.Rollback(ctx, &machineapi.RollbackRequest{})
|
||||
|
||||
@ -24,6 +24,9 @@ const (
|
||||
// Reader defines Talos role for readers who can access read-only APIs that do not expose secrets.
|
||||
Reader = Role(Prefix + "reader")
|
||||
|
||||
// EtcdBackup defines Talos role that allows making etcd backups.
|
||||
EtcdBackup = Role(Prefix + "etcd:backup")
|
||||
|
||||
// Impersonator defines Talos role for impersonating another user (and their role).
|
||||
// Used internally, but may also be granted to the user.
|
||||
Impersonator = Role(Prefix + "impersonator")
|
||||
@ -36,7 +39,7 @@ type Set struct {
|
||||
|
||||
var (
|
||||
// All roles that can be granted to users.
|
||||
All = MakeSet(Admin, Reader, Impersonator)
|
||||
All = MakeSet(Admin, Reader, EtcdBackup, Impersonator)
|
||||
|
||||
// Zero is an empty set of roles.
|
||||
Zero = MakeSet()
|
||||
|
||||
@ -16,18 +16,6 @@ description: Talos gRPC API reference.
|
||||
- [Code](#common.Code)
|
||||
- [ContainerDriver](#common.ContainerDriver)
|
||||
|
||||
- [health/health.proto](#health/health.proto)
|
||||
- [HealthCheck](#health.HealthCheck)
|
||||
- [HealthCheckResponse](#health.HealthCheckResponse)
|
||||
- [HealthWatchRequest](#health.HealthWatchRequest)
|
||||
- [ReadyCheck](#health.ReadyCheck)
|
||||
- [ReadyCheckResponse](#health.ReadyCheckResponse)
|
||||
|
||||
- [HealthCheck.ServingStatus](#health.HealthCheck.ServingStatus)
|
||||
- [ReadyCheck.ReadyStatus](#health.ReadyCheck.ReadyStatus)
|
||||
|
||||
- [Health](#health.Health)
|
||||
|
||||
- [inspect/inspect.proto](#inspect/inspect.proto)
|
||||
- [ControllerDependencyEdge](#inspect.ControllerDependencyEdge)
|
||||
- [ControllerRuntimeDependenciesResponse](#inspect.ControllerRuntimeDependenciesResponse)
|
||||
@ -116,9 +104,6 @@ description: Talos gRPC API reference.
|
||||
- [ReadRequest](#machine.ReadRequest)
|
||||
- [Reboot](#machine.Reboot)
|
||||
- [RebootResponse](#machine.RebootResponse)
|
||||
- [Recover](#machine.Recover)
|
||||
- [RecoverRequest](#machine.RecoverRequest)
|
||||
- [RecoverResponse](#machine.RecoverResponse)
|
||||
- [RemoveBootkubeInitializedKey](#machine.RemoveBootkubeInitializedKey)
|
||||
- [RemoveBootkubeInitializedKeyResponse](#machine.RemoveBootkubeInitializedKeyResponse)
|
||||
- [Reset](#machine.Reset)
|
||||
@ -174,7 +159,6 @@ description: Talos gRPC API reference.
|
||||
- [ListRequest.Type](#machine.ListRequest.Type)
|
||||
- [MachineConfig.MachineType](#machine.MachineConfig.MachineType)
|
||||
- [PhaseEvent.Action](#machine.PhaseEvent.Action)
|
||||
- [RecoverRequest.Source](#machine.RecoverRequest.Source)
|
||||
- [SequenceEvent.Action](#machine.SequenceEvent.Action)
|
||||
- [ServiceStateEvent.Action](#machine.ServiceStateEvent.Action)
|
||||
- [TaskEvent.Action](#machine.TaskEvent.Action)
|
||||
@ -372,135 +356,6 @@ Common metadata message nested in all reply message types
|
||||
|
||||
|
||||
|
||||
<a name="health/health.proto"></a>
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## health/health.proto
|
||||
|
||||
|
||||
|
||||
<a name="health.HealthCheck"></a>
|
||||
|
||||
### HealthCheck
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| status | [HealthCheck.ServingStatus](#health.HealthCheck.ServingStatus) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="health.HealthCheckResponse"></a>
|
||||
|
||||
### HealthCheckResponse
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| messages | [HealthCheck](#health.HealthCheck) | repeated | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="health.HealthWatchRequest"></a>
|
||||
|
||||
### HealthWatchRequest
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| interval_seconds | [int64](#int64) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="health.ReadyCheck"></a>
|
||||
|
||||
### ReadyCheck
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| status | [ReadyCheck.ReadyStatus](#health.ReadyCheck.ReadyStatus) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="health.ReadyCheckResponse"></a>
|
||||
|
||||
### ReadyCheckResponse
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| messages | [ReadyCheck](#health.ReadyCheck) | repeated | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- end messages -->
|
||||
|
||||
|
||||
<a name="health.HealthCheck.ServingStatus"></a>
|
||||
|
||||
### HealthCheck.ServingStatus
|
||||
|
||||
|
||||
| Name | Number | Description |
|
||||
| ---- | ------ | ----------- |
|
||||
| UNKNOWN | 0 | |
|
||||
| SERVING | 1 | |
|
||||
| NOT_SERVING | 2 | |
|
||||
|
||||
|
||||
|
||||
<a name="health.ReadyCheck.ReadyStatus"></a>
|
||||
|
||||
### ReadyCheck.ReadyStatus
|
||||
|
||||
|
||||
| Name | Number | Description |
|
||||
| ---- | ------ | ----------- |
|
||||
| UNKNOWN | 0 | |
|
||||
| READY | 1 | |
|
||||
| NOT_READY | 2 | |
|
||||
|
||||
|
||||
<!-- end enums -->
|
||||
|
||||
<!-- end HasExtensions -->
|
||||
|
||||
|
||||
<a name="health.Health"></a>
|
||||
|
||||
### Health
|
||||
The health service definition.
|
||||
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| ----------- | ------------ | ------------- | ------------|
|
||||
| Check | [.google.protobuf.Empty](#google.protobuf.Empty) | [HealthCheckResponse](#health.HealthCheckResponse) | |
|
||||
| Watch | [HealthWatchRequest](#health.HealthWatchRequest) | [HealthCheckResponse](#health.HealthCheckResponse) stream | |
|
||||
| Ready | [.google.protobuf.Empty](#google.protobuf.Empty) | [ReadyCheckResponse](#health.ReadyCheckResponse) | |
|
||||
|
||||
<!-- end services -->
|
||||
|
||||
|
||||
|
||||
<a name="inspect/inspect.proto"></a>
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
@ -1978,51 +1833,6 @@ The reboot message containing the reboot status.
|
||||
|
||||
|
||||
|
||||
<a name="machine.Recover"></a>
|
||||
|
||||
### Recover
|
||||
The recover message containing the recover status.
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| metadata | [common.Metadata](#common.Metadata) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="machine.RecoverRequest"></a>
|
||||
|
||||
### RecoverRequest
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| source | [RecoverRequest.Source](#machine.RecoverRequest.Source) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="machine.RecoverResponse"></a>
|
||||
|
||||
### RecoverResponse
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| messages | [Recover](#machine.Recover) | repeated | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="machine.RemoveBootkubeInitializedKey"></a>
|
||||
|
||||
### RemoveBootkubeInitializedKey
|
||||
@ -2889,18 +2699,6 @@ File type.
|
||||
|
||||
|
||||
|
||||
<a name="machine.RecoverRequest.Source"></a>
|
||||
|
||||
### RecoverRequest.Source
|
||||
|
||||
|
||||
| Name | Number | Description |
|
||||
| ---- | ------ | ----------- |
|
||||
| ETCD | 0 | |
|
||||
| APISERVER | 1 | |
|
||||
|
||||
|
||||
|
||||
<a name="machine.SequenceEvent.Action"></a>
|
||||
|
||||
### SequenceEvent.Action
|
||||
@ -2989,7 +2787,6 @@ This method is available only on control plane nodes (which run etcd). |
|
||||
| Restart | [RestartRequest](#machine.RestartRequest) | [RestartResponse](#machine.RestartResponse) | |
|
||||
| Rollback | [RollbackRequest](#machine.RollbackRequest) | [RollbackResponse](#machine.RollbackResponse) | |
|
||||
| Reset | [ResetRequest](#machine.ResetRequest) | [ResetResponse](#machine.ResetResponse) | |
|
||||
| Recover | [RecoverRequest](#machine.RecoverRequest) | [RecoverResponse](#machine.RecoverResponse) | |
|
||||
| RemoveBootkubeInitializedKey | [.google.protobuf.Empty](#google.protobuf.Empty) | [RemoveBootkubeInitializedKeyResponse](#machine.RemoveBootkubeInitializedKeyResponse) | |
|
||||
| ServiceList | [.google.protobuf.Empty](#google.protobuf.Empty) | [ServiceListResponse](#machine.ServiceListResponse) | |
|
||||
| ServiceRestart | [ServiceRestartRequest](#machine.ServiceRestartRequest) | [ServiceRestartResponse](#machine.ServiceRestartResponse) | |
|
||||
|
||||
@ -1741,34 +1741,6 @@ talosctl reboot [flags]
|
||||
|
||||
* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos
|
||||
|
||||
## talosctl recover
|
||||
|
||||
Recover a control plane
|
||||
|
||||
```
|
||||
talosctl recover [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for recover
|
||||
-s, --source string The data source for restoring the control plane manifests from (valid options are "apiserver" and "etcd") (default "apiserver")
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--context string Context to be used in command
|
||||
-e, --endpoints strings override default endpoints in Talos configuration
|
||||
-n, --nodes strings target the specified nodes
|
||||
--talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config")
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos
|
||||
|
||||
## talosctl reset
|
||||
|
||||
Reset a node
|
||||
@ -2199,7 +2171,6 @@ A CLI for out-of-band management of Kubernetes nodes created by Talos
|
||||
* [talosctl processes](#talosctl-processes) - List running processes
|
||||
* [talosctl read](#talosctl-read) - Read a file on the machine
|
||||
* [talosctl reboot](#talosctl-reboot) - Reboot a node
|
||||
* [talosctl recover](#talosctl-recover) - Recover a control plane
|
||||
* [talosctl reset](#talosctl-reset) - Reset a node
|
||||
* [talosctl restart](#talosctl-restart) - Restart a process
|
||||
* [talosctl rollback](#talosctl-rollback) - Rollback a node to the previous installation
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user