|
1 | 1 | package io.javaoperatorsdk.quarkus.extension.deployment;
|
2 | 2 |
|
| 3 | +import io.fabric8.kubernetes.client.CustomResource; |
3 | 4 | import io.fabric8.kubernetes.client.CustomResourceDoneable;
|
4 | 5 | import io.javaoperatorsdk.operator.ControllerUtils;
|
5 | 6 | import io.javaoperatorsdk.operator.api.Controller;
|
@@ -107,20 +108,26 @@ private ControllerConfiguration createControllerConfiguration(
|
107 | 108 | final var crDoneableClassName = CustomResourceDoneable.class.getName();
|
108 | 109 | try (ClassCreator cc =
|
109 | 110 | ClassCreator.builder()
|
| 111 | + .signature( |
| 112 | + String.format( |
| 113 | + "Lio/fabric8/kubernetes/client/CustomResourceDoneable<L%s;>;", |
| 114 | + crType.replace('.', '/'))) |
110 | 115 | .classOutput(classOutput)
|
111 | 116 | .className(doneableClassName)
|
112 | 117 | .superClass(crDoneableClassName)
|
113 | 118 | .build()) {
|
114 | 119 |
|
115 |
| - MethodCreator ctor = cc.getMethodCreator("<init>", void.class.getName(), crType); |
| 120 | + final var functionName = io.fabric8.kubernetes.api.builder.Function.class.getName(); |
| 121 | + MethodCreator ctor = |
| 122 | + cc.getMethodCreator("<init>", void.class.getName(), crType, functionName); |
116 | 123 | ctor.setModifiers(Modifier.PUBLIC);
|
117 |
| - final var functionName = Function.class.getName(); |
118 | 124 | ctor.invokeSpecialMethod(
|
119 |
| - MethodDescriptor.ofConstructor(crDoneableClassName, crType, functionName), |
| 125 | + MethodDescriptor.ofConstructor( |
| 126 | + crDoneableClassName, CustomResource.class.getName(), functionName), |
120 | 127 | ctor.getThis(),
|
121 | 128 | ctor.getMethodParam(0),
|
122 |
| - ctor.invokeStaticMethod( |
123 |
| - MethodDescriptor.ofMethod(functionName, "identity", functionName))); |
| 129 | + ctor.getMethodParam(1)); |
| 130 | + ctor.returnValue(null); |
124 | 131 | }
|
125 | 132 |
|
126 | 133 | // generate configuration
|
|
0 commit comments