@Experimental public class ChartRepositoryRepository extends AbstractChartResolver
ChartRepository instances, normally built
from a Helm repositories.yaml file.| Modifier and Type | Class and Description |
|---|---|
static interface |
ChartRepositoryRepository.ChartRepositoryFactory
A factory for
ChartRepository instances. |
| Constructor and Description |
|---|
ChartRepositoryRepository(Set<? extends ChartRepository> chartRepositories)
Creates a new
ChartRepositoryRepository. |
| Modifier and Type | Method and Description |
|---|---|
static ChartRepositoryRepository |
fromHelmRepositoriesYaml()
Creates and returns a new
ChartRepositoryRepository from
the contents of a repositories.yaml file typically
located in the ~/.helm/repository directory. |
static ChartRepositoryRepository |
fromHelmRepositoriesYaml(boolean reifyHelmHomeIfNecessary)
Creates and returns a new
ChartRepositoryRepository from
the contents of a repositories.yaml file typically
located in the ~/.helm/repository directory. |
static ChartRepositoryRepository |
fromYaml(InputStream stream)
Creates and returns a new
ChartRepositoryRepository from
the contents of a repositories.yaml file represented by
the supplied InputStream. |
static ChartRepositoryRepository |
fromYaml(InputStream stream,
boolean reifyHelmHomeIfNecessary)
Creates and returns a new
ChartRepositoryRepository from
the contents of a repositories.yaml file represented by
the supplied InputStream. |
static ChartRepositoryRepository |
fromYaml(InputStream stream,
Path archiveCacheDirectory,
Path indexCacheDirectory)
Creates and returns a new
ChartRepositoryRepository from
the contents of a repositories.yaml file represented by
the supplied InputStream. |
static ChartRepositoryRepository |
fromYaml(InputStream stream,
Path archiveCacheDirectory,
Path indexCacheDirectory,
boolean reifyHelmHomeIfNecessary)
Creates and returns a new
ChartRepositoryRepository from
the contents of a repositories.yaml file represented by
the supplied InputStream. |
static ChartRepositoryRepository |
fromYaml(InputStream stream,
Path archiveCacheDirectory,
Path indexCacheDirectory,
boolean reifyHelmHomeIfNecessary,
ChartRepositoryRepository.ChartRepositoryFactory factory)
Creates and returns a new
ChartRepositoryRepository from
the contents of a repositories.yaml file represented by
the supplied InputStream. |
static ChartRepositoryRepository |
fromYaml(InputStream stream,
Path archiveCacheDirectory,
Path indexCacheDirectory,
ChartRepositoryRepository.ChartRepositoryFactory factory)
Creates and returns a new
ChartRepositoryRepository from
the contents of a repositories.yaml file represented by
the supplied InputStream. |
Set<ChartRepository> |
getChartRepositories()
Returns the non-
null immutable Set of ChartRepository instances managed by this ChartRepositoryRepository. |
ChartRepository |
getChartRepository(String name)
Returns the
ChartRepository managed by this ChartRepositoryRepository with the supplied name, or
null if there is no such ChartRepository. |
ChartOuterClass.Chart.Builder |
resolve(String chartName,
String chartVersion)
Uses the supplied
chartName and chartVersion
parameters to find an appropriate Helm
chart and returns it in the form of a Chart.Builder
object. |
ChartOuterClass.Chart.Builder |
resolve(String repositoryName,
String chartName,
String chartVersion)
Uses the supplied
repositoryName, chartName and
chartVersion parameters to find an appropriate Helm chart
and returns it in the form of a Chart.Builder object. |
public ChartRepositoryRepository(Set<? extends ChartRepository> chartRepositories)
ChartRepositoryRepository.chartRepositories - the Set of ChartRepository instances to be managed by this ChartRepositoryRepository; may be null; copied by valuegetChartRepositories()public final Set<ChartRepository> getChartRepositories()
null immutable Set of ChartRepository instances managed by this ChartRepositoryRepository.null immutable Set of ChartRepository instances managed by this ChartRepositoryRepositorypublic ChartRepository getChartRepository(String name)
ChartRepository managed by this ChartRepositoryRepository with the supplied name, or
null if there is no such ChartRepository.name - the name of
the ChartRepository to return; must not be nullChartRepository managed by this ChartRepositoryRepository with the supplied name, or
nullNullPointerException - if name is nullpublic ChartOuterClass.Chart.Builder resolve(String chartName, String chartVersion) throws ChartResolverException
chartName and chartVersion
parameters to find an appropriate Helm
chart and returns it in the form of a Chart.Builder
object.
Implementations of this method may return null.
This implementation splits the supplied slash-delimited chartName into a chart repository name and a chart
name, uses the chart repository name to locate a suitable
ChartRepository, and then calls ChartRepository.resolve(String, String) with the chart name and
the supplied chartVersion, and returns the result.
resolve in class AbstractChartResolverchartName - a slash-separated String whose first
component is a chart
repository name and whose second component is a Helm chart name;
must not be nullchartVersion - the version of the chart to resolve; may be
null in which case "latest" semantics are impliedChart.Builder, or nullChartResolverException - if there was a problem with
resolutionresolve(String, String, String)public ChartOuterClass.Chart.Builder resolve(String repositoryName, String chartName, String chartVersion) throws ChartResolverException
repositoryName, chartName and
chartVersion parameters to find an appropriate Helm chart
and returns it in the form of a Chart.Builder object.
This implementation uses the supplied repositoryName
to locate a suitable
ChartRepository, and then calls ChartRepository.resolve(String, String) with the chart name and
the supplied chartVersion, and returns the result.
repositoryName - a chart repository name; must not be nullchartName - a Helm chart name; must not be nullchartVersion - the version of the Helm chart to select; may
be null in which case "latest" semantics are impliedChart.Builder, or nullChartResolverException - if there was a problem with
resolutionNullPointerException - if repositoryName or
chartName is nullgetChartRepository(String),
ChartRepository.getName(),
ChartRepository.resolve(String, String)public static final ChartRepositoryRepository fromHelmRepositoriesYaml() throws IOException, URISyntaxException
ChartRepositoryRepository from
the contents of a repositories.yaml file typically
located in the ~/.helm/repository directory.
This method never returns null.
ChartRepositoryRepository; never nullIOException - if there was a problem reading the fileURISyntaxException - if there was an invalid URI in the
filefromHelmRepositoriesYaml(boolean)public static final ChartRepositoryRepository fromHelmRepositoriesYaml(boolean reifyHelmHomeIfNecessary) throws IOException, URISyntaxException
ChartRepositoryRepository from
the contents of a repositories.yaml file typically
located in the ~/.helm/repository directory.
This method never returns null.
reifyHelmHomeIfNecessary - if true and, for whatever
reason, the local Helm home directory structure needs to be
partially or entirely created, then this method will attempt to
reify itChartRepositoryRepository; never nullIOException - if there was a problem reading the file or
reifying the local Helm home directory structureURISyntaxException - if there was an invalid URI in the
filefromYaml(InputStream, Path, Path, boolean, ChartRepositoryFactory)public static final ChartRepositoryRepository fromYaml(InputStream stream) throws IOException, URISyntaxException
ChartRepositoryRepository from
the contents of a repositories.yaml file represented by
the supplied InputStream.stream - the InputStream to read from; must not be
nullChartRepositoryRepository; never nullIOException - if there was a problem reading the fileURISyntaxException - if there was an invalid URI in the
filefromYaml(InputStream, Path, Path, boolean, ChartRepositoryFactory)public static final ChartRepositoryRepository fromYaml(InputStream stream, boolean reifyHelmHomeIfNecessary) throws IOException, URISyntaxException
ChartRepositoryRepository from
the contents of a repositories.yaml file represented by
the supplied InputStream.stream - the InputStream to read from; must not be
nullreifyHelmHomeIfNecessary - if true and, for whatever
reason, the local Helm home directory structure needs to be
partially or entirely created, then this method will attempt to
reify itChartRepositoryRepository; never nullIOException - if there was a problem reading the file or
reifying the local Helm home directory structureURISyntaxException - if there was an invalid URI in the
filefromYaml(InputStream, Path, Path, boolean, ChartRepositoryFactory)public static final ChartRepositoryRepository fromYaml(InputStream stream, Path archiveCacheDirectory, Path indexCacheDirectory) throws IOException, URISyntaxException
ChartRepositoryRepository from
the contents of a repositories.yaml file represented by
the supplied InputStream.stream - the InputStream to read from; must not be
nullarchiveCacheDirectory - an absolute Path representing a directory where Helm chart
archives may be stored; if null then a Path
beginning with the absolute directory represented by the value of
the helm.home system property, or the value of the HELM_HOME environment variable, appended with cache/archive will be used insteadindexCacheDirectory - an absolute Path representing a directory that the supplied
cachedIndexPath parameter value will be considered to be
relative to; will be ignored and hence may be null if the
supplied cachedIndexPath parameter value Path.isAbsolute()ChartRepositoryRepository; never nullIOException - if there was a problem reading the fileURISyntaxException - if there was an invalid URI in the
filefromYaml(InputStream, Path, Path, boolean, ChartRepositoryFactory)public static final ChartRepositoryRepository fromYaml(InputStream stream, Path archiveCacheDirectory, Path indexCacheDirectory, boolean reifyHelmHomeIfNecessary) throws IOException, URISyntaxException
ChartRepositoryRepository from
the contents of a repositories.yaml file represented by
the supplied InputStream.stream - the InputStream to read from; must not be
nullarchiveCacheDirectory - an absolute Path representing a directory where Helm chart
archives may be stored; if null then a Path
beginning with the absolute directory represented by the value of
the helm.home system property, or the value of the HELM_HOME environment variable, appended with cache/archive will be used insteadindexCacheDirectory - an absolute Path representing a directory that the supplied
cachedIndexPath parameter value will be considered to be
relative to; will be ignored and hence may be null if the
supplied cachedIndexPath parameter value Path.isAbsolute()reifyHelmHomeIfNecessary - if true and, for whatever
reason, the local Helm home directory structure needs to be
partially or entirely created, then this method will attempt to
reify itChartRepositoryRepository; never nullIOException - if there was a problem reading the file or
reifying the local Helm home directory structureURISyntaxException - if there was an invalid URI in the
filefromYaml(InputStream, Path, Path, boolean, ChartRepositoryFactory)public static final ChartRepositoryRepository fromYaml(InputStream stream, Path archiveCacheDirectory, Path indexCacheDirectory, ChartRepositoryRepository.ChartRepositoryFactory factory) throws IOException, URISyntaxException
ChartRepositoryRepository from
the contents of a repositories.yaml file represented by
the supplied InputStream.stream - the InputStream to read from; must not be
nullarchiveCacheDirectory - an absolute Path representing a directory where Helm chart
archives may be stored; if null then a Path
beginning with the absolute directory represented by the value of
the helm.home system property, or the value of the HELM_HOME environment variable, appended with cache/archive will be used insteadindexCacheDirectory - an absolute Path representing a directory that the supplied
cachedIndexPath parameter value will be considered to be
relative to; will be ignored and hence may be null if the
supplied cachedIndexPath parameter value Path.isAbsolute()factory - a ChartRepositoryRepository.ChartRepositoryFactory that can create
ChartRepository instances; may be null in which
case the ChartRepository.ChartRepository(String, URI,
Path, Path, Path) constructor will be used insteadChartRepositoryRepository; never nullIOException - if there was a problem reading the fileURISyntaxException - if there was an invalid URI in the
filefromYaml(InputStream, Path, Path, boolean, ChartRepositoryFactory)public static final ChartRepositoryRepository fromYaml(InputStream stream, Path archiveCacheDirectory, Path indexCacheDirectory, boolean reifyHelmHomeIfNecessary, ChartRepositoryRepository.ChartRepositoryFactory factory) throws IOException, URISyntaxException
ChartRepositoryRepository from
the contents of a repositories.yaml file represented by
the supplied InputStream.stream - the InputStream to read from; must not be
nullarchiveCacheDirectory - an absolute Path representing a directory where Helm chart
archives may be stored; if null then a Path
beginning with the absolute directory represented by the value of
the helm.home system property, or the value of the HELM_HOME environment variable, appended with cache/archive will be used insteadindexCacheDirectory - an absolute Path representing a directory that the supplied
cachedIndexPath parameter value will be considered to be
relative to; will be ignored and hence may be null if the
supplied cachedIndexPath parameter value Path.isAbsolute()reifyHelmHomeIfNecessary - if true and, for whatever
reason, the local Helm home directory structure needs to be
partially or entirely created, then this method will attempt to
reify itfactory - a ChartRepositoryRepository.ChartRepositoryFactory that can create
ChartRepository instances; may be null in which
case the ChartRepository.ChartRepository(String, URI,
Path, Path, Path) constructor will be used insteadChartRepositoryRepository; never nullIOException - if there was a problem reading the file or
reifying the local Helm home directory structureURISyntaxException - if there was an invalid URI in the
fileCopyright © 2017–2018, microBean. All rights reserved.