All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hapi.services.tiller.proto Maven / Gradle / Ivy

The newest version!
// Copyright 2016 The Kubernetes Authors All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package hapi.services.tiller;

import "hapi/chart/chart.proto";
import "hapi/chart/config.proto";
import "hapi/release/release.proto";
import "hapi/release/info.proto";
import "hapi/release/test_run.proto";
import "hapi/release/status.proto";
import "hapi/version/version.proto";

option go_package = "services";

// ReleaseService is the service that a helm application uses to mutate,
// query, and manage releases.
//
//		Release: A named installation composed of a chart and
// 				 config. At any given time a release has one
//				 chart and one config.
//
//		Config:  A config is a YAML file that supplies values
//				 to the parametrizable templates of a chart.
//
//		Chart:   A chart is a helm package that contains
//				 metadata, a default config, zero or more
//				 optionally parameterizable templates, and
//				 zero or more charts (dependencies).
service ReleaseService {
	// ListReleases retrieves release history.
	// TODO: Allow filtering the set of releases by
	// release status. By default, ListAllReleases returns the releases who
	// current status is "Active".
	rpc ListReleases(ListReleasesRequest) returns (stream ListReleasesResponse) {
	}

	// GetReleasesStatus retrieves status information for the specified release.
	rpc GetReleaseStatus(GetReleaseStatusRequest) returns (GetReleaseStatusResponse) {
	}

	// GetReleaseContent retrieves the release content (chart + value) for the specified release.
	rpc GetReleaseContent(GetReleaseContentRequest) returns (GetReleaseContentResponse) {
	}

	// UpdateRelease updates release content.
	rpc UpdateRelease(UpdateReleaseRequest) returns (UpdateReleaseResponse) {
	}

	// InstallRelease requests installation of a chart as a new release.
	rpc InstallRelease(InstallReleaseRequest) returns (InstallReleaseResponse) {
	}

	// UninstallRelease requests deletion of a named release.
	rpc UninstallRelease(UninstallReleaseRequest) returns (UninstallReleaseResponse) {
	}

    // GetVersion returns the current version of the server.
    rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {
    }

    // RollbackRelease rolls back a release to a previous version.
    rpc RollbackRelease(RollbackReleaseRequest) returns (RollbackReleaseResponse) {
    }

    // ReleaseHistory retrieves a releasse's history.
    rpc GetHistory(GetHistoryRequest) returns (GetHistoryResponse) {
    }

    // RunReleaseTest executes the tests defined of a named release
    rpc RunReleaseTest(TestReleaseRequest) returns (stream TestReleaseResponse) {
    }
}

// ListReleasesRequest requests a list of releases.
//
// Releases can be retrieved in chunks by setting limit and offset.
//
// Releases can be sorted according to a few pre-determined sort stategies.
message ListReleasesRequest {
	// Limit is the maximum number of releases to be returned.
	int64 limit  = 1;

	// Offset is the last release name that was seen. The next listing
	// operation will start with the name after this one.
	// Example: If list one returns albert, bernie, carl, and sets 'next: dennis'.
	// dennis is the offset. Supplying 'dennis' for the next request should
	// cause the next batch to return a set of results starting with 'dennis'.
	string offset = 2;

	// SortBy is the sort field that the ListReleases server should sort data before returning.
	ListSort.SortBy sort_by = 3;

	// Filter is a regular expression used to filter which releases should be listed.
	//
	// Anything that matches the regexp will be included in the results.
	string filter = 4;

	// SortOrder is the ordering directive used for sorting.
	ListSort.SortOrder sort_order = 5;

	repeated hapi.release.Status.Code status_codes = 6;
	// Namespace is the filter to select releases only from a specific namespace.
	string namespace = 7;
}

// ListSort defines sorting fields on a release list.
message ListSort{
	// SortBy defines sort operations.
	enum SortBy {
		UNKNOWN = 0;
		NAME = 1;
		LAST_RELEASED = 2;
	}

	// SortOrder defines sort orders to augment sorting operations.
	enum SortOrder {
		ASC = 0;
		DESC = 1;
	}
}

// ListReleasesResponse is a list of releases.
message ListReleasesResponse {
 	// Count is the expected total number of releases to be returned.
	int64 count  = 1;

	// Next is the name of the next release. If this is other than an empty
	// string, it means there are more results.
	string next = 2;

	// Total is the total number of queryable releases.
	int64 total  = 3;

	// Releases is the list of found release objects.
	repeated hapi.release.Release releases = 4;
}

// GetReleaseStatusRequest is a request to get the status of a release.
message GetReleaseStatusRequest {
	// Name is the name of the release
	string name = 1;
	// Version is the version of the release
	int32 version = 2;
}

// GetReleaseStatusResponse is the response indicating the status of the named release.
message GetReleaseStatusResponse {
	// Name is the name of the release.
	string name = 1;

	// Info contains information about the release.
	hapi.release.Info info = 2;

  // Namesapce the release was released into
  string namespace = 3;
}

// GetReleaseContentRequest is a request to get the contents of a release.
message GetReleaseContentRequest {
	// The name of the release
	string name = 1;
	// Version is the version of the release
	int32 version = 2;
}

