mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
* Generate swagger files * Add basic Swagger definitions * Add reposerver swagger file * Consolidate swagger files * Move swagger files to swagger-ui directory instead * Put swagger files in swagger-ui * Fix order of operations * Move back to swagger directory * Serve API server swagger files raw for now * Serve reposerver swagger files from API server * Move back to subdirectories, thanks @alexmt * Fix comment on application Rollback * Update two more comments * Fix comment in session.proto * Update generated code * Update generated swagger docs * Fix comment for delete actions in cluster and repository swagger * Set expected collisions and invoke mixins * Update generated code * Create swagger mixins from codegen * Move swagger.json location, thanks @jazminGonzalez-Rivero * Add ref cleanup for swagger combined * Make fewer temp files when generating swagger * Delete intermediate swagger files * Serve new file at /swagger.json * Set up UI server * Update package lock * Commit generated swagger.json files * Add install commands for swagger * Use ReDoc server instead of Swagger UI server * Update lockfile * Make URL paths more consistent * Update package lock * Separate out handlers for Swagger UI, JSON * Rm unnecessary CORS headers ...since we're serving from the app server * Simplify serving * Further simplify serving code * Update package lock * Factor out swagger serving into util * Add test for Swagger server * Use ServeSwaggerUI method to run tests * Update package lock * Don't generate swagger for reposerver * Reset to master Gopkg.lock and server/server.go * Merge in prev change to server/server.go * Redo changes to Gopkg.lock * Fix number of conflicts * Update generated swagger.json for server * Fix issue with project feature error
176 lines
6.2 KiB
Protocol Buffer
176 lines
6.2 KiB
Protocol Buffer
syntax = "proto2";
|
|
option go_package = "github.com/argoproj/argo-cd/server/application";
|
|
|
|
// Application Service
|
|
//
|
|
// Application Service API performs CRUD actions against application resources
|
|
package application;
|
|
|
|
import "gogoproto/gogo.proto";
|
|
import "google/api/annotations.proto";
|
|
import "k8s.io/api/core/v1/generated.proto";
|
|
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
|
|
import "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1/generated.proto";
|
|
import "github.com/argoproj/argo-cd/reposerver/repository/repository.proto";
|
|
|
|
|
|
// ApplicationQuery is a query for application resources
|
|
message ApplicationQuery {
|
|
optional string name = 1;
|
|
required bool refresh = 2 [(gogoproto.nullable) = false];
|
|
repeated string project = 3 [(gogoproto.customname) = "Projects"];
|
|
}
|
|
|
|
// ApplicationEventsQuery is a query for application resource events
|
|
message ApplicationResourceEventsQuery {
|
|
required string name = 1;
|
|
required string resourceName = 2 [(gogoproto.nullable) = false];
|
|
required string resourceUID = 3 [(gogoproto.nullable) = false];
|
|
}
|
|
|
|
// ManifestQuery is a query for manifest resources
|
|
message ApplicationManifestQuery {
|
|
required string name = 1;
|
|
optional string revision = 2 [(gogoproto.nullable) = false];
|
|
}
|
|
|
|
message ApplicationResponse {}
|
|
|
|
message ApplicationCreateRequest {
|
|
required github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application application = 1 [(gogoproto.nullable) = false];
|
|
optional bool upsert = 2;
|
|
}
|
|
|
|
message ApplicationUpdateRequest {
|
|
required github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application application = 1;
|
|
}
|
|
|
|
message ApplicationDeleteRequest {
|
|
required string name = 1;
|
|
optional bool cascade = 2;
|
|
}
|
|
|
|
// ApplicationSyncRequest is a request to apply the config state to live state
|
|
message ApplicationSyncRequest {
|
|
required string name = 1;
|
|
required string revision = 2 [(gogoproto.nullable) = false];
|
|
required bool dryRun = 3 [(gogoproto.nullable) = false];
|
|
required bool prune = 4 [(gogoproto.nullable) = false];
|
|
}
|
|
|
|
// ApplicationUpdateSpecRequest is a request to update application spec
|
|
message ApplicationUpdateSpecRequest {
|
|
required string name = 1;
|
|
required github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationSpec spec = 2 [(gogoproto.nullable) = false];
|
|
}
|
|
|
|
message ApplicationRollbackRequest {
|
|
required string name = 1;
|
|
required int64 id = 2 [(gogoproto.customname) = "ID", (gogoproto.nullable) = false];
|
|
required bool dryRun = 3 [(gogoproto.nullable) = false];
|
|
required bool prune = 4 [(gogoproto.nullable) = false];
|
|
}
|
|
|
|
message ApplicationDeletePodRequest {
|
|
required string name = 1;
|
|
required string podName = 2;
|
|
}
|
|
|
|
message ApplicationPodLogsQuery {
|
|
required string name = 1;
|
|
required string podName = 2;
|
|
required string container = 3 [(gogoproto.nullable) = false];
|
|
required int64 sinceSeconds = 4 [(gogoproto.nullable) = false];
|
|
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time sinceTime = 5;
|
|
required int64 tailLines = 6 [(gogoproto.nullable) = false];
|
|
required bool follow = 7 [(gogoproto.nullable) = false];
|
|
}
|
|
|
|
message LogEntry {
|
|
required string content = 1 [(gogoproto.nullable) = false];
|
|
required k8s.io.apimachinery.pkg.apis.meta.v1.Time timeStamp = 2 [(gogoproto.nullable) = false];
|
|
}
|
|
|
|
// ApplicationService
|
|
service ApplicationService {
|
|
|
|
// List returns list of applications
|
|
rpc List(ApplicationQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationList) {
|
|
option (google.api.http).get = "/api/v1/applications";
|
|
}
|
|
|
|
// ListResourceEvents returns a list of event resources
|
|
rpc ListResourceEvents(ApplicationResourceEventsQuery) returns (k8s.io.api.core.v1.EventList) {
|
|
option (google.api.http).get = "/api/v1/applications/{name}/events";
|
|
}
|
|
|
|
// Watch returns stream of application change events.
|
|
rpc Watch(ApplicationQuery) returns (stream github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationWatchEvent) {
|
|
option (google.api.http).get = "/api/v1/stream/applications";
|
|
}
|
|
|
|
// Create creates an application
|
|
rpc Create(ApplicationCreateRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) {
|
|
option (google.api.http) = {
|
|
post: "/api/v1/applications"
|
|
body: "application"
|
|
};
|
|
}
|
|
|
|
// Get returns an application by name
|
|
rpc Get(ApplicationQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) {
|
|
option (google.api.http).get = "/api/v1/applications/{name}";
|
|
}
|
|
|
|
// GetManifests returns application manifests
|
|
rpc GetManifests(ApplicationManifestQuery) returns (repository.ManifestResponse) {
|
|
option (google.api.http).get = "/api/v1/applications/{name}/manifests";
|
|
}
|
|
|
|
// Update updates an application
|
|
rpc Update(ApplicationUpdateRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) {
|
|
option (google.api.http) = {
|
|
put: "/api/v1/applications/{application.metadata.name}"
|
|
body: "application"
|
|
};
|
|
}
|
|
|
|
// UpdateSpec updates an application spec
|
|
rpc UpdateSpec(ApplicationUpdateSpecRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationSpec) {
|
|
option (google.api.http) = {
|
|
put: "/api/v1/applications/{name}/spec"
|
|
body: "spec"
|
|
};
|
|
}
|
|
|
|
// Delete deletes an application
|
|
rpc Delete(ApplicationDeleteRequest) returns (ApplicationResponse) {
|
|
option (google.api.http).delete = "/api/v1/applications/{name}";
|
|
}
|
|
|
|
// Sync syncs an application to its target state
|
|
rpc Sync(ApplicationSyncRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) {
|
|
option (google.api.http) = {
|
|
post: "/api/v1/applications/{name}/sync"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
// Rollback syncs an application to its target state
|
|
rpc Rollback(ApplicationRollbackRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) {
|
|
option (google.api.http) = {
|
|
post: "/api/v1/applications/{name}/rollback"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
// DeletePod returns stream of log entries for the specified pod. Pod
|
|
rpc DeletePod(ApplicationDeletePodRequest) returns (ApplicationResponse) {
|
|
option (google.api.http).delete = "/api/v1/applications/{name}/pods/{podName}";
|
|
}
|
|
|
|
// PodLogs returns stream of log entries for the specified pod. Pod
|
|
rpc PodLogs(ApplicationPodLogsQuery) returns (stream LogEntry) {
|
|
option (google.api.http).get = "/api/v1/applications/{name}/pods/{podName}/logs";
|
|
}
|
|
}
|