astefanutti commented on PR #4156:
URL: https://github.com/apache/camel-k/pull/4156#issuecomment-1490031258
It seems, for a reason that is yet to be identified, with `v1` version, the
`object` type validation is stricter.
If the `type: object` definitions are removed, and only
`x-kubernetes-preserve-unknown-fields` is left, it works, that is equivalent to
any types, e.g.:
```yaml
properties:
additionalProperties:
properties:
default:
description: default is a default value for undefined object
fields.
# type: object
x-kubernetes-preserve-unknown-fields: true
deprecated:
type: boolean
description:
type: string
enum:
items:
description: 'JSON represents any valid JSON value. These
types are supported: bool, int64, float64, string, []interface{},
map[string]interface{} and nil.'
# type: object
x-kubernetes-preserve-unknown-fields: true
type: array
example:
description: 'JSON represents any valid JSON value. These
types are supported: bool, int64, float64, string, []interface{},
map[string]interface{} and nil.'
# type: object
x-kubernetes-preserve-unknown-fields: true
```
Interestingly, that was the intent of #1914, with using the
`+kubebuilder:validation:Type=""` marker on those fields.
Something added those `type: object` lines afterwards, maybe an upgrade of
kubebuilder?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]