类 ReleaseManager
- java.lang.Object
-
- org.microbean.helm.ReleaseManager
-
- 所有已实现的接口:
Closeable,AutoCloseable
public class ReleaseManager extends Object implements Closeable
A manager of Helm releases.- 作者:
- Laird Nelson
-
-
字段概要
字段 修饰符和类型 字段 说明 static intDNS_LABEL_MAX_LENGTHThe maximum number of characters a Kubernetes identifier of typeDNS_LABELis permitted to contain (63).static PatternDNS_LABEL_PATTERNstatic intDNS_SUBDOMAIN_MAX_LENGTHThe maximum number of characters a Kubernetes identifier of typeDNS_SUBDOMAINis permitted to contain (253).static PatternDNS_SUBDOMAIN_PATTERNstatic intHELM_RELEASE_NAME_MAX_LENGTHThe maximum number of characters a Helm release name is permitted to contain (53).static PatternRFC_1123_PATTERNAn alias for theDNS_SUBDOMAIN_PATTERNfield.
-
构造器概要
构造器 构造器 说明 ReleaseManager(Tiller tiller)Creates a newReleaseManager.
-
方法概要
-
-
-
字段详细资料
-
DNS_SUBDOMAIN_MAX_LENGTH
public static final int DNS_SUBDOMAIN_MAX_LENGTH
The maximum number of characters a Kubernetes identifier of typeDNS_SUBDOMAINis permitted to contain (253).
-
DNS_SUBDOMAIN_PATTERN
public static final Pattern DNS_SUBDOMAIN_PATTERN
-
DNS_LABEL_MAX_LENGTH
public static final int DNS_LABEL_MAX_LENGTH
The maximum number of characters a Kubernetes identifier of typeDNS_LABELis permitted to contain (63).
-
DNS_LABEL_PATTERN
public static final Pattern DNS_LABEL_PATTERN
-
HELM_RELEASE_NAME_MAX_LENGTH
public static final int HELM_RELEASE_NAME_MAX_LENGTH
The maximum number of characters a Helm release name is permitted to contain (53).- 另请参阅:
- Helm pull request #1560, 常量字段值
-
RFC_1123_PATTERN
public static final Pattern RFC_1123_PATTERN
An alias for theDNS_SUBDOMAIN_PATTERNfield.- 另请参阅:
DNS_SUBDOMAIN_PATTERN
-
-
构造器详细资料
-
ReleaseManager
public ReleaseManager(Tiller tiller)
Creates a newReleaseManager.- 参数:
tiller- theTillerinstance representing a connection to the Tiller server; must not benull- 抛出:
NullPointerException- iftillerisnull- 另请参阅:
Tiller
-
-
方法详细资料
-
getTiller
protected final Tiller getTiller()
Returns theTillerinstance used to communicate with Helm's back-end Tiller component.This method never returns
null.- 返回:
- a non-
nullTiller - 另请参阅:
ReleaseManager(Tiller),Tiller
-
close
public void close() throws IOException- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Closeable- 抛出:
IOException- if an error occurs
-
getContent
public Future<Tiller.GetReleaseContentResponse> getContent(Tiller.GetReleaseContentRequest request) throws IOException
Returns the content that made up a given Helm release.This method never returns
null.Overrides of this method must not return
null.- 参数:
request- theTiller.GetReleaseContentRequestdescribing the release; must not benull- 返回:
- a
Futurecontaining aTiller.GetReleaseContentResponsethat has the information requested; nevernull - 抛出:
NullPointerException- ifrequestisnullIOException
-
getHistory
public Future<Tiller.GetHistoryResponse> getHistory(Tiller.GetHistoryRequest request) throws IOException
Returns the history of a given Helm release.This method never returns
null.Overrides of this method must not return
null.- 参数:
request- theTiller.GetHistoryRequestdescribing the release; must not benull- 返回:
- a
Futurecontaining aTiller.GetHistoryResponsethat has the information requested; nevernull - 抛出:
NullPointerException- ifrequestisnullIOException
-
getStatus
public Future<Tiller.GetReleaseStatusResponse> getStatus(Tiller.GetReleaseStatusRequest request) throws IOException
Returns the status of a given Helm release.This method never returns
null.Overrides of this method must not return
null.- 参数:
request- theTiller.GetReleaseStatusRequestdescribing the release; must not benull- 返回:
- a
Futurecontaining aTiller.GetReleaseStatusResponsethat has the information requested; nevernull - 抛出:
NullPointerException- ifrequestisnullIOException
-
install
public Future<Tiller.InstallReleaseResponse> install(Tiller.InstallReleaseRequest.Builder requestBuilder, ChartOuterClass.Chart.Builder chartBuilder) throws IOException
Installs a release.This method never returns
null.Overrides of this method must not return
null.- 参数:
requestBuilder- theTiller.InstallReleaseRequest.Builderrepresenting the installation request; must not benulland must pass validation; itsTiller.InstallReleaseRequest.Builder.setChart(hapi.chart.ChartOuterClass.Chart.Builder)method will be called with the suppliedchartBuilderas its argument valuechartBuilder- aChartOuterClass.Chart.Builderrepresenting the Helm chart to install; must not benull- 返回:
- a
Futurecontaining aTiller.InstallReleaseResponsethat has the information requested; nevernull - 抛出:
MissingDependenciesException- if the suppliedchartBuilderhas arequirements.yamlresource in it that mentions subcharts that it does not containNullPointerException- ifrequestisnullIOException- 另请参阅:
AbstractChartLoader
-
list
public Iterator<Tiller.ListReleasesResponse> list(Tiller.ListReleasesRequest request)
Returns information about Helm releases.This method never returns
null.Overrides of this method must not return
null.- 参数:
request- theTiller.ListReleasesRequestdescribing the releases to be returned; must not benull- 返回:
- an
IteratorofTiller.ListReleasesResponseobjects comprising the information requested; nevernull - 抛出:
NullPointerException- ifrequestisnullPatternSyntaxException- if theTiller.ListReleasesRequestOrBuilder.getFilter()return value is non-null, non-empty but not a valid regular expression
-
rollback
public Future<Tiller.RollbackReleaseResponse> rollback(Tiller.RollbackReleaseRequest request) throws IOException
Rolls back a previously installed release.This method never returns
null.Overrides of this method must not return
null.- 参数:
request- theTiller.RollbackReleaseRequestdescribing the release; must not benull- 返回:
- a
Futurecontaining aTiller.RollbackReleaseResponsethat has the information requested; nevernull - 抛出:
NullPointerException- ifrequestisnullIOException
-
test
public Iterator<Tiller.TestReleaseResponse> test(Tiller.TestReleaseRequest request)
Returns information about tests run on a given Helm release.This method never returns
null.Overrides of this method must not return
null.- 参数:
request- theTiller.TestReleaseRequestdescribing the release to be tested; must not benull- 返回:
- an
IteratorofTiller.TestReleaseResponseobjects comprising the information requested; nevernull - 抛出:
NullPointerException- ifrequestisnull
-
uninstall
public Future<Tiller.UninstallReleaseResponse> uninstall(Tiller.UninstallReleaseRequest request) throws IOException
Uninstalls (deletes) a previously installed release.This method never returns
null.Overrides of this method must not return
null.- 参数:
request- theTiller.UninstallReleaseRequestdescribing the release; must not benull- 返回:
- a
Futurecontaining aTiller.UninstallReleaseResponsethat has the information requested; nevernull - 抛出:
NullPointerException- ifrequestisnullIOException
-
update
public Future<Tiller.UpdateReleaseResponse> update(Tiller.UpdateReleaseRequest.Builder requestBuilder, ChartOuterClass.Chart.Builder chartBuilder) throws IOException
Updates a release.This method never returns
null.Overrides of this method must not return
null.- 参数:
requestBuilder- theTiller.UpdateReleaseRequest.Builderrepresenting the installation request; must not benulland must pass validation; itsTiller.UpdateReleaseRequest.Builder.setChart(hapi.chart.ChartOuterClass.Chart.Builder)method will be called with the suppliedchartBuilderas its argument valuechartBuilder- aChartOuterClass.Chart.Builderrepresenting the Helm chart with which to update the release; must not benull- 返回:
- a
Futurecontaining aTiller.UpdateReleaseResponsethat has the information requested; nevernull - 抛出:
NullPointerException- ifrequestisnullIOException- 另请参阅:
AbstractChartLoader
-
validate
protected void validate(Tiller.GetReleaseContentRequestOrBuilder request)
Validates the suppliedTiller.GetReleaseContentRequestOrBuilder.- 参数:
request- the request to validate- 抛出:
NullPointerException- ifrequestisnullIllegalArgumentException- ifrequestis invalid- 另请参阅:
validateReleaseName(String)
-
validate
protected void validate(Tiller.GetHistoryRequestOrBuilder request)
Validates the suppliedTiller.GetHistoryRequestOrBuilder.- 参数:
request- the request to validate- 抛出:
NullPointerException- ifrequestisnullIllegalArgumentException- ifrequestis invalid- 另请参阅:
validateReleaseName(String)
-
validate
protected void validate(Tiller.GetReleaseStatusRequestOrBuilder request)
Validates the suppliedTiller.GetReleaseStatusRequestOrBuilder.- 参数:
request- the request to validate- 抛出:
NullPointerException- ifrequestisnullIllegalArgumentException- ifrequestis invalid- 另请参阅:
validateReleaseName(String)
-
validate
protected void validate(Tiller.InstallReleaseRequestOrBuilder request)
Validates the suppliedTiller.InstallReleaseRequestOrBuilder.- 参数:
request- the request to validate- 抛出:
NullPointerException- ifrequestisnullIllegalArgumentException- ifrequestis invalid- 另请参阅:
validateReleaseName(String)
-
validate
protected void validate(Tiller.ListReleasesRequestOrBuilder request)
Validates the suppliedTiller.ListReleasesRequestOrBuilder.- 参数:
request- the request to validate- 抛出:
NullPointerException- ifrequestisnullIllegalArgumentException- ifrequestis invalid- 另请参阅:
validateReleaseName(String)
-
validate
protected void validate(Tiller.RollbackReleaseRequestOrBuilder request)
Validates the suppliedTiller.RollbackReleaseRequestOrBuilder.- 参数:
request- the request to validate- 抛出:
NullPointerException- ifrequestisnullIllegalArgumentException- ifrequestis invalid- 另请参阅:
validateReleaseName(String)
-
validate
protected void validate(Tiller.TestReleaseRequestOrBuilder request)
Validates the suppliedTiller.TestReleaseRequestOrBuilder.- 参数:
request- the request to validate- 抛出:
NullPointerException- ifrequestisnullIllegalArgumentException- ifrequestis invalid- 另请参阅:
validateReleaseName(String)
-
validate
protected void validate(Tiller.UninstallReleaseRequestOrBuilder request)
Validates the suppliedTiller.UninstallReleaseRequestOrBuilder.- 参数:
request- the request to validate- 抛出:
NullPointerException- ifrequestisnullIllegalArgumentException- ifrequestis invalid- 另请参阅:
validateReleaseName(String)
-
validate
protected void validate(Tiller.UpdateReleaseRequestOrBuilder request)
Validates the suppliedTiller.UpdateReleaseRequestOrBuilder.- 参数:
request- the request to validate- 抛出:
NullPointerException- ifrequestisnullIllegalArgumentException- ifrequestis invalid- 另请参阅:
validateReleaseName(String)
-
validateReleaseName
protected void validateReleaseName(String name)
Ensures that the suppliednameis a valid Helm release name.Because frequently Helm releases are not required to be named by the end user, a
nullor emptynameis valid.Because Helm release names are often used in hostnames, they should conform to RFC 1123. This method performs that validation by default, using the
DNS_SUBDOMAIN_PATTERNfield.- 参数:
name- the name to validate; may benullor String.isEmpty() since Tiller will generate a valid name in such a case using themonikerproject; if non-nullmust match the pattern represented by the value of theDNS_SUBDOMAIN_PATTERNfield- 另请参阅:
DNS_SUBDOMAIN_PATTERN, RFC 1123
-
validateNamespace
protected void validateNamespace(String namespace)
Ensures that the suppliednamespaceis a valid namespace.Namespaces must conform to RFC 1123. This method performs that validation by default, using the
DNS_SUBDOMAIN_PATTERNfield.- 参数:
namespace- the namespace to validate; may benullor String.isEmpty()- 另请参阅:
DNS_LABEL_PATTERN, RFC 1123
-
-