blob: b0369894cd167580e45cdb7693bea620086706f5 [file] [log] [blame]
Serge Bazanskiefdb6e92020-07-13 17:19:27 +02001// Copyright 2020 The Monogon Project Authors.
2//
3// SPDX-License-Identifier: Apache-2.0
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing, software
12// distributed under the License is distributed on an "AS IS" BASIS,
13// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14// See the License for the specific language governing permissions and
15// limitations under the License.
16
17syntax = "proto3";
18package smalltown.core.proto.api;
19option go_package = "git.monogon.dev/source/nexantic.git/core/proto/api";
20
21import "core/proto/api/enrolment.proto";
22
23// NodeDebugService exposes debug and testing endpoints that allow introspection into a running Smalltown instance.
24// It is not authenticated and will be disabled in production. It is currently consumed by core/cmd/dbg and
25// by tests. For exact documentation of the available parameters please look at core/internal/node/debug.go.
26service NodeDebugService {
27 // GetDebugKubeconfig issues kubeconfigs with arbitrary identities and groups for debugging
28 rpc GetDebugKubeconfig(GetDebugKubeconfigRequest) returns (GetDebugKubeconfigResponse);
29 // GetComponentLogs dumps various log ringbuffers for binaries that we run.
30 rpc GetComponentLogs(GetComponentLogsRequest) returns (GetComponentLogsResponse);
31 // GetCondition gives the current status of various conditions inside Smalltown. Mainly used for testing.
32 rpc GetCondition(GetConditionRequest) returns (GetConditionResponse);
33}
34
35
36message GetDebugKubeconfigRequest {
37 string id = 1; // Kubernetes identity (user)
38 repeated string groups = 2; // Kubernetes groups
39}
40
41message GetDebugKubeconfigResponse {
42 string debug_kubeconfig = 1;
43}
44
45message GetComponentLogsRequest {
46 // For supported paths see core/internal/node/debug.go
47 repeated string component_path = 1;
48 uint32 tail_lines = 2; // 0 = whole ring buffer
49}
50
51message GetComponentLogsResponse {
52 repeated string line = 1;
53}
54
55message GetConditionRequest {
56 string name = 1;
57}
58
59message GetConditionResponse {
60 bool ok = 1;
61}