This allows us to drop direct yaml.Unmarshal invocation and replace it
with proper kuberc.LoadPreference invocations which rely on our
conversion mechanisms.
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
Kubernetes-commit: 2467adee59acd3a7575fd771a77a6ef25df05b7b
Allow both `Name` and `Command` when the values are identical, but not
when they differ.
Additionally:
- Add unit test verifying the above
- Add `omitempty` json tag to `Name` and `Command` fields in `AllowlistEntry` struct
- Run openapi codegen
- Remove year from boilerplate comments
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
Kubernetes-commit: e3642120630421d3d0756908fa4661a7d13c3aa4
* Add test to ensure error when both `name` and `command` are supplied
* Add test to ensure autoconversion of `name` to `command`
* Change the rest of the `name` fields to `command` since `name` is
deprecated
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
Kubernetes-commit: 8203f2b53f6070bf16e21941033b64c15c24b23b
Remove reference to internal types in kuberc types
* Remove unserialized types from public APIs
Also remove defaulting
* Don't do conversion gen for plugin policy types
Because the plugin policy types are explicitly allowed to be empty, they
should not affect conversion. The autogenerated conversion functions for
the `Preference` type will leave those fields empty.
* Remove defaulting tests
Comments and simplifications (h/t jordan liggitt)
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
Kubernetes-commit: fab280950dabfefabe6a8578b7a76372a9b21874