You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "treblereel (via GitHub)" <gi...@apache.org> on 2024/06/24 04:11:14 UTC

[PR] kn-plugin-workflow should verify if the cluster has Knative installed [incubator-kie-tools]

treblereel opened a new pull request, #2446:
URL: https://github.com/apache/incubator-kie-tools/pull/2446

   issue: https://github.com/apache/incubator-kie-issues/issues/1337


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kn-plugin-workflow should verify if the cluster has Knative installed [incubator-kie-tools]

Posted by "treblereel (via GitHub)" <gi...@apache.org>.
treblereel commented on PR #2446:
URL: https://github.com/apache/incubator-kie-tools/pull/2446#issuecomment-2185573089

   @ricardozanini a few notes:
   * As I understand, we should check if the sonataflow operator CRD is installed (I used to ), this is what you meant under Knative installed, right?
   * looks like we didn't test the plugin against a real k8s cluster, so no tests (but I'm not sure if we need them)
   * Under the hood, it still uses direct kubectl calls. It will be refactored as part of the migration to the go-cli issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#1337: kn-plugin-workflow should verify if the cluster has Knative installed [incubator-kie-tools]

Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on code in PR #2446:
URL: https://github.com/apache/incubator-kie-tools/pull/2446#discussion_r1706107159


##########
packages/kn-plugin-workflow/pkg/command/deploy.go:
##########
@@ -188,6 +188,14 @@ func runDeployCmdConfig(cmd *cobra.Command) (cfg DeployUndeployCmdConfig, err er
 		return cfg, fmt.Errorf("❌ ERROR: failed to get default dashboards files folder: %w", err)
 	}
 
+	// check if sonataflow operator CRDs are installed
+	crds := []string{"sonataflowbuilds.sonataflow.org", "sonataflowclusterplatforms.sonataflow.org", "sonataflowplatforms.sonataflow.org", "sonataflows.sonataflow.org"}
+	for _, crd := range crds {
+		if !common.CheckKubectlCrdExists(crd) {
+			return cfg, fmt.Errorf("❌ ERROR: the required CRDs are not installed.. Install the SonataFlow Operator CRD first")

Review Comment:
   nitpick: you may move these strings to a const since you might have to use them again in the future.



##########
packages/kn-plugin-workflow/pkg/command/deploy.go:
##########
@@ -188,6 +188,14 @@ func runDeployCmdConfig(cmd *cobra.Command) (cfg DeployUndeployCmdConfig, err er
 		return cfg, fmt.Errorf("❌ ERROR: failed to get default dashboards files folder: %w", err)
 	}
 
+	// check if sonataflow operator CRDs are installed
+	crds := []string{"sonataflowbuilds.sonataflow.org", "sonataflowclusterplatforms.sonataflow.org", "sonataflowplatforms.sonataflow.org", "sonataflows.sonataflow.org"}
+	for _, crd := range crds {
+		if !common.CheckKubectlCrdExists(crd) {
+			return cfg, fmt.Errorf("❌ ERROR: the required CRDs are not installed.. Install the SonataFlow Operator CRD first")

Review Comment:
   ```suggestion
   			return cfg, fmt.Errorf("❌ ERROR: the required CRDs are not installed. Install the SonataFlow Operator CRD first")
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#1337: kn-plugin-workflow should verify if the cluster has SonataFlow Operator installed [incubator-kie-tools]

Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini merged PR #2446:
URL: https://github.com/apache/incubator-kie-tools/pull/2446


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org