2021-11-08 17:47:10 +00:00
|
|
|
syntax = "proto3";
|
2025-01-10 21:14:00 +00:00
|
|
|
option go_package = "github.com/argoproj/argo-cd/v3/cmpserver/apiclient";
|
2021-11-08 17:47:10 +00:00
|
|
|
|
|
|
|
|
package plugin;
|
|
|
|
|
|
2025-01-10 21:14:00 +00:00
|
|
|
import "github.com/argoproj/argo-cd/v3/reposerver/repository/repository.proto";
|
2024-07-15 13:02:25 +00:00
|
|
|
import "google/protobuf/empty.proto";
|
2022-11-29 18:08:32 +00:00
|
|
|
|
2022-03-15 19:06:21 +00:00
|
|
|
// 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
|
2021-11-08 17:47:10 +00:00
|
|
|
string appName = 1;
|
2022-03-15 19:06:21 +00:00
|
|
|
// 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
|
2021-11-08 17:47:10 +00:00
|
|
|
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;
|
2023-02-02 17:07:58 +00:00
|
|
|
bool isDiscoveryEnabled = 2;
|
2021-11-08 17:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-15 19:06:21 +00:00
|
|
|
message File {
|
|
|
|
|
bytes chunk = 1;
|
2021-11-08 17:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-15 13:02:25 +00:00
|
|
|
// CheckPluginConfigurationResponse contains a list of plugin configuration flags.
|
|
|
|
|
message CheckPluginConfigurationResponse {
|
|
|
|
|
bool isDiscoveryConfigured = 1;
|
2024-10-31 17:35:08 +00:00
|
|
|
bool provideGitCreds = 2;
|
2024-07-15 13:02:25 +00:00
|
|
|
}
|
|
|
|
|
|
2021-11-08 17:47:10 +00:00
|
|
|
// ConfigManagementPlugin Service
|
|
|
|
|
service ConfigManagementPluginService {
|
2022-03-15 19:06:21 +00:00
|
|
|
// GenerateManifests receive a stream containing a tgz archive with all required files necessary
|
|
|
|
|
// to generate manifests
|
|
|
|
|
rpc GenerateManifest(stream AppStreamRequest) returns (ManifestResponse) {
|
2021-11-08 17:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-15 13:02:25 +00:00
|
|
|
// CheckPluginConfiguration is a pre-flight request to check the plugin configuration
|
|
|
|
|
// without sending the whole repo.
|
|
|
|
|
rpc CheckPluginConfiguration(google.protobuf.Empty) returns (CheckPluginConfigurationResponse) {
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-15 19:06:21 +00:00
|
|
|
// MatchRepository returns whether or not the given application is supported by the plugin
|
|
|
|
|
rpc MatchRepository(stream AppStreamRequest) returns (RepositoryResponse) {
|
2021-11-08 17:47:10 +00:00
|
|
|
}
|
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) {
|
|
|
|
|
}
|
2021-11-08 17:47:10 +00:00
|
|
|
}
|