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