@@ -115,28 +115,28 @@ func (r *Reconciler) rabbitmqURLFromRabbit(ctx context.Context, ref *duckv1.KRef
115115
116116 rab := o .(* duckv1beta1.Rabbit )
117117
118- if rab .Status .Admin == nil || rab .Status .Admin .SecretReference == nil || rab .Status .Admin .ServiceReference == nil {
118+ if rab .Status .DefaultUser == nil || rab .Status .DefaultUser .SecretReference == nil || rab .Status .DefaultUser .ServiceReference == nil {
119119 return nil , fmt .Errorf ("rabbit \" %s/%s\" not ready" , ref .Namespace , ref .Name )
120120 }
121121
122- _ = rab .Status .Admin .SecretReference
122+ _ = rab .Status .DefaultUser .SecretReference
123123
124- s , err := r .kubeClientSet .CoreV1 ().Secrets (rab .Status .Admin .SecretReference .Namespace ).Get (ctx , rab .Status .Admin .SecretReference .Name , metav1.GetOptions {})
124+ s , err := r .kubeClientSet .CoreV1 ().Secrets (rab .Status .DefaultUser .SecretReference .Namespace ).Get (ctx , rab .Status .DefaultUser .SecretReference .Name , metav1.GetOptions {})
125125 if err != nil {
126126 return nil , err
127127 }
128128
129- password , ok := s .Data [rab .Status .Admin .SecretReference .Keys ["password" ]]
129+ password , ok := s .Data [rab .Status .DefaultUser .SecretReference .Keys ["password" ]]
130130 if ! ok {
131- return nil , fmt .Errorf ("rabbit Secret missing key %s" , rab .Status .Admin .SecretReference .Keys ["password" ])
131+ return nil , fmt .Errorf ("rabbit Secret missing key %s" , rab .Status .DefaultUser .SecretReference .Keys ["password" ])
132132 }
133133
134- username , ok := s .Data [rab .Status .Admin .SecretReference .Keys ["username" ]]
134+ username , ok := s .Data [rab .Status .DefaultUser .SecretReference .Keys ["username" ]]
135135 if ! ok {
136- return nil , fmt .Errorf ("rabbit Secret missing key %s" , rab .Status .Admin .SecretReference .Keys ["username" ])
136+ return nil , fmt .Errorf ("rabbit Secret missing key %s" , rab .Status .DefaultUser .SecretReference .Keys ["username" ])
137137 }
138138
139- host := network .GetServiceHostname (rab .Status .Admin .ServiceReference .Name , rab .Status .Admin .ServiceReference .Namespace )
139+ host := network .GetServiceHostname (rab .Status .DefaultUser .ServiceReference .Name , rab .Status .DefaultUser .ServiceReference .Namespace )
140140
141141 return url .Parse (fmt .Sprintf ("amqp://%s:%s@%s:%d" , username , password , host , 5672 ))
142142}
0 commit comments