Spinnaker Plugin (PF4J based) that uses a regular interface as an extension point.
Note these things when extending a regular interface with Pf4J:
- you need to provide this compiler argument
-Apf4j.ignoreExtensionPoint - if you want to promote your implementation of the interface to the parent service application context, your class must also implement
SpinnakerExtensionPoint.
- Run
./gradlew releaseBundle - Put the
/build/distributions/pf4jPluginWithoutExtensionPoint-X.zipin the configured plugins location for your service. - Configure the Spinnaker service. Put the following in the service yml to enable the plugin and configure the extension.
spinnaker:
extensibility:
plugins:
Armory.SillySecretsPlugin:
enabled: true
config:
password: 'psswd'
Or use the examplePluginRepository to avoid copying the plugin .zip artifact.
To debug the plugin inside a Spinnaker service (like Orca) using IntelliJ Idea follow these steps:
- Run
./gradlew releaseBundlein the plugin project. - Copy the generated
.plugin-reffile underbuildin the plugin project submodule for the service to thepluginsdirectory under root in the Spinnaker service that will use the plugin . - Link the plugin project to the service project in IntelliJ (from the service project use the
+button in the Gradle tab and select the plugin build.gradle). - Configure the Spinnaker service the same way specified above.
- Create a new IntelliJ run configuration for the service that has the VM option
-Dpf4j.mode=developmentand does aBuild Projectbefore launch. - Debug away...