mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-11 13:23:09 +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.
|
||||
type ObjectStoreSpec struct {
|
||||
// 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"`
|
||||
|
||||
// RetentionPolicy is the retention policy to be used for backups
|
||||
|
||||
@ -382,6 +382,11 @@ spec:
|
||||
required:
|
||||
- destinationPath
|
||||
type: object
|
||||
x-kubernetes-validations:
|
||||
- fieldPath: .serverName
|
||||
message: use the 'serverName' plugin parameter in the Cluster resource
|
||||
reason: FieldValueForbidden
|
||||
rule: '!has(self.serverName)'
|
||||
instanceSidecarConfiguration:
|
||||
description: The configuration for the sidecar that runs in the instance
|
||||
pods
|
||||
|
||||
@ -381,6 +381,11 @@ spec:
|
||||
required:
|
||||
- destinationPath
|
||||
type: object
|
||||
x-kubernetes-validations:
|
||||
- fieldPath: .serverName
|
||||
message: use the 'serverName' plugin parameter in the Cluster resource
|
||||
reason: FieldValueForbidden
|
||||
rule: '!has(self.serverName)'
|
||||
instanceSidecarConfiguration:
|
||||
description: The configuration for the sidecar that runs in the instance
|
||||
pods
|
||||
|
||||
Loading…
Reference in New Issue
Block a user