@@ -215,10 +215,12 @@ func (r *SwiftProxyReconciler) Reconcile(ctx context.Context, req ctrl.Request)
215215 )
216216 if err != nil {
217217 if apierrors .IsNotFound (err ) {
218+ // Since the CA cert secret should have been manually created by the user and provided in the spec,
219+ // we treat this as a warning because it means that the service will not be able to start.
218220 instance .Status .Conditions .Set (condition .FalseCondition (
219221 condition .TLSInputReadyCondition ,
220- condition .RequestedReason ,
221- condition .SeverityInfo ,
222+ condition .ErrorReason ,
223+ condition .SeverityWarning ,
222224 condition .TLSInputReadyWaitingMessage , instance .Spec .TLS .CaBundleSecretName ))
223225 return ctrl.Result {}, nil
224226 }
@@ -522,10 +524,12 @@ func (r *SwiftProxyReconciler) Reconcile(ctx context.Context, req ctrl.Request)
522524 secretRef , err = swiftproxy .GetBarbicanSecret (instance , helper , keystonePublicURL , password )
523525 if err != nil {
524526 if apierrors .IsNotFound (err ) {
527+ // Since the Barbican secret is required for encryption, we treat this as a warning
528+ // because it means that the service will not be able to start.
525529 instance .Status .Conditions .Set (condition .FalseCondition (
526530 condition .InputReadyCondition ,
527- condition .RequestedReason ,
528- condition .SeverityInfo ,
531+ condition .ErrorReason ,
532+ condition .SeverityWarning ,
529533 condition .InputReadyWaitingMessage ))
530534 Log .Error (err , "Failed to get secretRef from Barbican" )
531535 return ctrl.Result {RequeueAfter : time .Duration (10 ) * time .Second }, nil
@@ -552,11 +556,16 @@ func (r *SwiftProxyReconciler) Reconcile(ctx context.Context, req ctrl.Request)
552556 memcached , err := memcachedv1 .GetMemcachedByName (ctx , helper , instance .Spec .MemcachedInstance , instance .Namespace )
553557 if err != nil {
554558 if apierrors .IsNotFound (err ) {
559+ // Memcached should be automatically created by the encompassing OpenStackControlPlane,
560+ // but we don't propagate its name into the "memcachedInstance" field of other sub-resources,
561+ // so if it is missing at this point, it *could* be because there's a mismatch between the
562+ // name of the Memcached CR and the name of the Memcached instance referenced by this CR.
563+ // Since that situation would block further reconciliation, we treat it as a warning.
555564 Log .Info (fmt .Sprintf ("memcached %s not found" , instance .Spec .MemcachedInstance ))
556565 instance .Status .Conditions .Set (condition .FalseCondition (
557566 condition .MemcachedReadyCondition ,
558- condition .RequestedReason ,
559- condition .SeverityInfo ,
567+ condition .ErrorReason ,
568+ condition .SeverityWarning ,
560569 condition .MemcachedReadyWaitingMessage ))
561570 return ctrl.Result {RequeueAfter : 10 * time .Second }, nil
562571 }
@@ -612,10 +621,12 @@ func (r *SwiftProxyReconciler) Reconcile(ctx context.Context, req ctrl.Request)
612621 nad , err := nad .GetNADWithName (ctx , helper , netAtt , instance .Namespace )
613622 if err != nil {
614623 if apierrors .IsNotFound (err ) {
624+ // Since the net-attach-def CR should have been manually created by the user and referenced in the spec,
625+ // we treat this as a warning because it means that the service will not be able to start.
615626 instance .Status .Conditions .Set (condition .FalseCondition (
616627 condition .NetworkAttachmentsReadyCondition ,
617- condition .RequestedReason ,
618- condition .SeverityInfo ,
628+ condition .ErrorReason ,
629+ condition .SeverityWarning ,
619630 condition .NetworkAttachmentsReadyWaitingMessage ,
620631 netAtt ))
621632 Log .Error (err , "network-attachment-definition not found" )
0 commit comments