Skip to content

Commit

Permalink
Merge pull request #35 from kubero-dev/fix/add-clusterissuer-when-OLM…
Browse files Browse the repository at this point in the history
…-is-selected

 Update the install function to call installCertManagerClusterissuer
  • Loading branch information
mms-gianni authored Apr 20, 2024
2 parents 882e8cc + 3b2641e commit 10e7be7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmd/kuberoCli/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -739,11 +739,11 @@ func installCertManagerSlim() {
}
certManagerSpinner.Success("Cert Manager installed")

installCertManagerClusterissuer()
installCertManagerClusterissuer("cert-manager")

}

func installCertManagerClusterissuer() {
func installCertManagerClusterissuer(namespace string) {

installer := resty.New()

Expand All @@ -766,7 +766,7 @@ func installCertManagerClusterissuer() {
return
}

_, certmanagerClusterIssuerErr := exec.Command("kubectl", "apply", "-f", "kuberoCertmanagerClusterIssuer.yaml", "-n", "cert-manager").Output()
_, certmanagerClusterIssuerErr := exec.Command("kubectl", "apply", "-f", "kuberoCertmanagerClusterIssuer.yaml", "-n", namespace).Output()
if certmanagerClusterIssuerErr != nil {
cfmt.Println("{{✗ Failed to create Certmanager Clusterissuer. Try runnig this command manually: kubectl apply -f kuberoCertmanagerClusterIssuer.yaml -n cert-manager}}::red")
return
Expand Down Expand Up @@ -805,6 +805,8 @@ func installOLMCertManager() {
log.Fatal(certManagerWaitErr)
}
certManagerSpinner.Success("Cert Manager is ready")

installCertManagerClusterissuer("default")
}

func writeCLIconfig() {
Expand Down

0 comments on commit 10e7be7

Please sign in to comment.