All Projects → vmware-archive → vscode-kubeless

vmware-archive / vscode-kubeless

Licence: Apache-2.0 license
VSCode extension for Kubeless

Programming Languages

typescript
32286 projects

Slack

WARNING: Kubeless is no longer actively maintained by VMware.

VMware has made the difficult decision to stop driving this project and therefore we will no longer actively respond to issues or pull requests. If you would like to take over maintaining this project independently from VMware, please let us know so we can add a link to your forked project here.

Thank You.

VSCode extension for Kubeless

This extension is under heavy development so it is subject to change at any time.

Requirements

Installation

You can install this extension from the marketplace

Features

This plugin support several commands for interacting with Kubeless and Kubernetes. For executing them open the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)) and type:

  • Deploy Function: Deploy the current file as a Kubeless function
  • Call Function: Call the current function
  • Get Function Logs: Display the logs of the current function
  • Delete Function: Delete the current function

Configuring Function Properties

After executing one of the above command a file is created under PROJECT_WORKSPACE/.vscode/funcs.json. This file includes the properties of a function regarding a specific file. For example:

[
  {
    "id": "hello",
    "handler": "handler.hello",
    "fileName": "/home/examples/get-python/handler.py",
    "runtime": "python2.7",
    "deps": null,
    "text": "def hello():\n    return \"hello world\"\n",
    "namespace": "default",
    "events": [
      {
        "type": "http",
        "path": "/",
        "hostname": null,
        "trigger": null
      }
    ],
    "environment": {},
    "memorySize": null
  }
]

You can modify some of these parameters to change the deployment of the function:

  • ID: Function ID
  • Handler: Identifies the function exported in the file. In this example we are exposing the function hello of the file handler.py.
  • Runtime: Runtime to use for running the function.
  • Deps: Dependencies of the function. This field is automatically refreshed each time a command is executed.
  • Text: Function text. This field is automatically refreshed each time a command is executed.
  • Namespace: Kubernetes namespace in which the function should be deployed.
  • Events: Events that should trigger the function execution.
    • Type: http or trigger. If http is chosen the code will be trigger with HTTP GET/POST calls. In the case of using trigger the function will be executed when some message is published under certain topic.
    • Hostname: (Only for http type) Hostname in which the function should be deployed.
    • Path: (Only for http type) Subpath in which the function should be deployed.
    • Trigger: (Only for trigger type) Trigger topic.
  • Environment: Key/Value for Environment variables that the function should have available.
  • Memory Size: Maximum memory size to use for the function. F.e. '128Mi'
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].