The CronJobEnvironmentSecretVariables are being read from the cluster namespace by default: https://github.com/zalando/postgres-operator/blob/master/pkg/cluster/k8sres.go#L1205
Should it be possible to define a namespace override for this secret, to prevent secret duplication if multiple clusters to multiple namespace haven been deployed?
Proposal:
type LogicalBackup struct {
LogicalBackupCronjobEnvironmentSecret string `name:"logical_backup_cronjob_environment_secret" default:""`
LogicalBackupCronjobEnvironmentSecretNamespace string `name:"logical_backup_cronjob_environment_secret_namespace" default:""`
}
func (c *Cluster) getCronjobEnvironmentSecretVariables() ([]v1.EnvVar, error) {
// [..]
var secretNamespace string
if c.OpConfig.LogicalBackupCronjobEnvironmentSecretNamespace == "" {
secretNamespace = c.OpConfig.LogicalBackupCronjobEnvironmentSecretNamespace
} else {
secretNamespace = c.Namespace
}
secret, err := c.KubeClient.Secrets(secretNamespace).Get(
The CronJobEnvironmentSecretVariables are being read from the cluster namespace by default: https://github.com/zalando/postgres-operator/blob/master/pkg/cluster/k8sres.go#L1205
Should it be possible to define a namespace override for this secret, to prevent secret duplication if multiple clusters to multiple namespace haven been deployed?
Proposal: