Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion documentation/web/docs/user/api/_klio_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ _Appears in:_
| `clusterName` _string_ | ClusterName is the name of the PostgreSQL cluster we are connecting to | True | | MinLength: 1 <br />Required: \{\} <br /> |
| `pprof` _boolean_ | Pprof enables the pprof endpoint for performance profiling | | | Optional: \{\} <br /> |
| `mode` _[ServerMode](#servermode)_ | Mode selects the operation mode of the plugin. | True | standard | Enum: [standard read-only] <br /> |
| `containers` _[Container](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.36/#container-v1-core) array_ | Containers allows defining a list of containers that will be merged with the Klio sidecar containers.<br />This enables users to customize the sidecars with additional environment variables, volume mounts,<br />resource limits, and other container settings without polluting the PostgreSQL container environment.<br />Merge behavior:<br />- Containers are matched by name (klio-plugin, klio-wal, klio-restore)<br />- User customizations serve as the base<br />- Klio required values (name, args, CONTAINER_NAME env var) always override user values<br />- User-defined environment variables and volume mounts are preserved<br />- Template defaults are applied only for fields not set by the user or Klio | | | MaxItems: 3 <br />Optional: \{\} <br /> |
| `containers` _[Container](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.36/#container-v1-core) array_ | Containers allows defining a list of containers that will be merged with the Klio sidecar containers.<br />This enables users to customize the sidecars with additional environment variables, volume mounts,<br />resource limits, and other container settings without polluting the PostgreSQL container environment.<br />Merge behavior:<br />- Containers are matched by name (klio-plugin, klio-restore)<br />- User customizations serve as the base<br />- Klio required values (name, args, CONTAINER_NAME env var) always override user values<br />- User-defined environment variables and volume mounts are preserved<br />- Template defaults are applied only for fields not set by the user or Klio | | | MaxItems: 2 <br />Optional: \{\} <br /> |


#### PluginConfigurationStatus
Expand Down
6 changes: 3 additions & 3 deletions operator/api/v1alpha1/plugin_configuration_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@ type PluginConfigurationSpec struct {
// resource limits, and other container settings without polluting the PostgreSQL container environment.
//
// Merge behavior:
// - Containers are matched by name (klio-plugin, klio-wal, klio-restore)
// - Containers are matched by name (klio-plugin, klio-restore)
// - User customizations serve as the base
// - Klio required values (name, args, CONTAINER_NAME env var) always override user values
// - User-defined environment variables and volume mounts are preserved
// - Template defaults are applied only for fields not set by the user or Klio
//
// +optional
// +kubebuilder:validation:MaxItems=3
// +kubebuilder:validation:MaxItems=2
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:XValidation:rule="self.all(c, c.name in ['klio-plugin', 'klio-wal', 'klio-restore'])",message="container name must be one of: klio-plugin, klio-wal, klio-restore"
// +kubebuilder:validation:XValidation:rule="self.all(c, c.name in ['klio-plugin', 'klio-restore'])",message="container name must be one of: klio-plugin, klio-restore"
Containers []corev1.Container `json:"containers,omitempty"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
resource limits, and other container settings without polluting the PostgreSQL container environment.

Merge behavior:
- Containers are matched by name (klio-plugin, klio-wal, klio-restore)
- Containers are matched by name (klio-plugin, klio-restore)
- User customizations serve as the base
- Klio required values (name, args, CONTAINER_NAME env var) always override user values
- User-defined environment variables and volume mounts are preserved
Expand Down Expand Up @@ -1582,15 +1582,14 @@ spec:
required:
- name
type: object
maxItems: 3
maxItems: 2
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
x-kubernetes-validations:
- message: 'container name must be one of: klio-plugin, klio-wal,
klio-restore'
rule: self.all(c, c.name in ['klio-plugin', 'klio-wal', 'klio-restore'])
- message: 'container name must be one of: klio-plugin, klio-restore'
rule: self.all(c, c.name in ['klio-plugin', 'klio-restore'])
mode:
default: standard
description: Mode selects the operation mode of the plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ spec:
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- urn:alm:descriptor:com.tectonic.ui:advanced
- description: Advanced overrides for the Klio sidecar containers (klio-plugin,
klio-wal, klio-restore). Use at your own risk.
klio-restore). Use at your own risk.
displayName: Sidecar Container Overrides
path: containers
x-descriptors:
Expand Down
9 changes: 4 additions & 5 deletions operator/dist/chart/crds/pluginconfiguration-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
resource limits, and other container settings without polluting the PostgreSQL container environment.

Merge behavior:
- Containers are matched by name (klio-plugin, klio-wal, klio-restore)
- Containers are matched by name (klio-plugin, klio-restore)
- User customizations serve as the base
- Klio required values (name, args, CONTAINER_NAME env var) always override user values
- User-defined environment variables and volume mounts are preserved
Expand Down Expand Up @@ -1581,15 +1581,14 @@ spec:
required:
- name
type: object
maxItems: 3
maxItems: 2
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
x-kubernetes-validations:
- message: 'container name must be one of: klio-plugin, klio-wal,
klio-restore'
rule: self.all(c, c.name in ['klio-plugin', 'klio-wal', 'klio-restore'])
- message: 'container name must be one of: klio-plugin, klio-restore'
rule: self.all(c, c.name in ['klio-plugin', 'klio-restore'])
mode:
default: standard
description: Mode selects the operation mode of the plugin.
Expand Down
2 changes: 1 addition & 1 deletion operator/internal/cnpgi/lifecycle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func TestFindUserContainer(t *testing.T) {
containerName: KlioPluginContainerName,
customContainers: []corev1.Container{
{
Name: "klio-wal",
Name: "klio-restore",
Image: "other-image:latest",
},
},
Expand Down
Loading