argo-cd/cmpserver/plugin/plugin.proto

75 lines
2.3 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
option go_package = "github.com/argoproj/argo-cd/v2/cmpserver/apiclient";
package plugin;
feat: parameterized config management plugins (#9135) (#9216) * feat: parameterized CMPs Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * values types for parameters Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Add types for CMP announcement Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Reorg Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * finish type Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * First pass at working GetParametersAnnouncement Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Typos Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Make all fields optional Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Make sure response makes it to repo server Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Refactor for testing Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * lint Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * send build env to param announcement gen Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * test parameter announcement Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * environ tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Rename workdir to app dir Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * handle empty command, start ui work (#11) * Add types for CMP announcement Signed-off-by: zachaller <zachaller@hotmail.com> * Reorg Signed-off-by: zachaller <zachaller@hotmail.com> * finish type Signed-off-by: zachaller <zachaller@hotmail.com> * First pass at working GetParametersAnnouncement Signed-off-by: zachaller <zachaller@hotmail.com> * Typos Signed-off-by: zachaller <zachaller@hotmail.com> * Make all fields optional Signed-off-by: zachaller <zachaller@hotmail.com> * Make sure response makes it to repo server Signed-off-by: zachaller <zachaller@hotmail.com> * Refactor for testing Signed-off-by: zachaller <zachaller@hotmail.com> * values types for parameters Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * lint Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * send build env to param announcement gen Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * test parameter announcement * tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * environ tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Rename workdir to app dir Signed-off-by: zachaller <zachaller@hotmail.com> * handle empty command, start ui work Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix order Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix map merging, make params read-only Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> Co-authored-by: zachaller <zachaller@hotmail.com> * Add helm PoC example plugin Signed-off-by: zachaller <zachaller@hotmail.com> * example as kustomize overlay Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Parameterized cmps docs (#12) * use printf instead of echo Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * docs Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * test for temp dir cleanup Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * handle empty params Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * handle empty values Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * consolidate types Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * docs Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * docs Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * remove duplicate info Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * add warning about param announcements vs param values Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * tests (#13) Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix types Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix test Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix codegen Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix codegen Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * revert test hack Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * docs correction Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix indentation Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix spacing Signed-off-by: CI <michael@crenshaw.dev> * move util function to util file and add test Signed-off-by: CI <michael@crenshaw.dev> * wrap error Signed-off-by: CI <michael@crenshaw.dev> * correct version number Signed-off-by: CI <michael@crenshaw.dev> * document necessity of collectionType param Signed-off-by: CI <michael@crenshaw.dev> * remove part of error message that's not useful (dir name is now randomized) Signed-off-by: CI <michael@crenshaw.dev> * fix things so that they are not broken Signed-off-by: CI <michael@crenshaw.dev> * don't close file before caller gets a chance to use it Signed-off-by: CI <michael@crenshaw.dev> * codegen Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix test Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * comments Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix test Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * DON'T PANIC Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: CI <michael@crenshaw.dev> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: zachaller <zachaller@hotmail.com>
2022-11-29 18:08:32 +00:00
import "github.com/argoproj/argo-cd/v2/reposerver/repository/repository.proto";
// AppStreamRequest is the request object used to send the application's
// files over a stream.
message AppStreamRequest {
oneof request {
ManifestRequestMetadata metadata = 1;
File file = 2;
}
}
// ManifestRequestMetadata defines the metada related to the file being sent
// to the CMP server.
message ManifestRequestMetadata {
// appName refers to the ArgoCD Application name
string appName = 1;
// appRelPath points to the application relative path inside the tarball
string appRelPath = 2;
// checksum is used to verify the integrity of the file
string checksum = 3;
// size relates to the file size in bytes
int64 size = 4;
// env is a list with the environment variables needed to generate manifests
repeated EnvEntry env = 5;
}
// EnvEntry represents an entry in the application's environment
message EnvEntry {
// Name is the name of the variable, usually expressed in uppercase
string name = 1;
// Value is the value of the variable
string value = 2;
}
message ManifestResponse {
repeated string manifests = 1;
string sourceType = 2;
}
message RepositoryResponse {
bool isSupported = 1;
bool isDiscoveryEnabled = 2;
}
feat: parameterized config management plugins (#9135) (#9216) * feat: parameterized CMPs Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * values types for parameters Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Add types for CMP announcement Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Reorg Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * finish type Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * First pass at working GetParametersAnnouncement Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Typos Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Make all fields optional Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Make sure response makes it to repo server Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Refactor for testing Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * lint Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * send build env to param announcement gen Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * test parameter announcement Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * environ tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Rename workdir to app dir Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * handle empty command, start ui work (#11) * Add types for CMP announcement Signed-off-by: zachaller <zachaller@hotmail.com> * Reorg Signed-off-by: zachaller <zachaller@hotmail.com> * finish type Signed-off-by: zachaller <zachaller@hotmail.com> * First pass at working GetParametersAnnouncement Signed-off-by: zachaller <zachaller@hotmail.com> * Typos Signed-off-by: zachaller <zachaller@hotmail.com> * Make all fields optional Signed-off-by: zachaller <zachaller@hotmail.com> * Make sure response makes it to repo server Signed-off-by: zachaller <zachaller@hotmail.com> * Refactor for testing Signed-off-by: zachaller <zachaller@hotmail.com> * values types for parameters Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * lint Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * send build env to param announcement gen Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * test parameter announcement * tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * environ tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Rename workdir to app dir Signed-off-by: zachaller <zachaller@hotmail.com> * handle empty command, start ui work Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix order Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix map merging, make params read-only Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> Co-authored-by: zachaller <zachaller@hotmail.com> * Add helm PoC example plugin Signed-off-by: zachaller <zachaller@hotmail.com> * example as kustomize overlay Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Parameterized cmps docs (#12) * use printf instead of echo Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * docs Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * test for temp dir cleanup Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * handle empty params Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * handle empty values Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * consolidate types Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * docs Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * docs Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * remove duplicate info Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * add warning about param announcements vs param values Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * tests (#13) Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix types Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix test Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix codegen Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix codegen Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * revert test hack Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * docs correction Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix indentation Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix spacing Signed-off-by: CI <michael@crenshaw.dev> * move util function to util file and add test Signed-off-by: CI <michael@crenshaw.dev> * wrap error Signed-off-by: CI <michael@crenshaw.dev> * correct version number Signed-off-by: CI <michael@crenshaw.dev> * document necessity of collectionType param Signed-off-by: CI <michael@crenshaw.dev> * remove part of error message that's not useful (dir name is now randomized) Signed-off-by: CI <michael@crenshaw.dev> * fix things so that they are not broken Signed-off-by: CI <michael@crenshaw.dev> * don't close file before caller gets a chance to use it Signed-off-by: CI <michael@crenshaw.dev> * codegen Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix test Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * comments Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix test Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * DON'T PANIC Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: CI <michael@crenshaw.dev> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: zachaller <zachaller@hotmail.com>
2022-11-29 18:08:32 +00:00
// ParametersAnnouncementResponse contains a list of announcements. This list represents all the parameters which a CMP
// is able to accept.
message ParametersAnnouncementResponse {
repeated repository.ParameterAnnouncement parameterAnnouncements = 1;
}
message File {
bytes chunk = 1;
}
// ConfigManagementPlugin Service
service ConfigManagementPluginService {
// GenerateManifests receive a stream containing a tgz archive with all required files necessary
// to generate manifests
rpc GenerateManifest(stream AppStreamRequest) returns (ManifestResponse) {
}
// MatchRepository returns whether or not the given application is supported by the plugin
rpc MatchRepository(stream AppStreamRequest) returns (RepositoryResponse) {
}
feat: parameterized config management plugins (#9135) (#9216) * feat: parameterized CMPs Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * values types for parameters Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Add types for CMP announcement Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Reorg Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * finish type Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * First pass at working GetParametersAnnouncement Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Typos Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Make all fields optional Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Make sure response makes it to repo server Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Refactor for testing Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * lint Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * send build env to param announcement gen Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * test parameter announcement Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * environ tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Rename workdir to app dir Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * handle empty command, start ui work (#11) * Add types for CMP announcement Signed-off-by: zachaller <zachaller@hotmail.com> * Reorg Signed-off-by: zachaller <zachaller@hotmail.com> * finish type Signed-off-by: zachaller <zachaller@hotmail.com> * First pass at working GetParametersAnnouncement Signed-off-by: zachaller <zachaller@hotmail.com> * Typos Signed-off-by: zachaller <zachaller@hotmail.com> * Make all fields optional Signed-off-by: zachaller <zachaller@hotmail.com> * Make sure response makes it to repo server Signed-off-by: zachaller <zachaller@hotmail.com> * Refactor for testing Signed-off-by: zachaller <zachaller@hotmail.com> * values types for parameters Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * lint Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * send build env to param announcement gen Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * test parameter announcement * tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * environ tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Rename workdir to app dir Signed-off-by: zachaller <zachaller@hotmail.com> * handle empty command, start ui work Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix order Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix map merging, make params read-only Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> Co-authored-by: zachaller <zachaller@hotmail.com> * Add helm PoC example plugin Signed-off-by: zachaller <zachaller@hotmail.com> * example as kustomize overlay Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * Parameterized cmps docs (#12) * use printf instead of echo Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * docs Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * test for temp dir cleanup Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * handle empty params Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * handle empty values Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * consolidate types Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * docs Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * docs Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * remove duplicate info Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * add warning about param announcements vs param values Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * tests (#13) Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * tests Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix types Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix test Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix codegen Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix codegen Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * revert test hack Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * docs correction Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix indentation Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix spacing Signed-off-by: CI <michael@crenshaw.dev> * move util function to util file and add test Signed-off-by: CI <michael@crenshaw.dev> * wrap error Signed-off-by: CI <michael@crenshaw.dev> * correct version number Signed-off-by: CI <michael@crenshaw.dev> * document necessity of collectionType param Signed-off-by: CI <michael@crenshaw.dev> * remove part of error message that's not useful (dir name is now randomized) Signed-off-by: CI <michael@crenshaw.dev> * fix things so that they are not broken Signed-off-by: CI <michael@crenshaw.dev> * don't close file before caller gets a chance to use it Signed-off-by: CI <michael@crenshaw.dev> * codegen Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix test Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * comments Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix test Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * DON'T PANIC Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: CI <michael@crenshaw.dev> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: zachaller <zachaller@hotmail.com>
2022-11-29 18:08:32 +00:00
// GetParametersAnnouncement gets a list of parameter announcements for the given app
rpc GetParametersAnnouncement(stream AppStreamRequest) returns (ParametersAnnouncementResponse) {
}
}