Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5a17aff
fix(scenarios): Fix the regex that locates variables to override (#202)
vmarcella Jun 13, 2024
b413c82
feat(test): New UI implementation for `ie test` & refactor various pa…
vmarcella Jul 2, 2024
787b2d0
fix(pipeline): Specify the environment ie is executing in when runnin…
vmarcella Jul 5, 2024
6b03383
fix(pipeline): Update Makefile to specify environment correctly (#206)
vmarcella Jul 5, 2024
94b2370
fix(scenario): Allow for markdown files to not specify h1 headers (#208)
vmarcella Jul 18, 2024
ad12a02
fix(help): Update the documentation for global flags (#203)
vmarcella Jul 23, 2024
cc3509a
[add] resource group to resource list (#163)
rguptar Jul 24, 2024
50faf1e
fix(interactive): Include resource group URIs in the status JSON for …
vmarcella Jul 30, 2024
dfc2bb5
feat(test): Allow users to override variables defined in documents vi…
vmarcella Jul 30, 2024
7bfe957
fix(test): Add messaging for communicating the resource group being d…
vmarcella Jul 30, 2024
2080d2e
Update install_docs_from_release.sh
naman-msft Aug 1, 2024
aa14a32
Update install_docs_from_release.sh
naman-msft Aug 1, 2024
091437a
Update install_docs_from_release.sh
naman-msft Aug 1, 2024
9a22d5e
feat(test): Add test reports that can be generated when executing mar…
vmarcella Aug 5, 2024
b84483d
fix(test): Fix test mode to correctly exit when it encounters an erro…
vmarcella Aug 8, 2024
8f9d181
Add CLI output to the azure status (#219)
vmarcella Aug 21, 2024
bf293bf
feat(interactive): New inputs (#221)
vmarcella Aug 30, 2024
ac05fec
Update `ie interactive` to overwrite an executed document with the en…
vmarcella Oct 21, 2024
a09e92b
Fix configured markdown to be set before interactive commands are exe…
vmarcella Oct 22, 2024
fe2bb37
Add `ie version` command (#238)
vmarcella Nov 5, 2024
a245306
Tweaks to the UI for `ie test` (#239)
vmarcella Nov 5, 2024
ba81764
Fix documentation for `--environment` flag. (#241)
vmarcella Nov 9, 2024
bcd6ccc
Automated testing for exec docs using IE (#242)
naman-msft Nov 18, 2024
e39e936
changed ie execute to ie test in the exec docs testing action (#243)
naman-msft Nov 26, 2024
8ce3ba4
Add KubeRay example
rgardler-msft Jan 10, 2025
2190d4a
[README] Escape vs break comment syntax (#207)
asw101 Jan 10, 2025
2176b6d
Improve intro section of README.md (#246)
rgardler-msft Jan 10, 2025
935d982
Docs (#248)
rgardler-msft Jan 11, 2025
478feab
Removing demo/backup code (#253)
fede2cr Mar 19, 2025
30d666e
Create scorecard.yml (#254)
fede2cr Mar 19, 2025
7fdda8a
Very simple headlamp plugin, executes ie on a single document. No UI,…
rgardler-msft May 28, 2025
4ec746a
s/whitelist/allowlist
rgardler-msft May 29, 2025
aa86c6c
Add a README for the sandbox which includes concise instructions on h…
rgardler-msft May 30, 2025
bc470bc
Merge remote-tracking branch 'upstream/main' into ie-in-headlamp
rgardler-msft Jun 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions sandbox/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Sandbox

The `sandbox` directory is dedicated to experimental code, prototypes, and early-stage integrations for the Innovation Engine project. It is intended as a safe space for trying out new ideas and features before they are considered for inclusion in the main codebase. In particular it includes experiments that focus on integration of Innovation Engine with Headlamp, a UI for Kubernetes.

## What is Headlamp?

[Headlamp](https://headlamp.dev/) is a modern, extensible Kubernetes UI that allows users to manage and visualize their Kubernetes clusters. It supports a plugin system, enabling developers to extend its functionality with custom features and integrations.

### Running Headlamp

A complete copy of Headlamp Desktop application is included in the sandbox directory. This is included for convenience and to ensure that we are developing against a consistent version of Headlamp. However, you should be able to run these plugins in any recent version of Headlamp (if not please file a bug).

#### Install Docker

1. [Install the binaries](https://docs.docker.com/engine/install/ubuntu/)
2. Configure the docker user:
```bash
sudo groupadd docker
sudo usermod -aG docker $(whoami)
newgrp docker
```

#### Installing Headlamp

1. Download the [latest Headlamp release](https://github.com/kubernetes-sigs/headlamp/releases) as a tarball
2. Install from the tarball
```bash
tar xvzf ./Headlamp-0.30.0-linux-x64.tar.gz
```
3. If using Linux prepare the executable:
```bash
cd Headlamp-0.30.0-linux-x64
sudo chown root headlamp
sudo chmod 4755 headlamp
```
4. Run Headlamp
```
./headlamp
```

#### Install Minikube plugin for local K8s

1. Locate Minikube in the Headlamp plugin catalog
2. Click install
3. Restart Headlamp
4. Create a minikube cluster in Headlamp `Home -> Load Cluster -> Minikube Add`

## Innovation Engine Headlamp Plugin

The `innovation-engine-headlamp` subfolder contains a Headlamp plugin that integrates the Innovation Engine with the Headlamp UI. This plugin provides:

- A sidebar entry for accessing Innovation Engine features directly from Headlamp.
- A "Getting Started" page to help users begin using the Innovation Engine.
- A shell execution interface for running allowlisted commands (such as `ie execute ...`) and viewing their output within the Headlamp UI.

For more details on the plugin's features and how to run it, see the [README](innovation-engine-headlamp/README.md).
2 changes: 2 additions & 0 deletions sandbox/innovation-engine-headlamp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
ie.log
82 changes: 82 additions & 0 deletions sandbox/innovation-engine-headlamp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# innovation-engine

[Headlamp](https://headlamp.dev/) is an extensible Kubernetes UI that enables users to manage and visualize their clusters through a modern, customizable interface. It supports plugins to extend its capabilities with custom UIs and backend integrations.

The **innovation-engine** plugin integrates the Innovation Engine (IE) CLI directly into Headlamp. This allows users to run IE commands from within the Headlamp dashboard, providing a seamless workflow for interacting with Innovation Engine features alongside cluster management tasks. The plugin includes a secure backend API that only allows allowlisted commands (by default, the IE CLI), ensuring safe execution of shell commands from the browser UI.

----------------------------------------------------------------------------
----------------------------------------------------------------------------
DO NOT USE IN PRODUCTION - see note on security in the Developer Notes below
----------------------------------------------------------------------------
----------------------------------------------------------------------------

## Use

### Prerequisites

- Node.js (for the backend service)
- Go (for building the Innovation Engine CLI)
- Headlamp with this plugin installed

### Installing Backend Dependencies

Before starting the plugin, you must install the required dependencies:

```bash
pushd sandbox/innovation-engine-headlamp/
npm install
popd
```

If you see an error about a missing module such as 'express', ensure you have run the above command in the `sandbox/innovation-engine-headlamp` directory before starting the backend service.

### Building the Innovation Engine CLI

From the root of the Innovation Engine repository:

1. Build the CLI:
```bash
make build-ie
```
The resulting binary will be at `bin/ie` in the repository root.

### Running the Shell Exec Backend and the Headlamp Plugin

The backend service provides a secure API for executing allowlisted shell commands—by default, only the Innovation Engine CLI (`ie`)—from the Headlamp UI. This allows users to interact with Innovation Engine features directly in the browser, while ensuring that only approved commands can be run for security. By default, the backend listens on port 4000.

In a terminal, from anywhere in the repository, start the backend service:

```bash
pushd sandbox/innovation-engine-headlamp/src
node shell-exec-backend.js &
cd ..
npm run start &
popd
```

The backend will automatically discover the Innovation Engine binary at `../../bin/ie` (relative to the plugin directory) and allow it as a allowlisted command if present.

### Using the Plugin in Headlamp

1. Open Headlamp and ensure the plugin is enabled. If you see a "Getting Started" option in the left menu then the plugin is installed.
2. Click `Getting Started`
3. On the resulting page there are some quicklinks to test IE in headlamp and a link to a freeform command entry form.
4. The output, error (if any), and exit code will be displayed.

## Developer Notes

- The path to the test exec doc is currently hard coded (L36 of src/index.tsx), arbitrary paths can by typed in on the IE execution page
- The backend service is implemented in `shell-exec-backend.js` and exposes a simple REST API at `POST /api/exec` on port 4000 (by default).
- Only the Innovation Engine CLI (`ie`) can be executed in the shell, though any command within an Exec Docs will run (presenting a significant security risk since, at present, arbitrary documents can be run).
- To allow more commands in the shell execution, add their full paths to the `ALLOWED_COMMANDS` array in `shell-exec-backend.js`.
- The plugin frontend (in `src/index.tsx`) uses React and Headlamp's plugin API to provide a UI for command execution and output display.
- See the [`specifications/`](./specifications/) folder for design specifications.

## Developing Headlamp plugins

For more information on developing Headlamp plugins, please refer to:

- [Getting Started](https://headlamp.dev/docs/latest/development/plugins/), How to create a new Headlamp plugin.
- [API Reference](https://headlamp.dev/docs/latest/development/api/), API documentation for what you can do
- [UI Component Storybook](https://headlamp.dev/docs/latest/development/frontend/#storybook), pre-existing components you can use when creating your plugin.
- [Plugin Examples](https://github.com/kubernetes-sigs/headlamp/tree/main/plugins/examples), Example plugins you can look at to see how it's done.
Loading