broad-market-21398
02/01/2020, 5:00 AMdeployment = Deployment(
"nginx",
spec={
"selector": { "match_labels": app_labels },
"replicas": 1,
"template": {
"metadata": { "labels": app_labels },
"spec": { "containers": [{ "name": "nginx", "image": "nginx" }] }
}
})
There's no typing on the keys like "selector", "replicas", etc.
These specs are defined in the OpenAPI, so I was hoping there would be some way to get type hints for the actual spec body for code completion -- am I missing some way to get this working, or is this not implemented?
This is (verbosely) implemented in client-python
; I'm hoping for something like this (but perhaps a bit more ergonomic): https://github.com/kubernetes-client/python/blob/master/examples/deployment_crud.py#L24-L46