kubernetes-client / c

Official C client library for Kubernetes
Apache License 2.0
144 stars 46 forks source link

How can I Use 'AutoscalingV1API_patchNamespacedHorizontalPodAutoscalerStatus' ? #49

Closed minerba closed 3 years ago

minerba commented 3 years ago

Hi. I m trying to make hpa Update api.

I have confirmed that Below CURL message is working fine.

curl -k -g \ -X PATCH \ -d @- \ -H "Authorization: Bearer $TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/strategic-merge-patch+json' \ https://[${MY_SERVICE_HOST}]:${MY_SERVICE_PORT}/apis/autoscaling/v1/namespaces/default/horizontalpodautoscalers/My-Hpa?<<'EOF' { } EOF

But 'AutoscalingV1API_patchNamespacedHorizontalPodAutoscalerStatus' call apiClient_invoke. apiClient_Invoke makes Header like 'Content-Type: application/json' + ... etc But this Content-Type return Bad Request Error.

PATCH Request need to diffrent Apiclient_invoke function.

Not only this problem but also object_t parameter is not used anywhere.

in AutoscalingV1API_patchNamespacedHorizontalPodAutoscalerStatus "object_t* object parameter" is not used anywhere.

so Can't input changed part.

If the above words are wrong, please let me know the correct usage of

'AutoscalingV1API_patchNamespacedHorizontalPodAutoscalerStatus'

I don't know what is object_t?... and then how can I makes curl message (Like above curl Message) by using apiClient_invoke...

thank you.

ityuhui commented 3 years ago

Hi @minerba

For now, object_t is not supported by apiClient_invoke.

You can use generic client to operate the resources (e.g. horizontalpodautoscalers) directly now.

minerba commented 3 years ago

Thank U