// GetReleaseContentResponse is a response containing the contents of a release.
message GetReleaseContentResponse {
	// The release content
	hapi.release.Release release = 1;
}

// UpdateReleaseRequest updates a release.
message UpdateReleaseRequest {
	// The name of the release
	string name = 1;
	// Chart is the protobuf representation of a chart.
	hapi.chart.Chart chart = 2;
	// Values is a string containing (unparsed) YAML values.
	hapi.chart.Config values = 3;
	// dry_run, if true, will run through the release logic, but neither create
	bool dry_run = 4;
	// DisableHooks causes the server to skip running any hooks for the upgrade.
	bool disable_hooks = 5;
	// Performs pods restart for resources if applicable
	bool recreate = 6;
	// timeout specifies the max amount of time any kubernetes client command can run.
	int64 timeout = 7;
	// ResetValues will cause Tiller to ignore stored values, resetting to default values.
	bool reset_values = 8;
	// wait, if true, will wait until all Pods, PVCs, and Services are in a ready state
	// before marking the release as successful. It will wait for as long as timeout
	bool wait = 9;
	// ReuseValues will cause Tiller to reuse the values from the last release.
	// This is ignored if reset_values is set.
	bool reuse_values = 10;
	// Force resource update through delete/recreate if needed.
	bool force = 11;
}

// UpdateReleaseResponse is the response to an update request.
message UpdateReleaseResponse {
	hapi.release.Release release = 1;
}

message RollbackReleaseRequest {
	// The name of the release
	string name = 1;
	// dry_run, if true, will run through the release logic but no create
	bool dry_run = 2;
	// DisableHooks causes the server to skip running any hooks for the rollback
	bool disable_hooks = 3;
	// Version is the version of the release to deploy.
	int32 version = 4;
	// Performs pods restart for resources if applicable
	bool recreate = 5;
	// timeout specifies the max amount of time any kubernetes client command can run.
	int64 timeout = 6;
	// wait, if true, will wait until all Pods, PVCs, and Services are in a ready state
	// before marking the release as successful. It will wait for as long as timeout
	bool wait = 7;
	// Force resource update through delete/recreate if needed.
	bool force = 8;
}

// RollbackReleaseResponse is the response to an update request.
message RollbackReleaseResponse {
	hapi.release.Release release = 1;
}

// InstallReleaseRequest is the request for an installation of a chart.
message InstallReleaseRequest {
	// Chart is the protobuf representation of a chart.
	hapi.chart.Chart chart = 1;
	// Values is a string containing (unparsed) YAML values.
	hapi.chart.Config values = 2;
	// DryRun, if true, will run through the release logic, but neither create
	// a release object nor deploy to Kubernetes. The release object returned
	// in the response will be fake.
	bool dry_run = 3;

	// Name is the candidate release name. This must be unique to the
	// namespace, otherwise the server will return an error. If it is not
	// supplied, the server will autogenerate one.
	string name = 4;

	// DisableHooks causes the server to skip running any hooks for the install.
	bool disable_hooks = 5;

	// Namepace is the kubernetes namespace of the release.
	string namespace = 6;

	// ReuseName requests that Tiller re-uses a name, instead of erroring out.
	bool reuse_name = 7;

	// timeout specifies the max amount of time any kubernetes client command can run.
	int64 timeout = 8;
	// wait, if true, will wait until all Pods, PVCs, and Services are in a ready state
	// before marking the release as successful. It will wait for as long as timeout
	bool wait = 9;
}

// InstallReleaseResponse is the response from a release installation.
message InstallReleaseResponse {
	hapi.release.Release release = 1;
}

// UninstallReleaseRequest represents a request to uninstall a named release.
message UninstallReleaseRequest {
	// Name is the name of the release to delete.
	string name = 1;
	// DisableHooks causes the server to skip running any hooks for the uninstall.
	bool disable_hooks = 2;
	// Purge removes the release from the store and make its name free for later use.
	bool purge = 3;
	// timeout specifies the max amount of time any kubernetes client command can run.
	int64 timeout = 4;
}

// UninstallReleaseResponse represents a successful response to an uninstall request.
message UninstallReleaseResponse {
	// Release is the release that was marked deleted.
	hapi.release.Release release = 1;
	// Info is an uninstall message
	string info = 2;
}

// GetVersionRequest requests for version information.
message GetVersionRequest {
}

message GetVersionResponse {
  hapi.version.Version Version = 1;
}

// GetHistoryRequest requests a release's history.
message GetHistoryRequest {
	// The name of the release.
	string name = 1;
	// The maximum number of releases to include.
	int32 max = 2;
}

// GetHistoryResponse is received in response to a GetHistory rpc.
message GetHistoryResponse {
	repeated hapi.release.Release releases = 1;
}

// TestReleaseRequest is a request to get the status of a release.
message TestReleaseRequest {
	// Name is the name of the release
	string name = 1;
	// timeout specifies the max amount of time any kubernetes client command can run.
	int64 timeout = 2;
	// cleanup specifies whether or not to attempt pod deletion after test completes
	bool cleanup = 3;
}

// TestReleaseResponse represents a message from executing a test
message TestReleaseResponse {
	string msg = 1;
	hapi.release.TestRun.Status status = 2;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy