Skip to content

Commit

Permalink
chore: update RBAC rules, remove old APIs
Browse files Browse the repository at this point in the history
Refs siderolabs#3421.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
  • Loading branch information
AlekSi committed Jun 18, 2021
1 parent 9f24b51 commit 6def3f4
Show file tree
Hide file tree
Showing 23 changed files with 2,373 additions and 3,231 deletions.
5 changes: 0 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/
Expand Down Expand Up @@ -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 \
Expand All @@ -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 \
Expand Down
44 changes: 0 additions & 44 deletions api/health/health.proto

This file was deleted.

21 changes: 3 additions & 18 deletions api/machine/machine.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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; }
Expand Down
64 changes: 0 additions & 64 deletions cmd/talosctl/cmd/talos/recover.go

This file was deleted.

12 changes: 12 additions & 0 deletions hack/protoc-lint/go.mod
Original file line number Diff line number Diff line change
@@ -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
)
Loading

0 comments on commit 6def3f4

Please sign in to comment.