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