File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
docs/book/src/multiversion-tutorial Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 33Our conversion is in place, so all that's left is to tell
44controller-runtime about our conversion.
55
6- ## Webhook setup...
6+ ## Webhook setup for v1...
7+
8+ The v1 webhook handles conversion (as the hub) and provides validation/defaulting
9+ for the v1 CronJob format with a string-based schedule:
710
811{{#literatego ./testdata/project/internal/webhook/v1/cronjob_webhook.go}}
912
13+ ## Webhook setup for v2...
14+
15+ The v2 webhook provides validation and defaulting for the v2 CronJob format
16+ with the structured CronSchedule type. Note how the validation logic differs
17+ from v1 - it builds a cron expression from the individual schedule fields:
18+
19+ {{#literatego ./testdata/project/internal/webhook/v2/cronjob_webhook.go}}
20+
1021## ...and ` main.go `
1122
1223Similarly, our existing main file is sufficient:
You can’t perform that action at this time.
0 commit comments