Skip to content

Commit e3561ef

Browse files
pooknullhors
andauthored
K8SPG-901: fix panic (#1391)
https://perconadev.atlassian.net/browse/K8SPG-901 Co-authored-by: Viacheslav Sarzhan <slava.sarzhan@percona.com>
1 parent 63566de commit e3561ef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/apis/pgv2.percona.com/v2/perconapgcluster_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ func (cr *PerconaPGCluster) EnvFromSecrets() []string {
11111111
}
11121112
}
11131113

1114-
if len(cr.Spec.Proxy.PGBouncer.EnvFrom) > 0 {
1114+
if cr.Spec.Proxy != nil && cr.Spec.Proxy.PGBouncer != nil && len(cr.Spec.Proxy.PGBouncer.EnvFrom) > 0 {
11151115
for _, envFrom := range cr.Spec.Proxy.PGBouncer.EnvFrom {
11161116
if envFrom.SecretRef == nil {
11171117
continue

0 commit comments

Comments
 (0)