Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cloud::kubernetes::plugin] error 404 when it list the cronjobs #4713

Closed
FreshardF opened this issue Oct 24, 2023 · 3 comments
Closed

[cloud::kubernetes::plugin] error 404 when it list the cronjobs #4713

FreshardF opened this issue Oct 24, 2023 · 3 comments
Labels

Comments

@FreshardF
Copy link

Hello,

I think than the uri for api cronjob have change in GCP kubernetes (GKE).

old uri : /apis/batch/v1beta1/cronjobs

new uri : /apis/batch/v1/cronjobs

test:
beta uri :
curl -H "Authorization: Bearer " -H "Accept: application/json"
-H "User-Agent: centreon::plugins::backend::http::useragent"
https://TTT.PPP.YYYY.XXX:443**/apis/batch/v1beta1/cronjobs**?limit=100 -k

{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the server could not find the requested resource","reason":"NotFound","details":{},"code":404}

no beta uri :
curl -H "Authorization: Bearer " -H "Accept: application/json"
-H "User-Agent: centreon::plugins::backend::http::useragent"
https://TTT.PPP.YYYY.XXX:443**/apis/batch/v1/cronjobs**?limit=100 -k

{"kind":"CronJobList","apiVersion":"batch/v1","metadata":{"resourceVersion":"142751960"},"items":[]}

@Emanuel-Bourel
Copy link

Good morning,

the problem is still present on the version Global Version: 20240411 (e7bf805) of the centreon_kubernetes_api.pl plugins.

So I modified the line 8774
url_path => $self->{namespace} ne '' ? '/apis/batch/v1beta1/namespaces/' . $self->{namespace} . '/cronjobs': '/apis/batch/v1beta1/cronjobs'

in

url_path => $self->{namespace} ne '' ? '/apis/batch/v1/namespaces/' . $self->{namespace} . '/cronjobs': '/apis/batch/v1/cronjobs'

can you support this modification?
Regards

@lucie-dubrunfaut
Copy link
Contributor

Hello :)

This issue is at this moment supported by this PR https://github.com/centreon/centreon-plugins/pull/5026/files could you confirm it to me? I'll close it when the PR will be integrated (it's planned in the coming weeks)

@lucie-dubrunfaut
Copy link
Contributor

Hello :)

This issue was resolved with the August release and the following PR: #5109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants