Skip to content

Commit

Permalink
Merge pull request #1 from k8sgpt-ai/feat/add-config
Browse files Browse the repository at this point in the history
Feat/add config
  • Loading branch information
matthisholleville authored May 23, 2023
2 parents 6c4eb60 + ed804f9 commit bee8cea
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
10 changes: 9 additions & 1 deletion protobuf/buf.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,12 @@ The `AnalyzeResponse` object contains an `Error` object, which can be used to in

The `results` field contains a list of `Result` objects, each of which describes an item analyzed by the tool. Each `Result` object contains a `kind` field that describes the type of item (e.g. Deployment, Pod, Service), a `name` field that specifies the name of the item, a list of `ErrorDetail` objects that describe any errors found during analysis of the item, a `details` field that contains additional information about the item, and a `parent_object` field that specifies the name of the parent object, if any.

The `AnalysisItem` object represents an item that can be analyzed by the tool. It contains a name field that specifies the `name` of the item, and a `description` field that provides a brief description of the item.
The `AnalysisItem` object represents an item that can be analyzed by the tool. It contains a name field that specifies the `name` of the item, and a `description` field that provides a brief description of the item.

### Config

The module `config.v1` contains a single `Service` with one rpc named `Config`. The request object for the `Config` method is `ConfigRequest`, which contains parameters for configuring the system. The response object for the `Config` method is `ConfigResponse`, which contains the status of the configuration operation.

The `ConfigRequest` object contains a `Cache` object, which is used to specify cache configuration. The `Cache` object has two fields: `region`, which represents the cache region, and `bucketName`, which represents the name of the cache bucket.

The `ConfigResponse` object contains a status field, which indicates the status of the configuration operation. The value of the status field can be either "ok" or "ko", indicating a successful or unsuccessful configuration, respectively.
14 changes: 14 additions & 0 deletions protobuf/schema/v1/schema.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ message AnalyzeRequest {
string language = 6;
int32 max_concurrency = 7;
string output = 8;
repeated string filters = 9;
}

message SensitiveData {
Expand Down Expand Up @@ -55,8 +56,21 @@ message AnalysisItem {
string description = 2;
}

message ConfigRequest {
Cache cache = 1;
}

message Cache {
string region = 1;
string bucketName = 2;
}

message ConfigResponse {
string status = 1;
}

// Service defines the exposed rpcs of k8sgpt
service Server {
rpc Analyze (AnalyzeRequest) returns (AnalyzeResponse) {}
rpc Config (ConfigRequest) returns (ConfigResponse) {}
}

0 comments on commit bee8cea

Please sign in to comment.