github.com/Beeketing/helm@v2.12.1+incompatible/_proto/hapi/services/tiller.proto (about)

     1  // Copyright The Helm Authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  syntax = "proto3";
    16  
    17  package hapi.services.tiller;
    18  
    19  import "hapi/chart/chart.proto";
    20  import "hapi/chart/config.proto";
    21  import "hapi/release/release.proto";
    22  import "hapi/release/info.proto";
    23  import "hapi/release/test_run.proto";
    24  import "hapi/release/status.proto";
    25  import "hapi/version/version.proto";
    26  
    27  option go_package = "services";
    28  
    29  // ReleaseService is the service that a helm application uses to mutate,
    30  // query, and manage releases.
    31  //
    32  //		Release: A named installation composed of a chart and
    33  // 				 config. At any given time a release has one
    34  //				 chart and one config.
    35  //
    36  //		Config:  A config is a YAML file that supplies values
    37  //				 to the parametrizable templates of a chart.
    38  //
    39  //		Chart:   A chart is a helm package that contains
    40  //				 metadata, a default config, zero or more
    41  //				 optionally parameterizable templates, and
    42  //				 zero or more charts (dependencies).
    43  service ReleaseService {
    44  	// ListReleases retrieves release history.
    45  	// TODO: Allow filtering the set of releases by
    46  	// release status. By default, ListAllReleases returns the releases who
    47  	// current status is "Active".
    48  	rpc ListReleases(ListReleasesRequest) returns (stream ListReleasesResponse) {
    49  	}
    50  
    51  	// GetReleasesStatus retrieves status information for the specified release.
    52  	rpc GetReleaseStatus(GetReleaseStatusRequest) returns (GetReleaseStatusResponse) {
    53  	}
    54  
    55  	// GetReleaseContent retrieves the release content (chart + value) for the specified release.
    56  	rpc GetReleaseContent(GetReleaseContentRequest) returns (GetReleaseContentResponse) {
    57  	}
    58  
    59  	// UpdateRelease updates release content.
    60  	rpc UpdateRelease(UpdateReleaseRequest) returns (UpdateReleaseResponse) {
    61  	}
    62  
    63  	// InstallRelease requests installation of a chart as a new release.
    64  	rpc InstallRelease(InstallReleaseRequest) returns (InstallReleaseResponse) {
    65  	}
    66  
    67  	// UninstallRelease requests deletion of a named release.
    68  	rpc UninstallRelease(UninstallReleaseRequest) returns (UninstallReleaseResponse) {
    69  	}
    70  
    71      // GetVersion returns the current version of the server.
    72      rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {
    73      }
    74  
    75      // RollbackRelease rolls back a release to a previous version.
    76      rpc RollbackRelease(RollbackReleaseRequest) returns (RollbackReleaseResponse) {
    77      }
    78  
    79      // ReleaseHistory retrieves a releasse's history.
    80      rpc GetHistory(GetHistoryRequest) returns (GetHistoryResponse) {
    81      }
    82  
    83      // RunReleaseTest executes the tests defined of a named release
    84      rpc RunReleaseTest(TestReleaseRequest) returns (stream TestReleaseResponse) {
    85      }
    86  }
    87  
    88  // ListReleasesRequest requests a list of releases.
    89  //
    90  // Releases can be retrieved in chunks by setting limit and offset.
    91  //
    92  // Releases can be sorted according to a few pre-determined sort strategies.
    93  message ListReleasesRequest {
    94  	// Limit is the maximum number of releases to be returned.
    95  	int64 limit  = 1;
    96  
    97  	// Offset is the last release name that was seen. The next listing
    98  	// operation will start with the name after this one.
    99  	// Example: If list one returns albert, bernie, carl, and sets 'next: dennis'.
   100  	// dennis is the offset. Supplying 'dennis' for the next request should
   101  	// cause the next batch to return a set of results starting with 'dennis'.
   102  	string offset = 2;
   103  
   104  	// SortBy is the sort field that the ListReleases server should sort data before returning.
   105  	ListSort.SortBy sort_by = 3;
   106  
   107  	// Filter is a regular expression used to filter which releases should be listed.
   108  	//
   109  	// Anything that matches the regexp will be included in the results.
   110  	string filter = 4;
   111  
   112  	// SortOrder is the ordering directive used for sorting.
   113  	ListSort.SortOrder sort_order = 5;
   114  
   115  	repeated hapi.release.Status.Code status_codes = 6;
   116  	// Namespace is the filter to select releases only from a specific namespace.
   117  	string namespace = 7;
   118  }
   119  
   120  // ListSort defines sorting fields on a release list.
   121  message ListSort{
   122  	// SortBy defines sort operations.
   123  	enum SortBy {
   124  		UNKNOWN = 0;
   125  		NAME = 1;
   126  		LAST_RELEASED = 2;
   127  		CHART_NAME = 3;
   128  	}
   129  
   130  	// SortOrder defines sort orders to augment sorting operations.
   131  	enum SortOrder {
   132  		ASC = 0;
   133  		DESC = 1;
   134  	}
   135  }
   136  
   137  // ListReleasesResponse is a list of releases.
   138  message ListReleasesResponse {
   139   	// Count is the expected total number of releases to be returned.
   140  	int64 count  = 1;
   141  
   142  	// Next is the name of the next release. If this is other than an empty
   143  	// string, it means there are more results.
   144  	string next = 2;
   145  
   146  	// Total is the total number of queryable releases.
   147  	int64 total  = 3;
   148  
   149  	// Releases is the list of found release objects.
   150  	repeated hapi.release.Release releases = 4;
   151  }
   152  
   153  // GetReleaseStatusRequest is a request to get the status of a release.
   154  message GetReleaseStatusRequest {
   155  	// Name is the name of the release
   156  	string name = 1;
   157  	// Version is the version of the release
   158  	int32 version = 2;
   159  }
   160  
   161  // GetReleaseStatusResponse is the response indicating the status of the named release.
   162  message GetReleaseStatusResponse {
   163  	// Name is the name of the release.
   164  	string name = 1;
   165  
   166  	// Info contains information about the release.
   167  	hapi.release.Info info = 2;
   168  
   169    // Namespace the release was released into
   170    string namespace = 3;
   171  }
   172  
   173  // GetReleaseContentRequest is a request to get the contents of a release.
   174  message GetReleaseContentRequest {
   175  	// The name of the release
   176  	string name = 1;
   177  	// Version is the version of the release
   178  	int32 version = 2;
   179  }
   180  
   181  // GetReleaseContentResponse is a response containing the contents of a release.
   182  message GetReleaseContentResponse {
   183  	// The release content
   184  	hapi.release.Release release = 1;
   185  }
   186  
   187  // UpdateReleaseRequest updates a release.
   188  message UpdateReleaseRequest {
   189  	// The name of the release
   190  	string name = 1;
   191  	// Chart is the protobuf representation of a chart.
   192  	hapi.chart.Chart chart = 2;
   193  	// Values is a string containing (unparsed) YAML values.
   194  	hapi.chart.Config values = 3;
   195  	// dry_run, if true, will run through the release logic, but neither create
   196  	bool dry_run = 4;
   197  	// DisableHooks causes the server to skip running any hooks for the upgrade.
   198  	bool disable_hooks = 5;
   199  	// Performs pods restart for resources if applicable
   200  	bool recreate = 6;
   201  	// timeout specifies the max amount of time any kubernetes client command can run.
   202  	int64 timeout = 7;
   203  	// ResetValues will cause Tiller to ignore stored values, resetting to default values.
   204  	bool reset_values = 8;
   205  	// wait, if true, will wait until all Pods, PVCs, and Services are in a ready state
   206  	// before marking the release as successful. It will wait for as long as timeout
   207  	bool wait = 9;
   208  	// ReuseValues will cause Tiller to reuse the values from the last release.
   209  	// This is ignored if reset_values is set.
   210  	bool reuse_values = 10;
   211  	// Force resource update through delete/recreate if needed.
   212  	bool force = 11;
   213  	// Description, if set, will set the description for the updated release
   214  	string description = 12;
   215  }
   216  
   217  // UpdateReleaseResponse is the response to an update request.
   218  message UpdateReleaseResponse {
   219  	hapi.release.Release release = 1;
   220  }
   221  
   222  message RollbackReleaseRequest {
   223  	// The name of the release
   224  	string name = 1;
   225  	// dry_run, if true, will run through the release logic but no create
   226  	bool dry_run = 2;
   227  	// DisableHooks causes the server to skip running any hooks for the rollback
   228  	bool disable_hooks = 3;
   229  	// Version is the version of the release to deploy.
   230  	int32 version = 4;
   231  	// Performs pods restart for resources if applicable
   232  	bool recreate = 5;
   233  	// timeout specifies the max amount of time any kubernetes client command can run.
   234  	int64 timeout = 6;
   235  	// wait, if true, will wait until all Pods, PVCs, and Services are in a ready state
   236  	// before marking the release as successful. It will wait for as long as timeout
   237  	bool wait = 7;
   238  	// Force resource update through delete/recreate if needed.
   239  	bool force = 8;
   240  	// Description, if set, will set the description for the rollback
   241  	string description = 9;
   242  }
   243  
   244  // RollbackReleaseResponse is the response to an update request.
   245  message RollbackReleaseResponse {
   246  	hapi.release.Release release = 1;
   247  }
   248  
   249  // InstallReleaseRequest is the request for an installation of a chart.
   250  message InstallReleaseRequest {
   251  	// Chart is the protobuf representation of a chart.
   252  	hapi.chart.Chart chart = 1;
   253  	// Values is a string containing (unparsed) YAML values.
   254  	hapi.chart.Config values = 2;
   255  	// DryRun, if true, will run through the release logic, but neither create
   256  	// a release object nor deploy to Kubernetes. The release object returned
   257  	// in the response will be fake.
   258  	bool dry_run = 3;
   259  
   260  	// Name is the candidate release name. This must be unique to the
   261  	// namespace, otherwise the server will return an error. If it is not
   262  	// supplied, the server will autogenerate one.
   263  	string name = 4;
   264  
   265  	// DisableHooks causes the server to skip running any hooks for the install.
   266  	bool disable_hooks = 5;
   267  
   268  	// Namespace is the kubernetes namespace of the release.
   269  	string namespace = 6;
   270  
   271  	// Reuse_name requests that Tiller re-uses a name, instead of erroring out.
   272  	bool reuse_name = 7;
   273  
   274  	// timeout specifies the max amount of time any kubernetes client command can run.
   275  	int64 timeout = 8;
   276  	// wait, if true, will wait until all Pods, PVCs, and Services are in a ready state
   277  	// before marking the release as successful. It will wait for as long as timeout
   278  	bool wait = 9;
   279  
   280  	bool disable_crd_hook = 10;
   281  
   282  	// Description, if set, will set the description for the installed release
   283  	string description = 11;
   284  }
   285  
   286  // InstallReleaseResponse is the response from a release installation.
   287  message InstallReleaseResponse {
   288  	hapi.release.Release release = 1;
   289  }
   290  
   291  // UninstallReleaseRequest represents a request to uninstall a named release.
   292  message UninstallReleaseRequest {
   293  	// Name is the name of the release to delete.
   294  	string name = 1;
   295  	// DisableHooks causes the server to skip running any hooks for the uninstall.
   296  	bool disable_hooks = 2;
   297  	// Purge removes the release from the store and make its name free for later use.
   298  	bool purge = 3;
   299  	// timeout specifies the max amount of time any kubernetes client command can run.
   300  	int64 timeout = 4;
   301  	// Description, if set, will set the description for the uninnstalled release
   302  	string description = 5;
   303  }
   304  
   305  // UninstallReleaseResponse represents a successful response to an uninstall request.
   306  message UninstallReleaseResponse {
   307  	// Release is the release that was marked deleted.
   308  	hapi.release.Release release = 1;
   309  	// Info is an uninstall message
   310  	string info = 2;
   311  }
   312  
   313  // GetVersionRequest requests for version information.
   314  message GetVersionRequest {
   315  }
   316  
   317  message GetVersionResponse {
   318    hapi.version.Version Version = 1;
   319  }
   320  
   321  // GetHistoryRequest requests a release's history.
   322  message GetHistoryRequest {
   323  	// The name of the release.
   324  	string name = 1;
   325  	// The maximum number of releases to include.
   326  	int32 max = 2;
   327  }
   328  
   329  // GetHistoryResponse is received in response to a GetHistory rpc.
   330  message GetHistoryResponse {
   331  	repeated hapi.release.Release releases = 1;
   332  }
   333  
   334  // TestReleaseRequest is a request to get the status of a release.
   335  message TestReleaseRequest {
   336  	// Name is the name of the release
   337  	string name = 1;
   338  	// timeout specifies the max amount of time any kubernetes client command can run.
   339  	int64 timeout = 2;
   340  	// cleanup specifies whether or not to attempt pod deletion after test completes
   341  	bool cleanup = 3;
   342  }
   343  
   344  // TestReleaseResponse represents a message from executing a test
   345  message TestReleaseResponse {
   346  	string msg = 1;
   347  	hapi.release.TestRun.Status status = 2;
   348  
   349  }