io.fabric8 generates kubernetes and openshift yaml when i include targetDir configuration
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>4.3.1</version>
<configuration>
<targetDir>${basedir}/fabric8/</targetDir>
</configuration>
</plugin>
by default it goes to goes to target/fabric8/deployment.yaml
i want it to go to {basedir}/fabric8/
without it generating some extra extra folders and files, just /deployment.yaml
, this is the command i ran mvn fabric8:resource
I'm from Fabric8 team. Fabric8 Maven Plugin has an option
fabric8.targetDir
with which you can override default target directory. Here is how it should work for your use case:Unfortunately, Fabric8 Maven Plugin generates resource descriptors for both Kubernetes and Openshift. In case of Kubernetes also, it generates a default
Service
, if you want to disable it, you can configure plugin like this to disable Service Enricher:This way
Service
won't be generated during the resource generation phase and you would be left withDeployment
only. Here is a run after the plugin configuration:We have been refactoring/rebranding FMP into two different plugins, you can find it here: Eclipse Jkube, it has two plugins - Kubernetes Maven Plugin and Openshift Maven Plugin. They only generate Kubernetes or Openshift manifests respectively. That way you can only generate Kubernetes resources which seem to be fitting your current use case.
Hope that helps.