Class HelmRelease
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.honton.chas.helmrepo.maven.plugin.HelmGoal
-
- org.honton.chas.helmrepo.maven.plugin.HelmRelease
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo,CommandOptions,GlobalReleaseOptions
- Direct Known Subclasses:
HelmTemplate,HelmUninstall,HelmUpgrade
public abstract class HelmRelease extends HelmGoal implements GlobalReleaseOptions, CommandOptions
-
-
Constructor Summary
Constructors Constructor Description HelmRelease()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringchartReference(ReleaseInfo info)What is the chart reference for the helm command? May return null.voidcreateNamespace(List<String> command)create namespace for the releaseprotected voiddoExecute()Iterable<ReleaseInfo>getIterable(LinkedList<ReleaseInfo> inOrder)Given a list of releases, return an iterator that determines the traversal orderprotected io.fabric8.kubernetes.client.KubernetesClientgetKubernetesClient()protected voidinitializeGlobalValuesFiles()protected voidpostHelmCommand(ReleaseInfo release, String namespace)protected voidpreHelmCommand(ReleaseInfo release, String namespace)voidreleaseOptions(ReleaseInfo release, List<String> command)Add any additional options per releasePathreleaseValues(String valuesFileName)Given that info.valueYaml is not empty, return the location of the file.protected booleanvalidateConfiguration()protected booleanvalidateRelease(ReleaseInfo release)Each Release must have proper release name and chart-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.honton.chas.helmrepo.maven.plugin.CommandOptions
addSubCommand
-
Methods inherited from interface org.honton.chas.helmrepo.maven.plugin.GlobalReleaseOptions
getGlobalValuePath, getGlobalValuesFile, getKubernetes
-
-
-
-
Method Detail
-
doExecute
protected void doExecute() throws org.apache.maven.plugin.MojoExecutionException, IOException- Specified by:
doExecutein classHelmGoal- Throws:
org.apache.maven.plugin.MojoExecutionExceptionIOException
-
initializeGlobalValuesFiles
protected void initializeGlobalValuesFiles() throws IOException- Throws:
IOException
-
validateConfiguration
protected boolean validateConfiguration()
-
validateRelease
protected boolean validateRelease(ReleaseInfo release)
Each Release must have proper release name and chart
-
preHelmCommand
protected void preHelmCommand(ReleaseInfo release, String namespace)
-
postHelmCommand
protected void postHelmCommand(ReleaseInfo release, String namespace)
-
getKubernetesClient
protected io.fabric8.kubernetes.client.KubernetesClient getKubernetesClient()
-
chartReference
public String chartReference(ReleaseInfo info)
Description copied from interface:CommandOptionsWhat is the chart reference for the helm command? May return null.- Specified by:
chartReferencein interfaceCommandOptions
-
releaseOptions
public void releaseOptions(ReleaseInfo release, List<String> command) throws IOException
Description copied from interface:CommandOptionsAdd any additional options per release- Specified by:
releaseOptionsin interfaceCommandOptions- Throws:
IOException
-
getIterable
public Iterable<ReleaseInfo> getIterable(LinkedList<ReleaseInfo> inOrder)
Description copied from interface:CommandOptionsGiven a list of releases, return an iterator that determines the traversal order- Specified by:
getIterablein interfaceCommandOptions
-
releaseValues
public Path releaseValues(String valuesFileName)
Description copied from interface:CommandOptionsGiven that info.valueYaml is not empty, return the location of the file. If no values option should be generated, return null.- Specified by:
releaseValuesin interfaceCommandOptions
-
createNamespace
public void createNamespace(List<String> command)
Description copied from interface:CommandOptionscreate namespace for the release- Specified by:
createNamespacein interfaceCommandOptions
-
-