github.com/darkowlzz/helm@v2.5.1-0.20171213183701-6707fe0468d4+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  }
   213  
   214  // UpdateReleaseResponse is the response to an update request.
   215  message UpdateReleaseResponse {
   216  	hapi.release.Release release = 1;
   217  }
   218  
   219  message RollbackReleaseRequest {
   220  	// The name of the release
   221  	string name = 1;
   222  	// dry_run, if true, will run through the release logic but no create
   223  	bool dry_run = 2;
   224  	// DisableHooks causes the server to skip running any hooks for the rollback
   225  	bool disable_hooks = 3;
   226  	// Version is the version of the release to deploy.
   227  	int32 version = 4;
   228  	// Performs pods restart for resources if applicable
   229  	bool recreate = 5;
   230  	// timeout specifies the max amount of time any kubernetes client command can run.
   231  	int64 timeout = 6;
   232  	// wait, if true, will wait until all Pods, PVCs, and Services are in a ready state
   233  	// before marking the release as successful. It will wait for as long as timeout
   234  	bool wait = 7;
   235  	// Force resource update through delete/recreate if needed.
   236  	bool force = 8;
   237  }
   238  
   239  // RollbackReleaseResponse is the response to an update request.
   240  message RollbackReleaseResponse {
   241  	hapi.release.Release release = 1;
   242  }
   243  
   244  // InstallReleaseRequest is the request for an installation of a chart.
   245  message InstallReleaseRequest {
   246  	// Chart is the protobuf representation of a chart.
   247  	hapi.chart.Chart chart = 1;
   248  	// Values is a string containing (unparsed) YAML values.
   249  	hapi.chart.Config values = 2;
   250  	// DryRun, if true, will run through the release logic, but neither create
   251  	// a release object nor deploy to Kubernetes. The release object returned
   252  	// in the response will be fake.
   253  	bool dry_run = 3;
   254  
   255  	// Name is the candidate release name. This must be unique to the
   256  	// namespace, otherwise the server will return an error. If it is not
   257  	// supplied, the server will autogenerate one.
   258  	string name = 4;
   259  
   260  	// DisableHooks causes the server to skip running any hooks for the install.
   261  	bool disable_hooks = 5;
   262  
   263  	// Namepace is the kubernetes namespace of the release.
   264  	string namespace = 6;
   265  
   266  	// ReuseName requests that Tiller re-uses a name, instead of erroring out.
   267  	bool reuse_name = 7;
   268  
   269  	// timeout specifies the max amount of time any kubernetes client command can run.
   270  	int64 timeout = 8;
   271  	// wait, if true, will wait until all Pods, PVCs, and Services are in a ready state
   272  	// before marking the release as successful. It will wait for as long as timeout
   273  	bool wait = 9;
   274  }
   275  
   276  // InstallReleaseResponse is the response from a release installation.
   277  message InstallReleaseResponse {
   278  	hapi.release.Release release = 1;
   279  }
   280  
   281  // UninstallReleaseRequest represents a request to uninstall a named release.
   282  message UninstallReleaseRequest {
   283  	// Name is the name of the release to delete.
   284  	string name = 1;
   285  	// DisableHooks causes the server to skip running any hooks for the uninstall.
   286  	bool disable_hooks = 2;
   287  	// Purge removes the release from the store and make its name free for later use.
   288  	bool purge = 3;
   289  	// timeout specifies the max amount of time any kubernetes client command can run.
   290  	int64 timeout = 4;
   291  }
   292  
   293  // UninstallReleaseResponse represents a successful response to an uninstall request.
   294  message UninstallReleaseResponse {
   295  	// Release is the release that was marked deleted.
   296  	hapi.release.Release release = 1;
   297  	// Info is an uninstall message
   298  	string info = 2;
   299  }
   300  
   301  // GetVersionRequest requests for version information.
   302  message GetVersionRequest {
   303  }
   304  
   305  message GetVersionResponse {
   306    hapi.version.Version Version = 1;
   307  }
   308  
   309  // GetHistoryRequest requests a release's history.
   310  message GetHistoryRequest {
   311  	// The name of the release.
   312  	string name = 1;
   313  	// The maximum number of releases to include.
   314  	int32 max = 2;
   315  }
   316  
   317  // GetHistoryResponse is received in response to a GetHistory rpc.
   318  message GetHistoryResponse {
   319  	repeated hapi.release.Release releases = 1;
   320  }
   321  
   322  // TestReleaseRequest is a request to get the status of a release.
   323  message TestReleaseRequest {
   324  	// Name is the name of the release
   325  	string name = 1;
   326  	// timeout specifies the max amount of time any kubernetes client command can run.
   327  	int64 timeout = 2;
   328  	// cleanup specifies whether or not to attempt pod deletion after test completes
   329  	bool cleanup = 3;
   330  }
   331  
   332  // TestReleaseResponse represents a message from executing a test
   333  message TestReleaseResponse {
   334  	string msg = 1;
   335  	hapi.release.TestRun.Status status = 2;
   336  
   337  }