From 9c4220bc637eb19b57e23e944eeb57f079c7b716 Mon Sep 17 00:00:00 2001 From: svetychkina Date: Fri, 10 Jul 2026 13:00:35 +0500 Subject: [PATCH 1/2] fix: [CPCAP-9492] change defaultmode to 0420 --- operator/pkg/deployment/backup.go | 8 ++++---- operator/pkg/deployment/monitoring.go | 6 +++--- operator/pkg/reconciler/backup_daemon.go | 4 ++-- .../pkg/replicationcontroller/replication_controller.go | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/operator/pkg/deployment/backup.go b/operator/pkg/deployment/backup.go index 2f7dd1be..438ba407 100644 --- a/operator/pkg/deployment/backup.go +++ b/operator/pkg/deployment/backup.go @@ -79,7 +79,7 @@ func NewBackupDaemonDeployment(backupDaemon *netcrackerv1.BackupDaemon, pgCluste VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: "postgres-credentials", - DefaultMode: ptr.To[int32](0400), + DefaultMode: ptr.To[int32](0420), }, }, }, @@ -88,7 +88,7 @@ func NewBackupDaemonDeployment(backupDaemon *netcrackerv1.BackupDaemon, pgCluste VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: "replicator-credentials", - DefaultMode: ptr.To[int32](0400), + DefaultMode: ptr.To[int32](0420), }, }, }, @@ -305,7 +305,7 @@ func NewBackupDaemonDeployment(backupDaemon *netcrackerv1.BackupDaemon, pgCluste VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: GetRootSecretName(pgClusterName), - DefaultMode: ptr.To[int32](0400), + DefaultMode: ptr.To[int32](0420), }, }, }, @@ -314,7 +314,7 @@ func NewBackupDaemonDeployment(backupDaemon *netcrackerv1.BackupDaemon, pgCluste VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: "replicator-credentials", - DefaultMode: ptr.To[int32](0400), + DefaultMode: ptr.To[int32](0420), }, }, }, diff --git a/operator/pkg/deployment/monitoring.go b/operator/pkg/deployment/monitoring.go index 39c84199..7cf2692b 100644 --- a/operator/pkg/deployment/monitoring.go +++ b/operator/pkg/deployment/monitoring.go @@ -82,7 +82,7 @@ func NewMonitoringDeployment(metricCollector *netcrackerv1.MetricCollector, pgcl VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: MetricCollectorUserCredentials, - DefaultMode: ptr.To[int32](0400), + DefaultMode: ptr.To[int32](0420), }, }, }, @@ -91,7 +91,7 @@ func NewMonitoringDeployment(metricCollector *netcrackerv1.MetricCollector, pgcl VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: influxDbAdminCredentials, - DefaultMode: ptr.To[int32](0400), + DefaultMode: ptr.To[int32](0420), }, }, }, @@ -100,7 +100,7 @@ func NewMonitoringDeployment(metricCollector *netcrackerv1.MetricCollector, pgcl VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: "postgres-credentials", - DefaultMode: ptr.To[int32](0400), + DefaultMode: ptr.To[int32](0420), }, }, }, diff --git a/operator/pkg/reconciler/backup_daemon.go b/operator/pkg/reconciler/backup_daemon.go index 1a5c43ac..43c7cde6 100644 --- a/operator/pkg/reconciler/backup_daemon.go +++ b/operator/pkg/reconciler/backup_daemon.go @@ -174,7 +174,7 @@ func (r *BackupDaemonReconciler) Reconcile() error { VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: awsCredentialsSecretName, - DefaultMode: ptr.To[int32](0400), + DefaultMode: ptr.To[int32](0420), }, }, }) @@ -205,7 +205,7 @@ func (r *BackupDaemonReconciler) Reconcile() error { VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: s3StorageCredentialsSecretName, - DefaultMode: ptr.To[int32](0400), + DefaultMode: ptr.To[int32](0420), }, }, }) diff --git a/operator/pkg/replicationcontroller/replication_controller.go b/operator/pkg/replicationcontroller/replication_controller.go index d4f227a1..bba33ade 100644 --- a/operator/pkg/replicationcontroller/replication_controller.go +++ b/operator/pkg/replicationcontroller/replication_controller.go @@ -64,7 +64,7 @@ func NewRCDeployment(cr v1.PatroniServices, sa, clusterName string, pgPort int) VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: "postgres-credentials", - DefaultMode: ptr.To[int32](0400), + DefaultMode: ptr.To[int32](0420), }, }, }, @@ -73,7 +73,7 @@ func NewRCDeployment(cr v1.PatroniServices, sa, clusterName string, pgPort int) VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: "logical-replication-controller-creds", - DefaultMode: ptr.To[int32](0400), + DefaultMode: ptr.To[int32](0420), }, }, }, From 5b28c252df61d0bad96a962a1427121baae6a2d7 Mon Sep 17 00:00:00 2001 From: svetychkina Date: Fri, 10 Jul 2026 13:33:51 +0500 Subject: [PATCH 2/2] fix: [CPCAP-9492] decimal values --- operator/pkg/deployment/backup.go | 8 ++++---- operator/pkg/deployment/monitoring.go | 6 +++--- operator/pkg/reconciler/backup_daemon.go | 4 ++-- .../pkg/replicationcontroller/replication_controller.go | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/operator/pkg/deployment/backup.go b/operator/pkg/deployment/backup.go index 438ba407..a122b899 100644 --- a/operator/pkg/deployment/backup.go +++ b/operator/pkg/deployment/backup.go @@ -79,7 +79,7 @@ func NewBackupDaemonDeployment(backupDaemon *netcrackerv1.BackupDaemon, pgCluste VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: "postgres-credentials", - DefaultMode: ptr.To[int32](0420), + DefaultMode: ptr.To[int32](420), }, }, }, @@ -88,7 +88,7 @@ func NewBackupDaemonDeployment(backupDaemon *netcrackerv1.BackupDaemon, pgCluste VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: "replicator-credentials", - DefaultMode: ptr.To[int32](0420), + DefaultMode: ptr.To[int32](420), }, }, }, @@ -305,7 +305,7 @@ func NewBackupDaemonDeployment(backupDaemon *netcrackerv1.BackupDaemon, pgCluste VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: GetRootSecretName(pgClusterName), - DefaultMode: ptr.To[int32](0420), + DefaultMode: ptr.To[int32](420), }, }, }, @@ -314,7 +314,7 @@ func NewBackupDaemonDeployment(backupDaemon *netcrackerv1.BackupDaemon, pgCluste VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: "replicator-credentials", - DefaultMode: ptr.To[int32](0420), + DefaultMode: ptr.To[int32](420), }, }, }, diff --git a/operator/pkg/deployment/monitoring.go b/operator/pkg/deployment/monitoring.go index 7cf2692b..8622e959 100644 --- a/operator/pkg/deployment/monitoring.go +++ b/operator/pkg/deployment/monitoring.go @@ -82,7 +82,7 @@ func NewMonitoringDeployment(metricCollector *netcrackerv1.MetricCollector, pgcl VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: MetricCollectorUserCredentials, - DefaultMode: ptr.To[int32](0420), + DefaultMode: ptr.To[int32](420), }, }, }, @@ -91,7 +91,7 @@ func NewMonitoringDeployment(metricCollector *netcrackerv1.MetricCollector, pgcl VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: influxDbAdminCredentials, - DefaultMode: ptr.To[int32](0420), + DefaultMode: ptr.To[int32](420), }, }, }, @@ -100,7 +100,7 @@ func NewMonitoringDeployment(metricCollector *netcrackerv1.MetricCollector, pgcl VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: "postgres-credentials", - DefaultMode: ptr.To[int32](0420), + DefaultMode: ptr.To[int32](420), }, }, }, diff --git a/operator/pkg/reconciler/backup_daemon.go b/operator/pkg/reconciler/backup_daemon.go index 43c7cde6..1603f3be 100644 --- a/operator/pkg/reconciler/backup_daemon.go +++ b/operator/pkg/reconciler/backup_daemon.go @@ -174,7 +174,7 @@ func (r *BackupDaemonReconciler) Reconcile() error { VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: awsCredentialsSecretName, - DefaultMode: ptr.To[int32](0420), + DefaultMode: ptr.To[int32](420), }, }, }) @@ -205,7 +205,7 @@ func (r *BackupDaemonReconciler) Reconcile() error { VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: s3StorageCredentialsSecretName, - DefaultMode: ptr.To[int32](0420), + DefaultMode: ptr.To[int32](420), }, }, }) diff --git a/operator/pkg/replicationcontroller/replication_controller.go b/operator/pkg/replicationcontroller/replication_controller.go index bba33ade..cfbae6a7 100644 --- a/operator/pkg/replicationcontroller/replication_controller.go +++ b/operator/pkg/replicationcontroller/replication_controller.go @@ -64,7 +64,7 @@ func NewRCDeployment(cr v1.PatroniServices, sa, clusterName string, pgPort int) VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: "postgres-credentials", - DefaultMode: ptr.To[int32](0420), + DefaultMode: ptr.To[int32](420), }, }, }, @@ -73,7 +73,7 @@ func NewRCDeployment(cr v1.PatroniServices, sa, clusterName string, pgPort int) VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ SecretName: "logical-replication-controller-creds", - DefaultMode: ptr.To[int32](0420), + DefaultMode: ptr.To[int32](420), }, }, },