Skip to content

Commit a4a9628

Browse files
authored
Error on a non-OCP semeru install w/o cert-manager (#505)
1 parent aa41355 commit a4a9628

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

controllers/semeru_compiler.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func (r *ReconcileWebSphereLiberty) reconcileSemeruCompiler(wlva *wlv1.WebSphere
8787
}
8888

8989
//create certmanager issuer and certificate if necessary
90-
if !r.IsOpenShift() || cmPresent {
90+
if cmPresent {
9191
err = r.GenerateCMIssuer(wlva.Namespace, OperatorShortName, "WebSphere Liberty Operator", OperatorName)
9292
if err != nil {
9393
return err, "Failed to reconcile Certificate Issuer", false
@@ -96,6 +96,8 @@ func (r *ReconcileWebSphereLiberty) reconcileSemeruCompiler(wlva *wlv1.WebSphere
9696
if err != nil {
9797
return err, "Failed to reconcile Semeru Compiler Certificate", false
9898
}
99+
} else if !r.IsOpenShift() {
100+
return fmt.Errorf("Could not detect a cert-manager installation. Ensure cert-manager is installed and running"), "", false
99101
}
100102

101103
//TLS Secret

0 commit comments

Comments
 (0)