Closed KabilanMA closed 10 months ago
FYI https://github.com/kubernetes-client/c/issues/196
And the last parameter force
has been changed from int
to int *
in this API:
AppsV1API_patchNamespacedDeployment(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force)
Generic client seems to solve the problem. https://github.com/kubernetes-client/c/issues/196#issuecomment-1595573290
Yes. the generic client can solve the problem.
But after #210 merges, I think the API AppsV1API_patchNamespacedDeployment
should work too. So if you don't want to use generic client, try this please.
I'm trying to create a patch for the existing Kubernetes deployment in my local minikube cluster. I have successfully implemented a function to create a new deployment.
For the deployment patch, I think I have to use the following function in the
api\AppsV1API.c
:I don't understand the function's correct argument for the
object_t *body
.Deployment configuration file:
I want to change the replicas from 1 to 3.
I have tried giving
{'spec': {'replicas': 2}}
and[{'op': 'replace', 'path': '/spec/replicas', 'value': 2}]
, nothing seems to work.