github.com/danielqsj/helm@v2.0.0-alpha.4.0.20160908204436-976e0ba5199b+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 25 option go_package = "services"; 26 27 // ReleaseService is the service that a helm application uses to mutate, 28 // query, and manage releases. 29 // 30 // Release: A named installation composed of a chart and 31 // config. At any given time a release has one 32 // chart and one config. 33 // 34 // Config: A config is a YAML file that supplies values 35 // to the parametrizable templates of a chart. 36 // 37 // Chart: A chart is a helm package that contains 38 // metadata, a default config, zero or more 39 // optionally parameterizable templates, and 40 // zero or more charts (dependencies). 41 service ReleaseService { 42 // ListReleases retrieves release history. 43 // TODO: Allow filtering the set of releases by 44 // release status. By default, ListAllReleases returns the releases who 45 // current status is "Active". 46 rpc ListReleases(ListReleasesRequest) returns (stream ListReleasesResponse) { 47 } 48 49 // GetReleasesStatus retrieves status information for the specified release. 50 rpc GetReleaseStatus(GetReleaseStatusRequest) returns (GetReleaseStatusResponse) { 51 } 52 53 // GetReleaseContent retrieves the release content (chart + value) for the specifed release. 54 rpc GetReleaseContent(GetReleaseContentRequest) returns (GetReleaseContentResponse) { 55 } 56 57 // UpdateRelease updates release content. 58 rpc UpdateRelease(UpdateReleaseRequest) returns (UpdateReleaseResponse) { 59 } 60 61 // InstallRelease requests installation of a chart as a new release. 62 rpc InstallRelease(InstallReleaseRequest) returns (InstallReleaseResponse) { 63 } 64 65 // UninstallRelease requests deletion of a named release. 66 rpc UninstallRelease(UninstallReleaseRequest) returns (UninstallReleaseResponse) { 67 } 68 } 69 70 // ListReleasesRequest requests a list of releases. 71 // 72 // Releases can be retrieved in chunks by setting limit and offset. 73 // 74 // Releases can be sorted according to a few pre-determined sort stategies. 75 message ListReleasesRequest { 76 // Limit is the maximum number of releases to be returned. 77 int64 limit = 1; 78 79 // Offset is the last release name that was seen. The next listing 80 // operation will start with the name after this one. 81 // Example: If list one returns albert, bernie, carl, and sets 'next: dennis'. 82 // dennis is the offset. Supplying 'dennis' for the next request should 83 // cause the next batch to return a set of results starting with 'dennis'. 84 string offset = 2; 85 86 // SortBy is the sort field that the ListReleases server should sort data before returning. 87 ListSort.SortBy sort_by = 3; 88 89 // Filter is a regular expression used to filter which releases should be listed. 90 // 91 // Anything that matches the regexp will be included in the results. 92 string filter = 4; 93 94 // SortOrder is the ordering directive used for sorting. 95 ListSort.SortOrder sort_order = 5; 96 97 repeated hapi.release.Status.Code status_codes = 6; 98 } 99 100 // ListSort defines sorting fields on a release list. 101 message ListSort{ 102 // SortBy defines sort operations. 103 enum SortBy { 104 UNKNOWN = 0; 105 NAME = 1; 106 LAST_RELEASED = 2; 107 } 108 109 // SortOrder defines sort orders to augment sorting operations. 110 enum SortOrder { 111 ASC = 0; 112 DESC = 1; 113 } 114 } 115 116 // ListReleasesResponse is a list of releases. 117 message ListReleasesResponse { 118 // Count is the expected total number of releases to be returned. 119 int64 count = 1; 120 121 // Next is the name of the next release. If this is other than an empty 122 // string, it means there are more results. 123 string next = 2; 124 125 // Total is the total number of queryable releases. 126 int64 total = 3; 127 128 // Releases is the list of found release objects. 129 repeated hapi.release.Release releases = 4; 130 } 131 132 // GetReleaseStatusRequest is a request to get the status of a release. 133 message GetReleaseStatusRequest { 134 // Name is the name of the release 135 string name = 1; 136 // Version is the version of the release 137 int32 version = 2; 138 } 139 140 // GetReleaseStatusResponse is the response indicating the status of the named release. 141 message GetReleaseStatusResponse { 142 // Name is the name of the release. 143 string name = 1; 144 145 // Info contains information about the release. 146 hapi.release.Info info = 2; 147 148 // Namesapce the release was released into 149 string namespace = 3; 150 } 151 152 // GetReleaseContentRequest is a request to get the contents of a release. 153 message GetReleaseContentRequest { 154 // The name of the release 155 string name = 1; 156 // Version is the version of the release 157 int32 version = 2; 158 } 159 160 // GetReleaseContentResponse is a response containing the contents of a release. 161 message GetReleaseContentResponse { 162 // The release content 163 hapi.release.Release release = 1; 164 } 165 166 // UpdateReleaseRequest updates a release. 167 message UpdateReleaseRequest { 168 // The name of the release 169 string name = 1; 170 // Chart is the protobuf representation of a chart. 171 hapi.chart.Chart chart = 2; 172 // Values is a string containing (unparsed) YAML values. 173 hapi.chart.Config values = 3; 174 // dry_run, if true, will run through the release logic, but neither create 175 bool dry_run = 4; 176 177 // DisableHooks causes the server to skip running any hooks for the upgrade. 178 bool disable_hooks = 5; 179 } 180 181 // UpdateReleaseResponse is the response to an update request. 182 message UpdateReleaseResponse { 183 hapi.release.Release release = 1; 184 } 185 186 // InstallReleaseRequest is the request for an installation of a chart. 187 message InstallReleaseRequest { 188 // Chart is the protobuf representation of a chart. 189 hapi.chart.Chart chart = 1; 190 // Values is a string containing (unparsed) YAML values. 191 hapi.chart.Config values = 2; 192 // DryRun, if true, will run through the release logic, but neither create 193 // a release object nor deploy to Kubernetes. The release object returned 194 // in the response will be fake. 195 bool dry_run = 3; 196 197 // Name is the candidate release name. This must be unique to the 198 // namespace, otherwise the server will return an error. If it is not 199 // supplied, the server will autogenerate one. 200 string name = 4; 201 202 // DisableHooks causes the server to skip running any hooks for the install. 203 bool disable_hooks = 5; 204 205 // Namepace is the kubernetes namespace of the release. 206 string namespace = 6; 207 208 // ReuseName requests that Tiller re-uses a name, instead of erroring out. 209 bool reuse_name = 7; 210 } 211 212 // InstallReleaseResponse is the response from a release installation. 213 message InstallReleaseResponse { 214 hapi.release.Release release = 1; 215 } 216 217 // UninstallReleaseRequest represents a request to uninstall a named release. 218 message UninstallReleaseRequest { 219 // Name is the name of the release to delete. 220 string name = 1; 221 // DisableHooks causes the server to skip running any hooks for the uninstall. 222 bool disable_hooks = 2; 223 // Purge removes the release from the store and make its name free for later use. 224 bool purge = 3; 225 } 226 227 // UninstallReleaseResponse represents a successful response to an uninstall request. 228 message UninstallReleaseResponse { 229 // Release is the release that was marked deleted. 230 hapi.release.Release release = 1; 231 }