Closed
Description
I've run the MySQL sample and get the following output:
java -jar target/mysql-schema-sample-1.6.2-SNAPSHOT.jar
08:50:46.066 INFO MySQLSchemaOperator.java (22) MySQL Schema Operator starting
08:50:47.668 INFO Operator.java (112) Registered Controller: 'SchemaController' for CRD: 'class io.javaoperatorsdk.operator.sample.Schema' for namespaces: [all/client namespace]
I've copied the sample code into a standalone Gradle project and built a shadow JAR, which gives me the following error (I've got a slightly different log format):
java -jar libs/demo-operator-0.0.1-SNAPSHOT.jar
Exception in thread "main" java.lang.IllegalArgumentException: No custom resource has been found for controller io.javaoperatorsdk.operator.sample.SchemaController
at io.javaoperatorsdk.operator.config.runtime.RuntimeControllerMetadata.getCustomResourceClass(RuntimeControllerMetadata.java:32)
at io.javaoperatorsdk.operator.config.runtime.AnnotationConfiguration.getCustomResourceClass(AnnotationConfiguration.java:49)
at io.javaoperatorsdk.operator.Operator.registerController(Operator.java:78)
at io.javaoperatorsdk.operator.Operator.registerControllerForAllNamespaces(Operator.java:56)
at io.javaoperatorsdk.operator.sample.MySQLSchemaOperator.main(MySQLSchemaOperator.java:27)
Has anyone else come across this and what's the solution? Am I just missing something bleedingly obvious from the docs/samples?
Metadata
Metadata
Assignees
Labels
No labels