fix operatorconfigurations CRD: render sidecars as array (#3160)
configuration.sidecars was annotated with kubebuilder:validation:Type=object while SidecarContainers is a []v1.Container, so the generated schema rejected every list value and global sidecars could not be configured at all. Drop the hand-written Schemaless/Type=object markers and let controller-gen derive the schema from the Go type, the same way spec.initContainers is already handled in the Postgresql CRD. The field now renders as type: array with a full Container schema for its items. Fixes #3159 Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
bd8e361f65
commit
b43c7be1d0
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -430,9 +430,7 @@ type OperatorConfigurationData struct {
|
||||||
// +kubebuilder:default=true
|
// +kubebuilder:default=true
|
||||||
ShmVolume *bool `json:"enable_shm_volume,omitempty"`
|
ShmVolume *bool `json:"enable_shm_volume,omitempty"`
|
||||||
SidecarImages map[string]string `json:"sidecar_docker_images,omitempty"` // deprecated in favour of SidecarContainers
|
SidecarImages map[string]string `json:"sidecar_docker_images,omitempty"` // deprecated in favour of SidecarContainers
|
||||||
// +kubebuilder:validation:XPreserveUnknownFields
|
// +nullable
|
||||||
// +kubebuilder:validation:Type=object
|
|
||||||
// +kubebuilder:validation:Schemaless
|
|
||||||
SidecarContainers []v1.Container `json:"sidecars,omitempty"`
|
SidecarContainers []v1.Container `json:"sidecars,omitempty"`
|
||||||
// +optional
|
// +optional
|
||||||
PostgresUsersConfiguration PostgresUsersConfiguration `json:"users"`
|
PostgresUsersConfiguration PostgresUsersConfiguration `json:"users"`
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue