github.com/argoproj/argo-cd@v1.8.7/server/application/application.proto (about)

     1  syntax = "proto2";
     2  option go_package = "github.com/argoproj/argo-cd/pkg/apiclient/application";
     3  
     4  // Application Service
     5  //
     6  // Application Service API performs CRUD actions against application resources
     7  package application;
     8  
     9  import "gogoproto/gogo.proto";
    10  import "google/api/annotations.proto";
    11  import "k8s.io/api/core/v1/generated.proto";
    12  import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
    13  import "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1/generated.proto";
    14  import "github.com/argoproj/argo-cd/reposerver/repository/repository.proto";
    15  
    16  
    17  // ApplicationQuery is a query for application resources
    18  message ApplicationQuery {
    19  	// the application's name
    20  	optional string name = 1;
    21  	// forces application reconciliation if set to true
    22  	optional string refresh = 2;
    23  	// the project names to restrict returned list applications
    24  	repeated string project = 3 [(gogoproto.customname) = "Projects"];
    25  	// when specified with a watch call, shows changes that occur after that particular version of a resource.
    26  	optional string resourceVersion = 4 [(gogoproto.nullable) = false];
    27  	// the selector to to restrict returned list to applications only with matched labels
    28  	optional string selector = 5 [(gogoproto.nullable) = false];
    29  }
    30  
    31  message RevisionMetadataQuery{
    32  	// the application's name
    33  	required string name = 1;
    34  	// the revision of the app
    35  	required string revision = 2;
    36  }
    37  
    38  // ApplicationEventsQuery is a query for application resource events
    39  message ApplicationResourceEventsQuery {
    40  	required string name = 1;
    41  	required string resourceNamespace = 2 [(gogoproto.nullable) = false];
    42  	required string resourceName = 3 [(gogoproto.nullable) = false];
    43  	required string resourceUID = 4 [(gogoproto.nullable) = false];
    44  }
    45  
    46  // ManifestQuery is a query for manifest resources
    47  message ApplicationManifestQuery {
    48  	required string name = 1;
    49  	optional string revision = 2 [(gogoproto.nullable) = false];
    50  }
    51  
    52  message ApplicationResponse {}
    53  
    54  message ApplicationCreateRequest {
    55  	required github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application application = 1 [(gogoproto.nullable) = false];
    56  	optional bool upsert = 2;
    57  	optional bool validate = 3;
    58  }
    59  
    60  message ApplicationUpdateRequest {
    61  	required github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application application = 1;
    62  	optional bool validate = 2;
    63  }
    64  
    65  message ApplicationDeleteRequest {
    66  	required string name = 1;
    67  	optional bool cascade = 2;
    68  }
    69  
    70  // ApplicationSyncRequest is a request to apply the config state to live state
    71  message ApplicationSyncRequest {
    72  	required string name = 1;
    73  	optional string revision = 2 [(gogoproto.nullable) = false];
    74  	optional bool dryRun = 3 [(gogoproto.nullable) = false];
    75  	optional bool prune = 4 [(gogoproto.nullable) = false];
    76  	optional github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.SyncStrategy strategy = 5;
    77  	repeated github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.SyncOperationResource resources = 7 [(gogoproto.nullable) = false];
    78  	repeated string manifests = 8;
    79  	repeated github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Info infos = 9;
    80  	optional github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.RetryStrategy retryStrategy = 10;
    81  }
    82  
    83  // ApplicationUpdateSpecRequest is a request to update application spec
    84  message ApplicationUpdateSpecRequest {
    85  	required string name = 1;
    86  	required github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationSpec spec = 2 [(gogoproto.nullable) = false];
    87  	optional bool validate = 3;
    88  }
    89  
    90  // ApplicationPatchRequest is a request to patch an application
    91  message ApplicationPatchRequest {
    92  	required string name = 1;
    93  	required string patch = 2 [(gogoproto.nullable) = false];
    94  	required string patchType = 3 [(gogoproto.nullable) = false];
    95  }
    96  
    97  message ApplicationRollbackRequest {
    98  	required string name = 1;
    99  	required int64 id = 2 [(gogoproto.customname) = "ID", (gogoproto.nullable) = false];
   100  	optional bool dryRun = 3 [(gogoproto.nullable) = false];
   101  	optional bool prune = 4 [(gogoproto.nullable) = false];
   102  }
   103  
   104  message ApplicationResourceRequest {
   105  	required string name = 1;
   106  	required string namespace = 2 [(gogoproto.nullable) = false];
   107  	required string resourceName = 3 [(gogoproto.nullable) = false];
   108  	required string version = 4 [(gogoproto.nullable) = false];
   109  	required string group = 5 [(gogoproto.nullable) = false];
   110  	required string kind = 6 [(gogoproto.nullable) = false];
   111  }
   112  
   113  message ApplicationResourcePatchRequest {
   114  	required string name = 1;
   115  	required string namespace = 2 [(gogoproto.nullable) = false];
   116  	required string resourceName = 3 [(gogoproto.nullable) = false];
   117  	required string version = 4 [(gogoproto.nullable) = false];
   118  	required string group = 5 [(gogoproto.nullable) = false];
   119  	required string kind = 6 [(gogoproto.nullable) = false];
   120  	required string patch = 7 [(gogoproto.nullable) = false];
   121  	required string patchType = 8 [(gogoproto.nullable) = false];
   122  }
   123  
   124  message ApplicationResourceDeleteRequest {
   125  	required string name = 1;
   126  	required string namespace = 2 [(gogoproto.nullable) = false];
   127  	required string resourceName = 3 [(gogoproto.nullable) = false];
   128  	required string version = 4 [(gogoproto.nullable) = false];
   129  	required string group = 5 [(gogoproto.nullable) = false];
   130  	required string kind = 6 [(gogoproto.nullable) = false];
   131  	optional bool force = 7 [(gogoproto.nullable) = true];
   132  }
   133  
   134  message ResourceActionRunRequest {
   135  	required string name = 1;
   136  	required string namespace = 2 [(gogoproto.nullable) = false];
   137  	required string resourceName = 3 [(gogoproto.nullable) = false];
   138  	required string version = 4 [(gogoproto.nullable) = false];
   139  	required string group = 5 [(gogoproto.nullable) = false];
   140  	required string kind = 6 [(gogoproto.nullable) = false];
   141  	required string action = 7 [(gogoproto.nullable) = false];
   142  }
   143  
   144  message ResourceActionsListResponse {
   145  	repeated github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ResourceAction actions = 1 [(gogoproto.nullable) = false];
   146  }
   147  
   148  message ApplicationResourceResponse {
   149  	required string manifest = 1 [(gogoproto.nullable) = false];
   150  }
   151  
   152  message ApplicationPodLogsQuery {
   153  	required string name = 1;
   154  	required string namespace = 2 [(gogoproto.nullable) = false];
   155  	required string podName = 3;
   156  	required string container = 4 [(gogoproto.nullable) = false];
   157  	required int64 sinceSeconds = 5 [(gogoproto.nullable) = false];
   158  	optional k8s.io.apimachinery.pkg.apis.meta.v1.Time sinceTime = 6;
   159  	required int64 tailLines = 7 [(gogoproto.nullable) = false];
   160  	required bool follow = 8 [(gogoproto.nullable) = false];
   161  }
   162  
   163  message LogEntry {
   164  	required string content = 1 [(gogoproto.nullable) = false];
   165  	required k8s.io.apimachinery.pkg.apis.meta.v1.Time timeStamp = 2 [(gogoproto.nullable) = false];
   166  	required bool last = 3 [(gogoproto.nullable) = false];
   167  }
   168  
   169  message OperationTerminateRequest {
   170  	required string name = 1;
   171  }
   172  
   173  message ApplicationSyncWindowsQuery {
   174  	required string name = 1;
   175  }
   176  
   177  message ApplicationSyncWindowsResponse {
   178  	repeated ApplicationSyncWindow activeWindows = 1;
   179  	repeated ApplicationSyncWindow assignedWindows = 2;
   180  	required bool canSync = 3;
   181  }
   182  
   183  message ApplicationSyncWindow {
   184  	required string kind = 1;
   185  	required string schedule = 2;
   186  	required string duration = 3;
   187  	required bool manualSync = 4;
   188  }
   189  
   190  message OperationTerminateResponse {
   191  }
   192  
   193  
   194  message ResourcesQuery {
   195  	required string applicationName = 1 [(gogoproto.nullable) = true];
   196  
   197  	optional string namespace = 2 [(gogoproto.nullable) = false];
   198  	optional string name = 3 [(gogoproto.nullable) = false];
   199  	optional string version = 4 [(gogoproto.nullable) = false];
   200  	optional string group = 5 [(gogoproto.nullable) = false];
   201  	optional string kind = 6 [(gogoproto.nullable) = false];
   202  }
   203  
   204  message ManagedResourcesResponse {
   205  	repeated github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ResourceDiff items = 1;
   206  }
   207  
   208  // ApplicationService
   209  service ApplicationService {
   210  
   211  	// List returns list of applications
   212  	rpc List(ApplicationQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationList) {
   213  		option (google.api.http).get = "/api/v1/applications";
   214  	}
   215  
   216  	// ListResourceEvents returns a list of event resources
   217  	rpc ListResourceEvents(ApplicationResourceEventsQuery) returns (k8s.io.api.core.v1.EventList) {
   218  		option (google.api.http).get = "/api/v1/applications/{name}/events";
   219  	}
   220  
   221  	// Watch returns stream of application change events
   222  	rpc Watch(ApplicationQuery) returns (stream github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationWatchEvent) {
   223  		option (google.api.http).get = "/api/v1/stream/applications";
   224  	}
   225  
   226  	// Create creates an application
   227  	rpc Create (ApplicationCreateRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) {
   228  		option (google.api.http) = {
   229  			post: "/api/v1/applications"
   230  			body: "application"
   231  		};
   232  	}
   233  
   234  	// Get returns an application by name
   235  	rpc Get (ApplicationQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) {
   236  		option (google.api.http).get = "/api/v1/applications/{name}";
   237  	}
   238  
   239  	// Get returns sync windows of the application
   240  	rpc GetApplicationSyncWindows (ApplicationSyncWindowsQuery) returns (ApplicationSyncWindowsResponse) {
   241  		option (google.api.http).get = "/api/v1/applications/{name}/syncwindows";
   242  	}
   243  
   244  	// Get the meta-data (author, date, tags, message) for a specific revision of the application
   245  	rpc RevisionMetadata (RevisionMetadataQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.RevisionMetadata) {
   246  		option (google.api.http).get = "/api/v1/applications/{name}/revisions/{revision}/metadata";
   247  	}
   248  
   249  	// GetManifests returns application manifests
   250  	rpc GetManifests (ApplicationManifestQuery) returns (repository.ManifestResponse) {
   251  		option (google.api.http).get = "/api/v1/applications/{name}/manifests";
   252  	}
   253  
   254  	// Update updates an application
   255  	rpc Update(ApplicationUpdateRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) {
   256  		option (google.api.http) = {
   257  			put: "/api/v1/applications/{application.metadata.name}"
   258  			body: "application"
   259  		};
   260  	}
   261  
   262  	// UpdateSpec updates an application spec
   263  	rpc UpdateSpec(ApplicationUpdateSpecRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationSpec) {
   264  		option (google.api.http) = {
   265  			put: "/api/v1/applications/{name}/spec"
   266  			body: "spec"
   267  		};
   268  	}
   269  
   270  	// Patch patch an application
   271  	rpc Patch(ApplicationPatchRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) {
   272  		option (google.api.http) = {
   273  			patch: "/api/v1/applications/{name}"
   274  			body: "*"
   275  		};
   276  	}
   277  
   278  	// Delete deletes an application
   279  	rpc Delete(ApplicationDeleteRequest) returns (ApplicationResponse) {
   280  		option (google.api.http).delete = "/api/v1/applications/{name}";
   281  	}
   282  
   283  	// Sync syncs an application to its target state
   284  	rpc Sync(ApplicationSyncRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) {
   285  		option (google.api.http) = {
   286  			post: "/api/v1/applications/{name}/sync"
   287  			body: "*"
   288  		};
   289  	}
   290  
   291  	// ManagedResources returns list of managed resources
   292  	rpc ManagedResources(ResourcesQuery) returns (ManagedResourcesResponse) {
   293  		option (google.api.http).get = "/api/v1/applications/{applicationName}/managed-resources";
   294  	}
   295  
   296  	// ResourceTree returns resource tree
   297  	rpc ResourceTree(ResourcesQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationTree) {
   298  		option (google.api.http).get = "/api/v1/applications/{applicationName}/resource-tree";
   299  	}
   300  
   301  	// Watch returns stream of application resource tree
   302  	rpc WatchResourceTree(ResourcesQuery) returns (stream github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationTree) {
   303  		option (google.api.http).get = "/api/v1/stream/applications/{applicationName}/resource-tree";
   304  	}
   305  
   306  	// Rollback syncs an application to its target state
   307  	rpc Rollback(ApplicationRollbackRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) {
   308  		option (google.api.http) = {
   309  			post: "/api/v1/applications/{name}/rollback"
   310  			body: "*"
   311  		};
   312  	}
   313  
   314  	// TerminateOperation terminates the currently running operation
   315  	rpc TerminateOperation(OperationTerminateRequest) returns (OperationTerminateResponse) {
   316  		option (google.api.http) = {
   317  			delete: "/api/v1/applications/{name}/operation";
   318  		};
   319  	}
   320  
   321  	// GetResource returns single application resource
   322  	rpc GetResource(ApplicationResourceRequest) returns (ApplicationResourceResponse) {
   323  		option (google.api.http).get = "/api/v1/applications/{name}/resource";
   324  	}
   325  
   326  	// PatchResource patch single application resource
   327  	rpc PatchResource(ApplicationResourcePatchRequest) returns (ApplicationResourceResponse) {
   328  		option (google.api.http) = {
   329  			post: "/api/v1/applications/{name}/resource"
   330  			body: "patch"
   331  		};
   332  	}
   333  
   334  	// ListResourceActions returns list of resource actions
   335  	rpc ListResourceActions(ApplicationResourceRequest) returns (ResourceActionsListResponse) {
   336  		option (google.api.http).get = "/api/v1/applications/{name}/resource/actions";
   337  	}
   338  
   339  	// RunResourceAction run resource action
   340  	rpc RunResourceAction(ResourceActionRunRequest) returns (ApplicationResponse) {
   341  		option (google.api.http) = {
   342  			post: "/api/v1/applications/{name}/resource/actions"
   343  			body: "action"
   344  		};
   345  	}
   346  
   347  	// DeleteResource deletes a single application resource
   348  	rpc DeleteResource(ApplicationResourceDeleteRequest) returns (ApplicationResponse) {
   349  		option (google.api.http).delete = "/api/v1/applications/{name}/resource";
   350  	}
   351  
   352  	// PodLogs returns stream of log entries for the specified pod. Pod
   353  	rpc PodLogs(ApplicationPodLogsQuery) returns (stream LogEntry) {
   354  		option (google.api.http).get = "/api/v1/applications/{name}/pods/{podName}/logs";
   355  	}
   356  }