@Mojo(name="apply",
requiresDependencyResolution=COMPILE,
defaultPhase=INSTALL)
public class ApplyMojo
extends AbstractFabric8Mojo
| Modifier and Type | Field and Description |
|---|---|
protected ApplyService |
applyService |
static String |
DEFAULT_KUBERNETES_MANIFEST |
static String |
DEFAULT_OPENSHIFT_MANIFEST |
protected boolean |
failOnError
Should we fail the build if an apply fails?
|
protected boolean |
recreate
Should we update resources by deleting them first and then creating them again?
|
protected String |
routeDomain
The domain added to the service ID when creating OpenShift routes
|
protected String |
s2iBuildNameSuffix
The S2I binary builder BuildConfig name suffix appended to the image name to avoid
clashing with the underlying BuildConfig for the Jenkins pipeline
|
protected long |
serviceUrlWaitTimeSeconds
How many seconds to wait for a URL to be generated for a service
|
protected boolean |
skipApply |
| Constructor and Description |
|---|
ApplyMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyEntities(io.fabric8.kubernetes.client.KubernetesClient kubernetes,
String namespace,
String fileName,
Set<io.fabric8.kubernetes.api.model.HasMetadata> entities) |
protected void |
createIngress(io.fabric8.kubernetes.client.KubernetesClient kubernetesClient,
Collection<io.fabric8.kubernetes.api.model.HasMetadata> collection) |
protected void |
createRoutes(Collection<io.fabric8.kubernetes.api.model.HasMetadata> collection) |
protected void |
disableOpenShiftFeatures(ApplyService applyService)
Lets disable OpenShift-only features if we are not running on OpenShift
|
void |
executeInternal() |
protected String |
getExternalServiceURL(io.fabric8.kubernetes.api.model.Service service) |
static io.fabric8.kubernetes.api.model.ServiceSpec |
getOrCreateSpec(io.fabric8.kubernetes.api.model.Service entity) |
org.apache.maven.project.MavenProject |
getProject() |
protected org.apache.maven.project.MavenProject |
getRootProject()
Returns the root project folder
|
protected File |
getRootProjectFolder()
Returns the root project folder
|
protected void |
initServices(io.fabric8.kubernetes.client.KubernetesClient kubernetes,
io.fabric8.maven.docker.util.Logger log) |
protected boolean |
isExposeService(io.fabric8.kubernetes.api.model.Service service) |
boolean |
isRollingUpgradePreserveScale() |
boolean |
isRollingUpgrades() |
createExternalProcessLogger, createLogger, execute, getClusterConfiguration, getPropertypublic static final String DEFAULT_KUBERNETES_MANIFEST
public static final String DEFAULT_OPENSHIFT_MANIFEST
@Parameter(property="fabric8.domain") protected String routeDomain
@Parameter(property="fabric8.deploy.failOnError",
defaultValue="true")
protected boolean failOnError
@Parameter(property="fabric8.recreate",
defaultValue="false")
protected boolean recreate
@Parameter(property="fabric8.serviceUrl.waitSeconds",
defaultValue="5")
protected long serviceUrlWaitTimeSeconds
@Parameter(property="fabric8.s2i.buildNameSuffix",
defaultValue="-s2i")
protected String s2iBuildNameSuffix
@Parameter(property="fabric8.skip.apply",
defaultValue="false")
protected boolean skipApply
protected ApplyService applyService
public void executeInternal()
throws org.apache.maven.plugin.MojoExecutionException
executeInternal in class AbstractFabric8Mojoorg.apache.maven.plugin.MojoExecutionExceptionprotected void initServices(io.fabric8.kubernetes.client.KubernetesClient kubernetes,
io.fabric8.maven.docker.util.Logger log)
public static io.fabric8.kubernetes.api.model.ServiceSpec getOrCreateSpec(io.fabric8.kubernetes.api.model.Service entity)
protected void applyEntities(io.fabric8.kubernetes.client.KubernetesClient kubernetes,
String namespace,
String fileName,
Set<io.fabric8.kubernetes.api.model.HasMetadata> entities)
throws Exception
Exceptionprotected String getExternalServiceURL(io.fabric8.kubernetes.api.model.Service service)
protected boolean isExposeService(io.fabric8.kubernetes.api.model.Service service)
public boolean isRollingUpgrades()
public boolean isRollingUpgradePreserveScale()
public org.apache.maven.project.MavenProject getProject()
protected void disableOpenShiftFeatures(ApplyService applyService)
protected void createRoutes(Collection<io.fabric8.kubernetes.api.model.HasMetadata> collection)
protected void createIngress(io.fabric8.kubernetes.client.KubernetesClient kubernetesClient,
Collection<io.fabric8.kubernetes.api.model.HasMetadata> collection)
protected File getRootProjectFolder()
protected org.apache.maven.project.MavenProject getRootProject()
Copyright © 2019. All rights reserved.