Closed banjoh closed 4 months ago
I've approved, but I guess I do have a question. The issue this is referencing says that the issue was batch/v1beta1/cronjobs
vs batch/v1/cronjobs
. Does changing this from CronJobs
to CronJob
actually fix this?
I've approved, but I guess I do have a question. The issue this is referencing says that the issue was
batch/v1beta1/cronjobs
vsbatch/v1/cronjobs
. Does changing this fromCronJobs
toCronJob
actually fix this?
It does. Below is a snippet of the API description object fetched from the API server during discovery. The "kind": "CronJob"
) field is used in discovery.HasResource() to select the resource. That condition always failed due to the typo. The API call we see in the logs contains a concatenation of values from "groupVersion"
and "name"
fields. Hope that makes sense.
{
"groupVersion": "batch/v1",
"resources": [
{
"name": "cronjobs",
"singularName": "cronjob",
"namespaced": true,
"kind": "CronJob",
"verbs": [
"create",
"delete",
"deletecollection",
"get",
"list",
"patch",
"update",
"watch"
],
"shortNames": [
"cj"
],
"categories": [
"all"
]
},
Description, Motivation and Context
Use correct cron job kind when discovering API versions
Fixes: https://github.com/replicatedhq/troubleshoot/issues/1553
Checklist
Does this PR introduce a breaking change?