kubernetes-client / c

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

Need to modify parameters #61

Closed minerba closed 2 years ago

minerba commented 3 years ago

I think functions should receive "const char" rather than "char".

for example name or _namespace are unlikely to be modified.

ityuhui commented 3 years ago

Could you please give any function for example ?

minerba commented 3 years ago

I have a Compile warning in this function

Because of parameters "char *" .

v1_pod_t CoreV1API_readNamespacedPod(apiClient_t apiClient, char name , char _namespace , char * pretty , int exact , int _export )

parameters name, _namespace, pretty are unlikely to be modified.

I suggest that functions that take a parameter "char " are changed to "const char"

The same for other functions in Directory '/kubernetes/api/*'.

ityuhui commented 3 years ago

Good suggestion! I want to do this before but consider it as low priority. And welcome PR, the change should be done in the openapi-generator project.

minerba commented 3 years ago

Ok. Thank U I will PR to openapi-generator project.

ityuhui commented 3 years ago

Hi @minerba

Do you have interest to fix this issue ?

The steps:

  1. Update the files in the directory: https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/C-libcurl

  2. Execute the script in https://github.com/kubernetes-client/gen with the configuration https://github.com/kubernetes-client/c/blob/master/settings to get a generated directory kubernetes

    • The step 2 can be replaced with below commands if you want to use the current swagger spec of Kubernetes API server:
      # Execute the command in the directory of repo `OpenAPITools/openapi-generator`
      mvn clean package
      java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i ../c/kubernetes/swagger.json   -g c    -o ../kubernetes --skip-validate-spec
  3. Copy the files in kubernetes to overwrite the files in the directory of this repo c/kubernetes/ except CMakeLists.txt

  4. Follow the https://github.com/kubernetes-client/c/blob/master/README.md to build and test

  5. Create a PR to apply to merge.

ityuhui commented 3 years ago

@minerba

You need submit 2 PR.

ityuhui commented 2 years ago

Hi @minerba

Are you still working on this ticket ?

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

ityuhui commented 2 years ago

/remove-lifecycle rotten

minerba commented 2 years ago

@ityuhui sorry Well... How can I apply this command? "/remove-lifecycle rotten"

ityuhui commented 2 years ago

How can I apply this command? "/remove-lifecycle rotten"

I have done it. You don't need do it again.

minerba commented 2 years ago

@ityuhui Thank you:)

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

ityuhui commented 2 years ago

I will fix it. Reopen this ticket to trace.

minerba commented 2 years ago

Thanks your Pr.

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-ci-robot commented 2 years ago

@k8s-triage-robot: Closing this issue.

In response to [this](https://github.com/kubernetes-client/c/issues/61#issuecomment-1154659148): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues and PRs according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue or PR with `/reopen` >- Mark this issue or PR as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.