Closed hdimitriou closed 5 years ago
I also tried 'Kubernetes / Pods / Execution Script' but that didn't work either
18:59:49 | DEBUG: kubernetes-plugin: config file
-- | --
18:59:49 | DEBUG: kubernetes-plugin: /home/rundeck/.kube/config-rd-K1
18:59:49 | DEBUG: kubernetes-plugin: -------------------
18:59:49 | DEBUG: kubernetes-plugin: getting settings from file /home/rundeck/.kube/config-rd-K1
18:59:49 | DEBUG: kubernetes-model-source: --------------------------
18:59:49 | DEBUG: kubernetes-model-source: Pod Name: rundeck-worker-replicaset-c57jv
18:59:49 | DEBUG: kubernetes-model-source: Namespace: rundeck-workers
18:59:49 | DEBUG: kubernetes-model-source: --------------------------
18:59:49 | Traceback (most recent call last):
18:59:49 | File "/home/rundeck/libext/cache/kubernetes-plugin-1.10.1-SNAPSHOT/pods-run-script.py", line 156, in <module>
18:59:49 | main()
18:59:49 | File "/home/rundeck/libext/cache/kubernetes-plugin-1.10.1-SNAPSHOT/pods-run-script.py", line 79, in main
18:59:49 | temp.write(script)
18:59:49 | File "/usr/lib/python3.5/tempfile.py", line 622, in func_wrapper
18:59:49 | return func(*args, **kwargs)
18:59:49 | TypeError: a bytes-like object is required, not 'str'
18:59:50 | [Kubernetes-InlineScript-Step]: result code: 1
18:59:50 | Failed: NonZeroResultCode: Script result code was: 1
Ok so I figured this out, first of all Reason: Handshake status 403 Forbidden
was due to the fact I had wrong ServiceAccount permission
Still however there is a bug on the code
kubernetes.client.rest.ApiException: (0)
Reason: Handshake status 404 Not Found
and this has to do forgetting to pass the namespace variable to the copy_file function from the pods-copy-file.py
I created this PR https://github.com/rundeck-plugins/kubernetes/pull/40 but i dont know how to link it
Thanks @hdimitriou , merged
PR is merged so I am closing this
When I try to run a 'script' node step on a pod I get
'Command' node steps work fine on those pods with the same settings. This is just another step on the same job.
I have setup the project to use "Kubernetes / Pods / File Copier" with the very same setting I have for 'Kubernetes / Pods / Node Executor'