-
Notifications
You must be signed in to change notification settings - Fork 309
Open
Description
I am getting this issue while trying to run the pod worker into kubernetes cluster using DeployerPartitionerHandler with Kubernetes Deployer
java.lang.NoSuchMethodError: 'io.fabric8.kubernetes.api.model.HTTPGetActionFluent io.fabric8.kubernetes.api.model.HTTPGetActionBuilder.withNewPort(java.lang.Integer)'
at org.springframework.cloud.deployer.spi.kubernetes.HttpProbeCreator.create(HttpProbeCreator.java:65) ~[spring-cloud-deployer-kubernetes-2.9.0.jar:na]
In the HTTPGetActionBuilder class there is a function withNewPort(Object port), even though the port 8989 has been populated but it thrown this exception
Please find more details of package version:
Spring boot: 3.1.4
Spring Cloud Task: 3.0.3
Spring Cloud Task Batch: 3.0.3
Spring Cloud Deployer: 2.9.0
This is how I configure the partition handler:
@Bean
public DeployerPartitionHandler partitionHandler() {
Resource resource = new DockerResource("service-image");
DeployerPartitionHandler partitionHandler = new DeployerPartitionHandler(taskLauncher, jobExplorer, resource, "ingestWorkerStep", taskRepository);
List<String> commandLineArgs = new ArrayList<>(4);
commandLineArgs.add("--spring.profiles.active=worker");
commandLineArgs.add("--spring.cloud.task.initialize.enable=false");
commandLineArgs.add("--spring.batch.initializer.enabled=false");
commandLineArgs.add("--spring.datasource.initialize=false");
commandLineArgs.add("--spring.datasource.initialize=false");
partitionHandler.setCommandLineArgsProvider(new PassThroughCommandLineArgsProvider(commandLineArgs));
partitionHandler.setEnvironmentVariablesProvider(new SimpleEnvironmentVariablesProvider(environment));
partitionHandler.setMaxWorkers(3);
partitionHandler.setApplicationName("partitionjob");
return partitionHandler;
}
spring:
cloud:
deployer:
kubernetes:
namespace: default
startup-http-probe-port: 8989
liveness-http-probe-port: 8989
readiness-http-probe-port: 8989
host-network: true
livenessProbePath: /actuator/health/liveness
readinessProbePath: /actuator/health/readiness
Did I miss any configuration?
Thanks
Metadata
Metadata
Assignees
Labels
No labels