Commit e094974
authored
Call typed defaulter for reconciled object (#677)
controller-runtime now encourages the use of a typed webhook methods
instead of using runtime.Object. This change in method signature was
causing the Default method to be missed during a reconcile, allowing
non-defaulted objects to be processed. It is now called when the
generic type matches the type being reconciled.
For example:
_ admission.Defaulter[*TestResource] = &TestResource{}
func (*TestResource) Default(ctx context.Context, obj *TestResource) error {
...
}
Signed-off-by: Scott Andrews <scott@andrews.me>1 parent 9c9ed61 commit e094974
15 files changed
Lines changed: 719 additions & 156 deletions
File tree
- internal/resources
- dies
- reconcilers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments