Closed ityuhui closed 4 years ago
Hi @clearday4
Cloud you please review the design (especially for the examples/watch_list_pod
) too?
Append the output of examples/watch_list_pod
watch event raw string:
{"type":"ADDED","object":{"kind":"Pod","apiVersion":"v1","metadata":{"name":"test-p5","namespace":"default","selfLink":"/api/v1/namespaces/default/pods/test-p5","uid":"4a59346d-4351-4a94-b5b0-5c93afb74d3e","resourceVersion":"36874225","creationTimestamp":"2020-03-18T09:21:54Z"},"spec":{"volumes":[{"name":"default-token-8p4h4","secret":{"secretName":"default-token-8p4h4","defaultMode":420}}],"containers":[{"name":"my-container","image":"ubuntu:16.04","command":["sleep"],"args":["3600"],"resources":{},"volumeMounts":[{"name":"default-token-8p4h4","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"IfNotPresent"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","nodeName":"yhu1a","securityContext":{},"schedulerName":"default-scheduler","tolerations":[{"key":"node.kubernetes.io/not-ready","operator":"Exists","effect":"NoExecute","tolerationSeconds":300},{"key":"node.kubernetes.io/unreachable","operator":"Exists","effect":"NoExecute","tolerationSeconds":300}],"priority":0,"enableServiceLinks":true},"status":{"phase":"Running","conditions":[{"type":"Initialized","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-03-18T09:21:54Z"},{"type":"Ready","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-09-09T10:08:52Z"},{"type":"ContainersReady","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-09-09T10:08:52Z"},{"type":"PodScheduled","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-03-18T09:21:54Z"}],"hostIP":"9.111.254.254","podIP":"10.244.0.5","podIPs":[{"ip":"10.244.0.5"}],"startTime":"2020-03-18T09:21:54Z","containerStatuses":[{"name":"my-container","state":{"running":{"startedAt":"2020-09-09T10:08:52Z"}},"lastState":{"terminated":{"exitCode":0,"reason":"Completed","startedAt":"2020-09-09T09:08:51Z","finishedAt":"2020-09-09T10:08:51Z","containerID":"docker://23702d68fda5f98a2035f03139692e32ebb4c9968f2997a5c83a4904b8e59776"}},"ready":true,"restartCount":4054,"image":"ubuntu:16.04","imageID":"docker-pullable://ubuntu@sha256:bb5b48c7750a6a8775c74bcb601f7e5399135d0a06de004d000e05fd25c1a71c","containerID":"docker://b81c2afbd7cb0549d8cd5fe175c83778eef64450252bb44be36ce3d4140e8f8e","started":true}],"qosClass":"BestEffort"}}}
type: ADDED
pod:
name: test-p5
Hi @clearday4
Cloud you please review the design (especially for the
examples/watch_list_pod
) too?
Sure. I'm pleased to review this function. I will add a comment after review.
The callback function pointer data_callback_func
will be added to api client by this PR https://github.com/OpenAPITools/openapi-generator/pull/7467
Great, let's wait for that to merge and then we can get this PR merged too.
Hi @brendandburns
The code is updated after data_callback_func
is merged from openapi-generator.
Could you please review the new code change ? Thanks
One small nit and then it's ready to merge.
The code change is updated.
/lgtm /approve
Cool!
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: brendandburns, ityuhui
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Hi @brendandburns
This is a draft implementation for
watch
support. We can discuss the design here.This PR should not be merged because a part of code should be merged to generator repo https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/C-libcurl