blob: ec9659122cc142f9e817cc9c6a0b0a8076097022 [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);
Serge Bazanskiefdb6e92020-07-13 17:19:27 +020031}
32
33
34message GetDebugKubeconfigRequest {
35 string id = 1; // Kubernetes identity (user)
36 repeated string groups = 2; // Kubernetes groups
37}
38
39message GetDebugKubeconfigResponse {
40 string debug_kubeconfig = 1;
41}
42
43message GetComponentLogsRequest {
44 // For supported paths see core/internal/node/debug.go
45 repeated string component_path = 1;
46 uint32 tail_lines = 2; // 0 = whole ring buffer
47}
48
49message GetComponentLogsResponse {
50 repeated string line = 1;
51}