-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error with k8s 1.21 #155
Comments
I have tried to recompile the plugin with 8.0.0 instead of 7.0.0 of the io.kubernetes library but it didn't work. tried using 9.0.0 but couldn't build a working plugin. I think I am going to uninstall this and use the cli instead. |
yes same error |
Same error here |
Same here. |
same here. |
I have updated it to 13.0.0 and it still doesn't work |
Same here |
Same here. Noone knows how to fix this? |
So some ideas on how to fix. In kubernetes-cd-plugin\src\main\java\com\microsoft\jenkins\kubernetes\wrapper\V1beta1ResourceManager.java where there are calls with "getPretty(), true", change to "getPretty(), null". That will set the export parameter to null so that the query parameter doesn't get added. Will need to do this for all V1beta*.java files. That is a hack, since even though my yaml file specify v1 api.. this plugin is still invoking the V1beta functions and not the V1 functions. @Trojaner |
@DraconPern can you tell me where to edit this file? I don't have this file in /opt/jenkins_home/plugins/kubernetes-cd/* |
Ah this line for example. Line 72 in 6665e28
|
Yes I know, but where is that file on the server? I can't seem to find it. |
@DraconPern You sir deserve a medal. Your comment solved my issue and saved me hours of debugging. |
@facupalladino where did you find this file on the disk? I can't find it in $JENKINS_HOME/plugins/kubernetes-cd-plugin |
Hello there! You’re not going to find the file in the Jenkins machine as it is builded into a .jar. |
@facupalladino That would be awesome! Thanks! |
Hello Harvey, |
@facupalladino thanks. I think it got a step further just to encounter a new issue: ERROR: ERROR: Can't construct a java object for tag:yaml.org,2002:io.kubernetes.client.openapi.models.V1Deployment; exception=Class not found: io.kubernetes.client.openapi.models.V1Deployment hudson.remoting.ProxyException: Can't construct a java object for tag:yaml.org,2002:io.kubernetes.client.openapi.models.V1Deployment; exception=Class not found: io.kubernetes.client.openapi.models.V1Deployment
Caused by: hudson.remoting.ProxyException: org.yaml.snakeyaml.error.YAMLException: Class not found: io.kubernetes.client.openapi.models.V1Deployment |
Can youy make the same with the last version ? https://github.com/jenkinsci/kubernetes-cd-plugin/releases/tag/kubernetes-cd-2.3.1 i guess there it is |
Here is a fixed version: https://github.com/byo-software/kubernetes-cd-plugin Note: none of the security advisories have been addressed. |
I've got a problem, tabs at source java code doesn't supported ?
String 9 is |
Config file setting should be **/*.yaml |
Can we add ingress somehow ? Because jenkiins write |
After upgrading a k8s from 1.20 to 1.21, I am getting this error in the log
Api call failed with code 400, detailed message: {
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "the export parameter, deprecated since v1.14, is no longer supported",
"reason": "BadRequest",
"code": 400
}
ERROR: ERROR: java.lang.RuntimeException: io.kubernetes.client.openapi.ApiException:
hudson.remoting.ProxyException: java.lang.RuntimeException: io.kubernetes.client.openapi.ApiException:
at com.microsoft.jenkins.kubernetes.wrapper.ResourceManager.handleApiExceptionExceptNotFound(ResourceManager.java:180)
at com.microsoft.jenkins.kubernetes.wrapper.V1ResourceManager$StatefulSetUpdater.getCurrentResource(V1ResourceManager.java:970)
at com.microsoft.jenkins.kubernetes.wrapper.V1ResourceManager$StatefulSetUpdater.getCurrentResource(V1ResourceManager.java:958)
at com.microsoft.jenkins.kubernetes.wrapper.ResourceManager$ResourceUpdater.createOrApply(ResourceManager.java:93)
at com.microsoft.jenkins.kubernetes.wrapper.KubernetesClientWrapper.handleResource(KubernetesClientWrapper.java:289)
at com.microsoft.jenkins.kubernetes.wrapper.KubernetesClientWrapper.apply(KubernetesClientWrapper.java:256)
at com.microsoft.jenkins.kubernetes.command.DeploymentCommand$DeploymentTask.doCall(DeploymentCommand.java:172)
at com.microsoft.jenkins.kubernetes.command.DeploymentCommand$DeploymentTask.call(DeploymentCommand.java:124)
at com.microsoft.jenkins.kubernetes.command.DeploymentCommand$DeploymentTask.call(DeploymentCommand.java:106)
at hudson.remoting.UserRequest.perform(UserRequest.java:211)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:376)
at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:829)
Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to Ubuntu1804
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1800)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
at hudson.remoting.Channel.call(Channel.java:1001)
at hudson.FilePath.act(FilePath.java:1248)
at com.microsoft.jenkins.kubernetes.command.DeploymentCommand.execute(DeploymentCommand.java:68)
at com.microsoft.jenkins.kubernetes.command.DeploymentCommand.execute(DeploymentCommand.java:45)
at com.microsoft.jenkins.azurecommons.command.CommandService.runCommand(CommandService.java:88)
at com.microsoft.jenkins.azurecommons.command.CommandService.execute(CommandService.java:96)
at com.microsoft.jenkins.azurecommons.command.CommandService.executeCommands(CommandService.java:75)
at com.microsoft.jenkins.azurecommons.command.BaseCommandContext.executeCommands(BaseCommandContext.java:77)
at com.microsoft.jenkins.kubernetes.KubernetesDeploy.perform(KubernetesDeploy.java:42)
at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803)
at hudson.model.Build$BuildExecution.build(Build.java:197)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513)
at hudson.model.Run.execute(Run.java:1907)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by: hudson.remoting.ProxyException: io.kubernetes.client.openapi.ApiException:
at io.kubernetes.client.openapi.ApiClient.handleResponse(ApiClient.java:979)
at io.kubernetes.client.openapi.ApiClient.execute(ApiClient.java:895)
at io.kubernetes.client.openapi.apis.AppsV1Api.readNamespacedStatefulSetWithHttpInfo(AppsV1Api.java:8129)
at io.kubernetes.client.openapi.apis.AppsV1Api.readNamespacedStatefulSet(AppsV1Api.java:8105)
at com.microsoft.jenkins.kubernetes.wrapper.V1ResourceManager$StatefulSetUpdater.getCurrentResource(V1ResourceManager.java:967)
... 15 more
ERROR: Kubernetes deployment ended with HasError
The text was updated successfully, but these errors were encountered: