Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Fix CronJob manifest verification #1133

Merged
merged 1 commit into from
Jun 11, 2018
Merged

Fix CronJob manifest verification #1133

merged 1 commit into from
Jun 11, 2018

Conversation

rndstr
Copy link
Contributor

@rndstr rndstr commented Jun 8, 2018

This fixes the error

verifying changes: failed to verify changes: updating container
\"some-cronjob\" in resource \"default:cronjob/some-cronjob\" failed:
container \"some-cronjob\" not found in workload

while verifying a CronJob file.

yaml.Unmarshal unmarshals from yaml fields into struct fields
according to their lowercase version. For the struct field JobTemplate
it is looking for jobtemplate while it is actually named
jobTemplate.

Fixes #1126

This fixes the error

    verifying changes: failed to verify changes: updating container
    \"some-cronjob\" in resource \"default:cronjob/some-cronjob\" failed:
    container \"some-cronjob\" not found in workload

while verifying a CronJob file.

`yaml.Unmarshal` unmarshals from yaml fields into struct fields
according to their lowercase version. For the struct field `JobTemplate`
it is looking for `jobtemplate` while it is actually named
`jobTemplate`.
@rndstr rndstr requested a review from squaremo June 8, 2018 22:33
Copy link
Member

@squaremo squaremo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thanks @rndstr 🥇

@squaremo squaremo merged commit a843586 into master Jun 11, 2018
@squaremo squaremo deleted the fix/parse-cronjob branch June 11, 2018 09:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Verifying CronJob fails
2 participants