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

     1  // Copyright 2016 The Kubernetes Authors All rights reserved.
     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 stategies.
    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  	}
   128  
   129  	// SortOrder defines sort orders to augment sorting operations.
   130  	enum SortOrder {
   131  		ASC = 0;
   132  		DESC = 1;
   133  	}
   134  }
   135  
   136  // ListReleasesResponse is a list of releases.
   137  message ListReleasesResponse {
   138   	// Count is the expected total number of releases to be returned.
   139  	int64 count  = 1;
   140  
   141  	// Next is the name of the next release. If this is other than an empty
   142  	// string, it means there are more results.
   143  	string next = 2;
   144  
   145  	// Total is the total number of queryable releases.
   146  	int64 total  = 3;
   147  
   148  	// Releases is the list of found release objects.
   149  	repeated hapi.release.Release releases = 4;
   150  }
   151  
   152  // GetReleaseStatusRequest is a request to get the status of a release.
   153  message GetReleaseStatusRequest {
   154  	// Name is the name of the release
   155  	string name = 1;
   156  	// Version is the version of the release
   157  	int32 version = 2;
   158  }
   159  
   160  // GetReleaseStatusResponse is the response indicating the status of the named release.
   161  message GetReleaseStatusResponse {
   162  	// Name is the name of the release.
   163  	string name = 1;
   164  
   165  	// Info contains information about the release.
   166  	hapi.release.Info info = 2;
   167  
   168    // Namesapce the release was released into
   169    string namespace = 3;
   170  }
   171  
   172  // GetReleaseContentRequest is a request to get the contents of a release.
   173  message GetReleaseContentRequest {
   174  	// The name of the release
   175  	string name = 1;
   176  	// Version is the version of the release
   177  	int32 version = 2;
   178  }
   179  
   180  // GetReleaseContentResponse is a response containing the contents of a release.
   181  message GetReleaseContentResponse {
   182  	// The release content
   183  	hapi.release.Release release = 1;
   184  }
   185  
   186  // UpdateReleaseRequest updates a release.
   187  message UpdateReleaseRequest {
   188  	// The name of the release
   189  	string name = 1;
   190  	// Chart is the protobuf representation of a chart.
   191  	hapi.chart.Chart chart = 2;
   192  	// Values is a string containing (unparsed) YAML values.
   193  	hapi.chart.Config values = 3;
   194  	// dry_run, if true, will run through the release logic, but neither create
   195  	bool dry_run = 4;
   196  	// DisableHooks causes the server to skip running any hooks for the upgrade.
   197  	bool disable_hooks = 5;
   198  	// Performs pods restart for resources if applicable
   199  	bool recreate = 6;
   200  	// timeout specifies the max amount of time any kubernetes client command can run.
   201  	int64 timeout = 7;
   202  	// ResetValues will cause Tiller to ignore stored values, resetting to default values.
   203  	bool reset_values = 8;
   204  	// wait, if true, will wait until all Pods, PVCs, and Services are in a ready state
   205  	// before marking the release as successful. It will wait for as long as timeout
   206  	bool wait = 9;
   207  	// ReuseValues will cause Tiller to reuse the values from the last release.
   208  	// This is ignored if reset_values is set.
   209  	bool reuse_values = 10;
   210  	// Force resource update through delete/recreate if needed.
   211  	bool force = 11;
   212  	// Annotations is an unstructured key value map stored with a release that
   213  	// may be set by external tools to store and retrieve arbitrary metadata.
   214  	map<string,string> annotations = 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  }
   241  
   242  // RollbackReleaseResponse is the response to an update request.
   243  message RollbackReleaseResponse {
   244  	hapi.release.Release release = 1;
   245  }
   246  
   247  // InstallReleaseRequest is the request for an installation of a chart.
   248  message InstallReleaseRequest {
   249  	// Chart is the protobuf representation of a chart.
   250  	hapi.chart.Chart chart = 1;
   251  	// Values is a string containing (unparsed) YAML values.
   252  	hapi.chart.Config values = 2;
   253  	// DryRun, if true, will run through the release logic, but neither create
   254  	// a release object nor deploy to Kubernetes. The release object returned
   255  	// in the response will be fake.
   256  	bool dry_run = 3;
   257  
   258  	// Name is the candidate release name. This must be unique to the
   259  	// namespace, otherwise the server will return an error. If it is not
   260  	// supplied, the server will autogenerate one.
   261  	string name = 4;
   262  
   263  	// DisableHooks causes the server to skip running any hooks for the install.
   264  	bool disable_hooks = 5;
   265  
   266  	// Namepace is the kubernetes namespace of the release.
   267  	string namespace = 6;
   268  
   269  	// ReuseName requests that Tiller re-uses a name, instead of erroring out.
   270  	bool reuse_name = 7;
   271  
   272  	// timeout specifies the max amount of time any kubernetes client command can run.
   273  	int64 timeout = 8;
   274  	// wait, if true, will wait until all Pods, PVCs, and Services are in a ready state
   275  	// before marking the release as successful. It will wait for as long as timeout
   276  	bool wait = 9;
   277  	// Annotations is an unstructured key value map stored with a release that
   278  	// may be set by external tools to store and retrieve arbitrary metadata.
   279  	map<string,string> annotations = 10;
   280  }
   281  
   282  // InstallReleaseResponse is the response from a release installation.
   283  message InstallReleaseResponse {
   284  	hapi.release.Release release = 1;
   285  }
   286  
   287  // UninstallReleaseRequest represents a request to uninstall a named release.
   288  message UninstallReleaseRequest {
   289  	// Name is the name of the release to delete.
   290  	string name = 1;
   291  	// DisableHooks causes the server to skip running any hooks for the uninstall.
   292  	bool disable_hooks = 2;
   293  	// Purge removes the release from the store and make its name free for later use.
   294  	bool purge = 3;
   295  	// timeout specifies the max amount of time any kubernetes client command can run.
   296  	int64 timeout = 4;
   297  }
   298  
   299  // UninstallReleaseResponse represents a successful response to an uninstall request.
   300  message UninstallReleaseResponse {
   301  	// Release is the release that was marked deleted.
   302  	hapi.release.Release release = 1;
   303  	// Info is an uninstall message
   304  	string info = 2;
   305  }
   306  
   307  // GetVersionRequest requests for version information.
   308  message GetVersionRequest {
   309  }
   310  
   311  message GetVersionResponse {
   312    hapi.version.Version Version = 1;
   313  }
   314  
   315  // GetHistoryRequest requests a release's history.
   316  message GetHistoryRequest {
   317  	// The name of the release.
   318  	string name = 1;
   319  	// The maximum number of releases to include.
   320  	int32 max = 2;
   321  }
   322  
   323  // GetHistoryResponse is received in response to a GetHistory rpc.
   324  message GetHistoryResponse {
   325  	repeated hapi.release.Release releases = 1;
   326  }
   327  
   328  // TestReleaseRequest is a request to get the status of a release.
   329  message TestReleaseRequest {
   330  	// Name is the name of the release
   331  	string name = 1;
   332  	// timeout specifies the max amount of time any kubernetes client command can run.
   333  	int64 timeout = 2;
   334  	// cleanup specifies whether or not to attempt pod deletion after test completes
   335  	bool cleanup = 3;
   336  }
   337  
   338  // TestReleaseResponse represents a message from executing a test
   339  message TestReleaseResponse {
   340  	string msg = 1;
   341  	hapi.release.TestRun.Status status = 2;
   342  
   343  }