@@ -261,11 +261,13 @@ func (r *OctaviaAmphoraControllerReconciler) reconcileNormal(ctx context.Context
261261 nad , err := nad .GetNADWithName (ctx , helper , networkAttachment , instance .Namespace )
262262 if err != nil {
263263 if k8s_errors .IsNotFound (err ) {
264+ // Since the net-attach-def CR should have been manually created by the user and referenced in the spec,
265+ // we treat this as a warning because it means that the service will not be able to start.
264266 Log .Info (fmt .Sprintf ("network-attachment-definition %s not found" , networkAttachment ))
265267 instance .Status .Conditions .Set (condition .FalseCondition (
266268 condition .NetworkAttachmentsReadyCondition ,
267- condition .RequestedReason ,
268- condition .SeverityInfo ,
269+ condition .ErrorReason ,
270+ condition .SeverityWarning ,
269271 condition .NetworkAttachmentsReadyWaitingMessage ,
270272 networkAttachment ))
271273 return ctrl.Result {RequeueAfter : time .Second * 10 }, nil
@@ -321,10 +323,12 @@ func (r *OctaviaAmphoraControllerReconciler) reconcileNormal(ctx context.Context
321323 )
322324 if err != nil {
323325 if k8s_errors .IsNotFound (err ) {
326+ // Since the CA cert secret should have been manually created by the user and provided in the spec,
327+ // we treat this as a warning because it means that the service will not be able to start.
324328 instance .Status .Conditions .Set (condition .FalseCondition (
325329 condition .TLSInputReadyCondition ,
326- condition .RequestedReason ,
327- condition .SeverityInfo ,
330+ condition .ErrorReason ,
331+ condition .SeverityWarning ,
328332 condition .TLSInputReadyWaitingMessage , instance .Spec .TLS .CaBundleSecretName ))
329333 return ctrl.Result {}, nil
330334 }
@@ -519,11 +523,13 @@ func (r *OctaviaAmphoraControllerReconciler) generateServiceSecrets(
519523 ospSecret , _ , err := oko_secret .GetSecret (ctx , helper , instance .Spec .Secret , instance .Namespace )
520524 if err != nil {
521525 if k8s_errors .IsNotFound (err ) {
526+ // Since the OpenStack secret should have been manually created by the user and referenced in the spec,
527+ // we treat this as a warning because it means that the service will not be able to start.
522528 Log .Info (fmt .Sprintf ("OpenStack secret %s not found" , instance .Spec .Secret ))
523529 instance .Status .Conditions .Set (condition .FalseCondition (
524530 condition .InputReadyCondition ,
525- condition .RequestedReason ,
526- condition .SeverityInfo ,
531+ condition .ErrorReason ,
532+ condition .SeverityWarning ,
527533 condition .InputReadyWaitingMessage ))
528534 return err
529535 }
@@ -540,11 +546,14 @@ func (r *OctaviaAmphoraControllerReconciler) generateServiceSecrets(
540546 transportURLSecret , _ , err := oko_secret .GetSecret (ctx , helper , instance .Spec .TransportURLSecret , instance .Namespace )
541547 if err != nil {
542548 if k8s_errors .IsNotFound (err ) {
549+ // Since the TransportURL secret should have been automatically created by the parent Octavia CR
550+ // and referenced in the spec, we treat this as a warning because it means that the service will
551+ // not be able to start.
543552 Log .Info (fmt .Sprintf ("TransportURL secret %s not found" , instance .Spec .TransportURLSecret ))
544553 instance .Status .Conditions .Set (condition .FalseCondition (
545554 condition .InputReadyCondition ,
546- condition .RequestedReason ,
547- condition .SeverityInfo ,
555+ condition .ErrorReason ,
556+ condition .SeverityWarning ,
548557 condition .InputReadyWaitingMessage ))
549558 return err
550559 }
@@ -642,10 +651,12 @@ func (r *OctaviaAmphoraControllerReconciler) generateServiceSecrets(
642651 ctx , helper , serverCAPassSecretName , instance .Namespace )
643652 if err != nil {
644653 if k8s_errors .IsNotFound (err ) {
654+ // Since the CA passphrase secret should have been manually created by the user and referenced in the spec,
655+ // we treat this as a warning because it means that the service will not be able to start.
645656 instance .Status .Conditions .Set (condition .FalseCondition (
646657 condition .InputReadyCondition ,
647- condition .RequestedReason ,
648- condition .SeverityInfo ,
658+ condition .ErrorReason ,
659+ condition .SeverityWarning ,
649660 condition .InputReadyWaitingMessage ))
650661 return fmt .Errorf ("%w: %s" , octavia .ErrOpenstackServerCAPassphraseNotFound , serverCAPassSecretName )
651662 }
0 commit comments