Skip to content

snowdrop/fmp-istio-enricher

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fabric8 Maven Plugin Istio Enricher

This Fabric8 maven plugin enricher API allows enriching the Openshift DeploymentConfig resource with Istio Proxy, Istio Init or Core Dump image and other needed triggers.

Some parameters can be changed within the plugin’s profile yaml or within the Maven plugin xml configuration part. To, by example change the istio version of the docker image, then add this parameter within your profile

- name: istio-spring-boot-profile
  enricher:
    config:
      fmp-istio-enricher:
        istioVersion: "0.2.12"

You can also tell to the enricher if you want to include the Core Dump container or the istio_debug image with these boolean values

- name: istio-spring-boot-profile
  enricher:
    config:
      fmp-istio-enricher:
        enableCoreDump: "false"
        withDebugImage: "false"

The list of the by default parameters, as defined by the Istio project, is defined within the Istio MeshConfig and DefaultConfig java class. They will be overridden when the enricher will call the Kubernetes Api to get the Istio ConfigMap.

Warning
This enricher is still under development, and expect changes

Build

Clone the repo https://github.com/snowdrop/fmp-istio-enricher and run mvn clean install from $PROJECT_HOME

Usage

Create fabric8 maven plugin profile called profiles.yml inside $basedir/src/main/fabric8.

The following example shows a profile which can be used in conjunction with spring-boot app. Please refer to fabric8 maven plugin profile for more details

- name: istio-spring-boot-app
  enricher:
    # The order given in "includes" is the order in which enrichers are called
    includes:
    - fmp-name
    - fmp-controller
    - fmp-service
    - fmp-image
    - fmp-portname
    - fmp-project
    - fmp-pod-annotations
    - fmp-debug
    - fmp-merge
    - fmp-remove-build-annotations
    - fmp-volume-permission
    - fmp-istio-enricher
    - f8-expose
    # Health checks
    - spring-boot-health-check
    - docker-health-check
    - fmp-dependency
    - f8-watch
  generator:
    # The order given in "includes" is the order in which generators are called
    includes:
    - spring-boot
  watcher:
    includes:
    - spring-boot
    - docker-image

Add the following fabric8-maven-plugin configuration to the project,

 <plugin>
    <groupId>io.fabric8</groupId>
    <artifactId>fabric8-maven-plugin</artifactId>
    <version>3.5.33</version>
    <dependencies>
      <dependency> (1)
        <groupId>me.snowdrop</groupId>
        <artifactId>fmp-istio-enricher</artifactId>
        <version>1.0-SNAPSHOT</version>
      </dependency>
    </dependencies>
    <configuration>
      <profile>istio-spring-boot-app</profile>  (2)
    </configuration>
 </plugin>
  1. add the fmp-istio-enricher as dependnecy to the fabric8-maven-plugin

  2. should be name that was used in the profiles.yaml above

Note
This application right now uses SNAPSHOT version of fabric8-maven-plugin for probeMode

To release

To release the snapshot of the project on Sonatype, please execute this command

mvn clean source:jar deploy -Prelease

Packages

No packages published

Languages

  • Java 100.0%