You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm testing this plugin and I got the Resource Model working just fine.
But when I try to use one of the workflow steps to create a Deployment or a Pod I get the following error:
[Kubernetes-Create-Deployment] step started, config: {image=registry.example.com/busybox:1.33.0, debug=true, container_name=busybox, verify_ssl=false, replicas=1, name=busybox-deployment, namespace=rundeck-dev, api_version=apps/v1, labels=app=busybox}
[Kubernetes-Create-Deployment] executing: [python, -u, /home/rundeck/libext/cache/kubernetes-plugin-2.0.3/deployment-create.py]
DEBUG: kubernetes-model-source: Log level configured for DEBUG
DEBUG: kubernetes-model-source: Creating job from data:
DEBUG: kubernetes-model-source: {'api_version': 'apps/v1', 'name': 'busybox-deployment', 'container_name': 'busybox', 'image': 'registry.example.com/busybox:1.33.0', 'ports': None, 'replicas': '1', 'namespace': 'rundeck-dev', 'labels': 'app=busybox'}
DEBUG: kubernetes-plugin: config file
DEBUG: kubernetes-plugin: None
DEBUG: kubernetes-plugin: -------------------
DEBUG: kubernetes-plugin: getting from default config file
Traceback (most recent call last):
File "/home/rundeck/libext/cache/kubernetes-plugin-2.0.3/deployment-create.py", line 128, in <module>
main()
File "/home/rundeck/libext/cache/kubernetes-plugin-2.0.3/deployment-create.py", line 123, in main
deployment = create_deployment_object(data)
File "/home/rundeck/libext/cache/kubernetes-plugin-2.0.3/deployment-create.py", line 19, in create_deployment_object
template_spec = common.create_pod_template_spec(data=data)
File "/home/rundeck/libext/cache/kubernetes-plugin-2.0.3/common.py", line 264, in create_pod_template_spec
for port in data["ports"].split(','):
AttributeError: 'NoneType' object has no attribute 'split'
[Kubernetes-Create-Deployment]: result code: 1
And the deployment is not created in Kubernetes. This happens for any Pod with the ports field empty.
But when I deploy nginx with the port filed filled in, the following error occurs, but for some reason the deployment is created in Kubernetes.
[Kubernetes-Create-Deployment] step started, config: {image=registry.example.com/nginx:1.19.10-alpine, debug=true, container_name=nginx, verify_ssl=false, replicas=1, name=nginx-deployment, namespace=rundeck-dev, api_version=apps/v1, ports=80, labels=app=nginx}
[Kubernetes-Create-Deployment] executing: [python, -u, /home/rundeck/libext/cache/kubernetes-plugin-2.0.3/deployment-create.py]
DEBUG: kubernetes-model-source: Log level configured for DEBUG
DEBUG: kubernetes-model-source: Creating job from data:
DEBUG: kubernetes-model-source: {'api_version': 'apps/v1', 'name': 'nginx-deployment', 'container_name': 'nginx', 'image': 'registry.example.com/nginx:1.19.10-alpine', 'ports': '80', 'replicas': '1', 'namespace': 'rundeck-dev', 'labels': 'app=nginx'}
DEBUG: kubernetes-plugin: config file
DEBUG: kubernetes-plugin: None
DEBUG: kubernetes-plugin: -------------------
DEBUG: kubernetes-plugin: getting from default config file
Traceback (most recent call last):
File "/home/rundeck/libext/cache/kubernetes-plugin-2.0.3/deployment-create.py", line 128, in <module>
main()
File "/home/rundeck/libext/cache/kubernetes-plugin-2.0.3/deployment-create.py", line 124, in main
create_deployment(apiV1, deployment, data)
File "/home/rundeck/libext/cache/kubernetes-plugin-2.0.3/deployment-create.py", line 60, in create_deployment
print(common.parseJson(api_response.status))
File "/home/rundeck/libext/cache/kubernetes-plugin-2.0.3/common.py", line 258, in parseJson
return json.dumps(obj, cls=ObjectEncoder)
File "/usr/lib/python3.6/json/__init__.py", line 238, in dumps
**kw).encode(obj)
File "/usr/lib/python3.6/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.6/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/home/rundeck/libext/cache/kubernetes-plugin-2.0.3/common.py", line 254, in default
return {k.lstrip('_'): v for k, v in vars(obj).items()}
TypeError: vars() argument must have __dict__ attribute
[Kubernetes-Create-Deployment]: result code: 1
Using the Kubernetes/Generic/Create workflow step returns the same error in the Nginx deployment case. Again, in this case the deployment is created in Kubernetes.
DEBUG: kubernetes-model-source: Log level configured for DEBUG
Traceback (most recent call last):
File "/home/rundeck/libext/cache/kubernetes-plugin-2.0.3/create-from-yaml.py", line 139, in <module>
main()
File "/home/rundeck/libext/cache/kubernetes-plugin-2.0.3/create-from-yaml.py", line 40, in main
print(common.parseJson(resp.status))
File "/home/rundeck/libext/cache/kubernetes-plugin-2.0.3/common.py", line 258, in parseJson
return json.dumps(obj, cls=ObjectEncoder)
File "/usr/lib/python3.6/json/__init__.py", line 238, in dumps
**kw).encode(obj)
File "/usr/lib/python3.6/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.6/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/home/rundeck/libext/cache/kubernetes-plugin-2.0.3/common.py", line 254, in default
return {k.lstrip('_'): v for k, v in vars(obj).items()}
TypeError: vars() argument must have __dict__ attribute
Failed: NonZeroResultCode: Script result code was: 1
The Kubernetes cluster is v1.14.5, the Rundeck instance has Python 3.6.9 and kubernetes==12.0.1 installed.
The text was updated successfully, but these errors were encountered:
Hello,
I'm testing this plugin and I got the Resource Model working just fine.
But when I try to use one of the workflow steps to create a Deployment or a Pod I get the following error:
And the deployment is not created in Kubernetes. This happens for any Pod with the ports field empty.
But when I deploy nginx with the port filed filled in, the following error occurs, but for some reason the deployment is created in Kubernetes.
Using the Kubernetes/Generic/Create workflow step returns the same error in the Nginx deployment case. Again, in this case the deployment is created in Kubernetes.
The Kubernetes cluster is
v1.14.5
, the Rundeck instance hasPython 3.6.9
andkubernetes==12.0.1
installed.The text was updated successfully, but these errors were encountered: