Skip to content

Commit

Permalink
Fix bug in TLS secret detection
Browse files Browse the repository at this point in the history
If someone were to successfully install the application then delete the
TLSSecret, the operator would not recreate it because it detected that the
Database Secret already existed.  Instead, we should be checking the
existence of the TLS Secret.
  • Loading branch information
bdunne committed Jun 11, 2024
1 parent 9d19201 commit 818c9b0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ func HttpdDbusAPIService(cr *miqv1alpha1.ManageIQ, scheme *runtime.Scheme) (*cor
}

func ManageTlsSecret(cr *miqv1alpha1.ManageIQ, client client.Client, scheme *runtime.Scheme) (*corev1.Secret, controllerutil.MutateFn, error) {
secretKey := types.NamespacedName{Namespace: cr.ObjectMeta.Namespace, Name: cr.Spec.DatabaseSecret}
secretKey := types.NamespacedName{Namespace: cr.ObjectMeta.Namespace, Name: tlsSecretName(cr)}
secret := &corev1.Secret{}
secretErr := client.Get(context.TODO(), secretKey, secret)
var err error
Expand Down

0 comments on commit 818c9b0

Please sign in to comment.