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

     1  syntax = "proto3";
     2  option go_package = "github.com/argoproj/argo-cd/pkg/apiclient/cluster";
     3  
     4  // Cluster Service
     5  //
     6  // Cluster Service API performs CRUD actions against cluster resources 
     7  package cluster;
     8  
     9  import "gogoproto/gogo.proto";
    10  import "google/api/annotations.proto";
    11  import "k8s.io/api/core/v1/generated.proto";
    12  import "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1/generated.proto";
    13  
    14  
    15  // ClusterQuery is a query for cluster resources
    16  message ClusterQuery {
    17  	string server = 1;
    18  	string name = 2;
    19  }
    20  
    21  message ClusterResponse {}
    22  
    23  message ClusterCreateRequest {
    24  	github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Cluster cluster = 1;
    25  	bool upsert = 2;
    26  }
    27  
    28  message ClusterUpdateRequest {
    29  	github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Cluster cluster = 1;
    30  	repeated string updatedFields = 2;
    31  }
    32  
    33  // ClusterService 
    34  service ClusterService {
    35  
    36  	// List returns list of clusters
    37  	rpc List(ClusterQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ClusterList) {
    38  		option (google.api.http).get = "/api/v1/clusters";
    39  	}
    40  
    41  	// Create creates a cluster
    42  	rpc Create(ClusterCreateRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Cluster) {
    43  		option (google.api.http) = {
    44  			post: "/api/v1/clusters"
    45  			body: "cluster"
    46  		};
    47  	}
    48  
    49  	// Get returns a cluster by server address
    50  	rpc Get(ClusterQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Cluster) {
    51  		option (google.api.http).get = "/api/v1/clusters/{server}";
    52  	}
    53  
    54  	// Update updates a cluster
    55  	rpc Update(ClusterUpdateRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Cluster) {
    56  		option (google.api.http) = {
    57  			put: "/api/v1/clusters/{cluster.server}"
    58  			body: "cluster"
    59  		};
    60  	}
    61  
    62  	// Delete deletes a cluster
    63  	rpc Delete(ClusterQuery) returns (ClusterResponse) {
    64  		option (google.api.http).delete = "/api/v1/clusters/{server}";
    65  	}
    66  
    67  	// RotateAuth rotates the bearer token used for a cluster
    68  	rpc RotateAuth(ClusterQuery) returns (ClusterResponse) {
    69  		option (google.api.http).post = "/api/v1/clusters/{server}/rotate-auth";
    70  	}
    71  
    72  	// InvalidateCache invalidates cluster cache
    73  	rpc InvalidateCache(ClusterQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Cluster) {
    74  		option (google.api.http).post = "/api/v1/clusters/{server}/invalidate-cache";
    75  	}
    76  	
    77  }