Skip to content

PipeCD plugin for Headlamp 0.1.0-alpha

Latest

Choose a tag to compare

@illume illume released this 24 Nov 21:18

PipeCD is a GitOps continuous delivery tool. It deploys to Kubernetes, Terraform, Cloud Run, Lambda and ECS. A small agent called a piped runs next to your workloads and does the deployments, and a control plane keeps track of applications and deployments.

Headlamp is an open-source, extensible Kubernetes web UI.

If you use PipeCD with Kubernetes, you usually keep two tabs open: Headlamp for the cluster and the PipeCD web UI for deployments. This plugin brings your pipeds, applications and deployments into Headlamp, so you can see what was deployed, follow a deployment stage by stage and start a sync without leaving it.

What this plugin does

PipeCD keeps its state in the control plane, not in Kubernetes resources, so the plugin talks to PipeCD's APIService over gRPC-Web with an API key. A read-only key is enough to look around. Sync needs a read-write key.

Highlights

  • Overview page with pipeds, applications, deployments and change failure rate
  • Applications list with search and a platform filter
  • Application and deployment detail pages, with pipeline stages and stage logs
  • Sync button with Quick Sync and Pipeline Sync
  • Status colours match the PipeCD web UI
  • The API key is kept in memory only. Only the server URL is saved.

Overview

The PipeCD section opens on an Overview page.

  • Cards for pipeds, applications, deployments and change failure rate (failed / (successful + failed))
  • A deployments chart for the last 24 hours, 7, 14 or 30 days, coloured by status
  • A pipeds table with status, version, start time and app count. If the piped pod runs in the cluster you have open in Headlamp, it also shows whether that pod is running.
  • The newest deployments. Click a row to open it.
image

Applications

  • Sync status, platform, last synced time and Git repository for every application
  • Search by name or repository, filter by platform
  • Follows PipeCD paging, so every application is listed, not just the first page
image

Application detail

  • Git repository and path, piped, platform provider, labels and recent deployments
  • Sync button with a confirm step. Pick Sync, Quick Sync or Pipeline Sync. It is turned off for disabled applications, like in the PipeCD web UI.
image

Deployment detail

  • Status, commit, who triggered it and each pipeline stage
  • Stage logs in a console-style panel, loaded when you open a stage
  • A rollback stage is shown only once it has run
image

Settings

  • PipeCD server URL and API key, with a Test connection button
  • Clear messages for a wrong key, a missing permission or an unreachable server
image

"Open in PipeCD" links open the same item in the PipeCD web UI.


Installation

From the Headlamp Plugin Catalog

  1. Install PipeCD from the Plugin Catalog and reload Headlamp.
  2. In the PipeCD web UI, create an API key (Settings > API Keys). READ_ONLY is enough for viewing. Sync needs READ_WRITE.
  3. Open PipeCD > Settings in Headlamp, enter the server URL and the API key, and click Test connection.

Build from source

git clone https://github.com/headlamp-k8s/plugins
cd plugins/pipecd
npm install
npm start

Requirements

Component Version
Plugin @headlamp-k8s/pipecd 0.1.0-alpha
Headlamp v0.35.0 or newer for the plugin translation API
Headlamp plugin runtime @kinvolk/headlamp-plugin ^0.14.0
PipeCD v0.58.0 or newer. Quick Sync / Pipeline Sync and the full piped list need a newer server (see below).
API key READ_ONLY for viewing, READ_WRITE for Sync

Headlamp desktop works with no extra setup. Headlamp running in a browser needs CORS turned on in the PipeCD gateway for the Headlamp origin. See the plugin README.

Known limitations

  • Alpha: views may change before 1.0.
  • Quick Sync, Pipeline Sync and the full piped list with online/offline status need PipeCD v0.59.0 or newer. On an older server:
    • Quick Sync and Pipeline Sync run the server's default strategy.
    • The Overview lists only pipeds that have an application or a recent deployment, and has no online/offline status.
  • The Overview chart counts at most the newest 1,000 deployments in the chosen range.
  • The server URL must use https://, except for localhost and 127.0.0.1.
  • The API key has to be entered again after Headlamp restarts.

Changelog

Headlamp plugins:

  • #1277 pipecd: Add initial plugin project structure
  • #1300 pipecd: Add API client and settings page
  • #1363 pipecd: Bump deps with npm audit fix (@skoeva)
  • #1387 pipecd: Keep API keys in memory (@skoeva)
  • #1301 pipecd: Add applications list
  • #1454 pipecd: Add application and deployment detail pages
  • #1460 pipecd: Add a sync button to the application page
  • #1527 pipecd: overview: Add the overview page
  • #1544 pipecd: Add more tests

Contributors

Contributor Role
@harshitghagre Design, implementation, tests, docs
@khanhtc1202, @mohammedfirdouss, @yashisrani Mentors
@illume, @skoeva Review

Feedback

Please try it and comment here or open an issue if something does not work.