Skip to content

sozercan/gatekeeper-headlamp-plugin

Repository files navigation

Gatekeeper Headlamp Plugin

A Headlamp plugin for viewing and managing OPA Gatekeeper policies, violations, and a library of community-sourced templates in Kubernetes clusters.

Artifact Hub

Features

  • ConstraintTemplates: View Gatekeeper constraint templates.

Constraint Templates

  • Constraints: Browse constraints with enforcement actions and match rules.

Constraints

  • Violations: Monitor policy violations across your cluster.

Violations

  • Gatekeeper Library: Browse, customize, and apply ConstraintTemplates and Constraints from the OPA Gatekeeper Library.

Gatekeeper Library

  • Detailed Views: Comprehensive details for templates and constraints.

Constraint Details

Prerequisites

  • Headlamp installed and configured.
  • A Kubernetes cluster with Gatekeeper installed.
  • For development of the plugin: Node.js and npm (or yarn).

Installation

  • Install Headlamp
  • Open Plugin Catalog
  • Select the Gatekeeper plugin and click the install button
  • After install you may need to restart Headlamp

Development

This project uses a Makefile for common tasks.

  1. Clone the repository:

    git clone <repository-url>
    cd gatekeeper-headlamp-plugin
  2. Setup & Initial Build: Installs dependencies, builds the plugin, and deploys it to the default Headlamp plugins directory.

    make setup
  3. Development Workflow: Builds and deploys the plugin. Use this after making code changes.

    make dev
  4. View all Makefile commands and documentation:

    make help

    The Makefile is extensively documented with details on build processes, platform support, troubleshooting, and more.

Loading the Plugin in Headlamp

After running make deploy (or make setup/make dev), the plugin should be available in your Headlamp plugins directory:

  • Linux/macOS: ~/.config/Headlamp/plugins/gatekeeper-headlamp-plugin/
  • Windows: %APPDATA%/Headlamp/plugins/gatekeeper-headlamp-plugin/

Restart Headlamp if it was running. The "Gatekeeper" section will appear in the sidebar.