mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-11 21:23:12 +01:00
feat: forbid usage of .spec.configuration.serverName in ObjectStore (#336)
Closes #334 Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
This commit is contained in:
parent
c59043a934
commit
3420f43073
@ -38,6 +38,7 @@ type InstanceSidecarConfiguration struct {
|
|||||||
// ObjectStoreSpec defines the desired state of ObjectStore.
|
// ObjectStoreSpec defines the desired state of ObjectStore.
|
||||||
type ObjectStoreSpec struct {
|
type ObjectStoreSpec struct {
|
||||||
// The configuration for the barman-cloud tool suite
|
// The configuration for the barman-cloud tool suite
|
||||||
|
// +kubebuilder:validation:XValidation:rule="!has(self.serverName)",fieldPath=".serverName",reason="FieldValueForbidden",message="use the 'serverName' plugin parameter in the Cluster resource"
|
||||||
Configuration barmanapi.BarmanObjectStoreConfiguration `json:"configuration"`
|
Configuration barmanapi.BarmanObjectStoreConfiguration `json:"configuration"`
|
||||||
|
|
||||||
// RetentionPolicy is the retention policy to be used for backups
|
// RetentionPolicy is the retention policy to be used for backups
|
||||||
|
|||||||
@ -382,6 +382,11 @@ spec:
|
|||||||
required:
|
required:
|
||||||
- destinationPath
|
- destinationPath
|
||||||
type: object
|
type: object
|
||||||
|
x-kubernetes-validations:
|
||||||
|
- fieldPath: .serverName
|
||||||
|
message: use the 'serverName' plugin parameter in the Cluster resource
|
||||||
|
reason: FieldValueForbidden
|
||||||
|
rule: '!has(self.serverName)'
|
||||||
instanceSidecarConfiguration:
|
instanceSidecarConfiguration:
|
||||||
description: The configuration for the sidecar that runs in the instance
|
description: The configuration for the sidecar that runs in the instance
|
||||||
pods
|
pods
|
||||||
|
|||||||
@ -381,6 +381,11 @@ spec:
|
|||||||
required:
|
required:
|
||||||
- destinationPath
|
- destinationPath
|
||||||
type: object
|
type: object
|
||||||
|
x-kubernetes-validations:
|
||||||
|
- fieldPath: .serverName
|
||||||
|
message: use the 'serverName' plugin parameter in the Cluster resource
|
||||||
|
reason: FieldValueForbidden
|
||||||
|
rule: '!has(self.serverName)'
|
||||||
instanceSidecarConfiguration:
|
instanceSidecarConfiguration:
|
||||||
description: The configuration for the sidecar that runs in the instance
|
description: The configuration for the sidecar that runs in the instance
|
||||||
pods
|
pods
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user