Skip to content

adietish/intellij-knative

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IntelliJ plugin for Knative & Serverless Functions

Build status Validate against IJ versions JetBrains plugins JetBrains plugins

Overview

A JetBrains IntelliJ plugin for interacting with Knative & Serverless Functions. This plugin is currently in Preview Mode.

New and Noteworthy

The minimum JetBrains IDEs version supported by the plugin has been increased to 2021.1 The plugin works by using kn CLI 1.7.0 and func CLI 1.8.0

On-Cluster Build

On-Cluster Build allows building (and deploying) the source code stored in a git repository within the cluster by leveraging Tekton. Now it is possible to start an on-cluster build from the IDE. The action is enabled if and only if Knative and Tekton are both installed on the cluster. The plugin interacts with the JetBrains git plugin to guide the user through the entire process.

Manage Function repos

The plugin provides a custom dialog to add and remove new Function repositories. They can be used to create a new function using a template stored in them.

Getting Started Page

A getting started page has been added to explain the different features the plugin offers and shows how to use them

Previous releases

1.2.0

New ToolWindow for build/deploy/run actions

  • The plugin now provides a custom ToolWindow to showcase the command execution
  • This currently supports the execution of the Run, Build and Deploy Function command
  • It also supports History View to visualise the old command logs
  • Currently, users can only view the last 10 logs of the associated Function command

Stop function execution and limit running sessions

It is possible to stop a running function execution directly from the IDE UI.

Smarter workflow execution

The plugin skips building a function if it has not been updated since last build.

Inform user if the function is not running when invoking it

The user is prompted to run the function first before invoking it, if the function is not running. This improves the overall experience during invoke calls.

1.1.0

Invoke fuction

It is possible to invoke a local/remote function directly from the IDE

Create new function enabled in all JetBrains IDE

The New Function action have been extended to all JetBrains IDEs

Discovering existing CLIs and downloading missing ones have been improved

The CLIs needed for the plugin to work are now downloaded on background without freezing the IDE. It has also been enhanced the way already-installed CLIs are discovered.

Known issues discovered by using func CLI 0.23.1

To overcome a visualization issue during the execution of the deploy command, this is run with the -v verbose flag #974

1.0.0

The new release supports Knative Functions, enabling the development and deployment of Functions directly from IntelliJ.

Create new function

The native IntelliJ New Project/Module actions have been extended to enable the creation of new functions.

New Functions View

A simplified view for Functions allows to easily build/run/configure/deploy your functions in few clicks. It shows if the function has been deployed and available on cluster or only opened locally or both.

Build/Run/Deploy Function

It is possible to build, deploy and run locally a function from the IDE. Textboxes and inputs will help through the entire workflow.

Update Function Configuration

A function can be updated manually by changing the func.yaml file through the IDE editor. The plugin also provides add/remove actions to configure environment variables and volumes in a guided way.

Open in browser

Deployed Function can be opened in browser from the IDE.

Undeploy Function

A deployed function can be undeployed.

0.1.0

This first release only support knative serving.

Create new service

The plugin supports two ways to create a new service. A simplified view with textboxes/inputs to be filled in and an editor view for advanced settings.

Edit from the editor

Services can be opened in the editor and edit it from there. It offers code assist and syntax validation based on JSON schemas.

Delete multiple elements

It is possible to delete several different elements, even if they are of different nature (ie services and revisions).

Read only editor

Revisions are opened as read only in the editor.

Shortcuts

Basic commands such as delete and refresh inherit and make use of shortcuts from IJ IDE.

Open in browser

Services can be opened in browser from the IDE.

Running Kubernetes and OpenShift Clusters to use with plugin

To use the plugin, developers can deploy Knative into a Red Hat CodeReady Containers or Minikube instance.

The plugin also supports OpenShift running on Azure, AWS.

Knative Tutorial

To get started with Knative and learn how to easily deploy containers and manage events you can look at the official documentation:

Commands and features

Development of the Knative Plugin is largely following development of the kn CLI and func CLI as well as Knative serving and Knative eventing which are both under active development and potentially subject to drastic changes.

Below you can find a list of the current actions supported by this plugin to interact with Knative. These are accessible via the context menu when right-clicking an item in the tree.

Actions available

Knative
  • New Service - Open a wizard with two tabs (simplified and editor) to create a new knative service (only available for Service).
  • Open in Editor - Open the existing service/revision configuration in an editor.
  • Delete - Delete the selected services/revisions.
  • Refresh - Refresh the selected item
  • Open in Browser - Open a browser using the service URL (only available for Service)
Knative Function
  • New Function - Extend the native IntelliJ new Project/Module action to enable the creation of a new knative function.
  • Build - Build a function
  • Run - Run a function locally. This action is disabled if the function has not been built.
  • Deploy - Build and deploy a function to a cluster. The image built will be pushed to a registry. If the registry is private it will ask to authenticate
  • Open in Browser - Open a browser using the function URL
  • Add/Remove Configuration - Allow to update function configuration in a guided way (it supports environment variables and volumes)
  • Undeploy - Undeploy a function which has been deployed previously
Saving Process

The plugin takes advantage of the normal saving workflow of the IntelliJ IDE. When you finish to edit your configuration and want to push the changes to the cluster, click on Save All (CTRL + S). A prompt will be shown asking if you want to push the changes.

Dependencies

CLI Tools

This plugin uses two CLI tools to interact with Knative:

  • Knative CLI - kn
  • Func CLI - func

The plugin will detect these dependencies and prompt the user to install if they are missing or have not supported version - choose Download & Install when you see an notification for the missing tool.

NOTE: This plugin is in Preview mode. The plugin support for Knative is strictly experimental - assumptions may break, commands and behavior may change!

Release notes

See the change log.

Contributing

This is an open source project open to anyone. This project welcomes contributions and suggestions!

For information on getting started, refer to the CONTRIBUTING instructions.

Feedback & Questions

If you discover an issue please file a bug and we will fix it as soon as possible.

License

EPL 2.0, See LICENSE for more information.

Packages

No packages published

Languages

  • Java 97.1%
  • Go 2.9%