Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Bug report
about: Report a problem with the Agones Headlamp plugin
title: ''
labels: kind/bug
assignees: ''
---

<!-- Please fill out as much as you can. Incomplete reports are harder to triage. -->

**Describe the bug**

A clear description of what went wrong in the plugin UI.

**What you expected**

What should have happened instead.

**Steps to reproduce**

1. Open Headlamp → Agones → …
2. …
3. See error / wrong data

**Screenshots or recordings**

If applicable, add screenshots or a short recording.

**Environment**

- Plugin version / commit (if known):
- Headlamp version (desktop or in-cluster):
- Agones version:
- Kubernetes version (`kubectl version`):
- Browser (if using Headlamp in a browser):

**RBAC / permissions**

Does your user/ServiceAccount have `get`, `list`, `watch` on `agones.dev` resources (and `create` on `gameserverallocations` if using allocation)?

**Logs**

Any relevant browser console errors or Headlamp logs.

**Additional context**

Anything else that might help (sample Fleet/GameServer YAML, feature flags enabled in Agones, etc.).
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: Agones documentation
url: https://agones.dev/site/docs/
about: Agones install, CRDs, and game server lifecycle (not this UI plugin)
- name: Headlamp plugin development
url: https://headlamp.dev/docs/latest/development/plugins/getting-started
about: Headlamp plugin SDK, packaging, and core UI behavior
- name: Report a plugin security issue
url: https://github.com/manumathon/headlamp-plugin/security/advisories/new
about: Private security reports for this plugin repository
- name: Agones security
url: https://github.com/googleforgames/agones/security/advisories/new
about: Security issues in Agones itself (upstream control plane)
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Documentation
about: Report missing or incorrect docs (README, RBAC, install steps)
title: ''
labels: kind/documentation
assignees: ''
---

**What is unclear or wrong?**

Describe the doc gap (README, install, RBAC, development guide, etc.).

**Where did you look?**

- [ ] README.md
- [ ] CONTRIBUTING.md
- [ ] Headlamp.dev plugin docs
- [ ] Other:

**Suggested improvement**

What text or examples would have helped?
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Feature request
about: Suggest an improvement to the Agones Headlamp plugin
title: ''
labels: kind/feature
assignees: ''
---

**Is your request related to a problem?**

Describe the operator or developer pain point (e.g. hard to debug rolling fleet updates without GameServerSet visibility).

**Describe the solution you'd like**

What should the plugin show or let users do?

**Agones resources involved**

Which CRDs or workflows? (e.g. Fleet, GameServerSet, GameServer, GameServerAllocation, FleetAutoscaler)

**Alternatives considered**

Other UI approaches, `kubectl` workflows, or upstream Headlamp features you considered.

**Additional context**

Mockups, links to Agones docs, or related issues in [kubernetes-sigs/headlamp](https://github.com/kubernetes-sigs/headlamp) / [headlamp-k8s/plugins](https://github.com/headlamp-k8s/plugins).
34 changes: 34 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Security policy

## Scope

This repository contains the **Agones Headlamp plugin** — a UI extension for [Headlamp](https://headlamp.dev) that reads and displays Agones custom resources. It does not run game servers or implement the Agones control plane.

Security of your deployment still depends on:

- Kubernetes RBAC for the Headlamp user or ServiceAccount
- Agones installation and configuration ([Agones docs](https://agones.dev/site/docs/))
- Headlamp deployment mode (desktop vs in-cluster) and cluster access

## Reporting a vulnerability

**Do not report security vulnerabilities through public GitHub issues or pull requests.**

### This plugin

If you believe you have found a security issue **in this plugin repository** (e.g. unsafe handling of cluster data in the UI, dependency vulnerability with exploitable impact in context of the plugin):

1. Open a [private vulnerability report](https://github.com/manumathon/headlamp-plugin/security/advisories/new) for this repository.
2. Include a clear description, affected version or commit, steps to reproduce, and suspected impact.

Maintainers will acknowledge as soon as practical and work on validation and fixes.

### Agones or Headlamp core

Issues in **Agones** itself should be reported via the [Agones security policy](https://github.com/googleforgames/agones/blob/main/.github/SECURITY.md) (or the current upstream Agones repository security page).

Issues in **Headlamp** should be reported to [kubernetes-sigs/headlamp](https://github.com/kubernetes-sigs/headlamp/security).

## Supported versions

Security fixes are delivered through normal releases and tags on this repository. Prefer the latest release and keep npm dependencies updated (`npm audit`).
35 changes: 35 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright Contributors to Agones a Series of LF Projects, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 5
labels:
- dependencies
groups:
headlamp-plugin:
patterns:
- '@kinvolk/headlamp-plugin'
- '@headlamp-k8s/*'

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
labels:
- dependencies
40 changes: 40 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!-- Thanks for contributing to the Agones Headlamp plugin! -->

## Type of change

- [ ] Bug fix
- [ ] New feature / enhancement
- [ ] Documentation
- [ ] Refactoring / cleanup
- [ ] CI / tooling
- [ ] Breaking change

## What this PR does / Why we need it

<!-- Describe the change and the motivation. -->

## Related issues

<!-- Link issues this PR addresses, e.g. Fixes #123 -->

Fixes #

## Screenshots / recordings

<!-- If the UI changed, add before/after screenshots or a short screen recording. -->

## Test plan

- [ ] `npm ci`
- [ ] `npm run build`
- [ ] `npm run tsc`
- [ ] `npm run lint`
- [ ] `npm run format -- --check`
- [ ] `npm run test`
- [ ] Manual check in Headlamp (`npm run start`) against a cluster with Agones

<!-- Describe what you tested (e.g. fleet list, allocation dialog, map view). -->

## Notes for reviewers

<!-- Anything reviewers should focus on? -->
29 changes: 29 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
changelog:
exclude:
labels:
- duplicate
- question
- invalid
- wontfix
categories:
- title: Breaking changes
labels:
- kind/breaking
- title: Features
labels:
- kind/feature
- title: Bug fixes
labels:
- kind/bug
- title: Documentation
labels:
- kind/documentation
- title: Security
labels:
- area/security
- title: Dependencies
labels:
- dependencies
- title: Other
labels:
- '*'
62 changes: 62 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Copyright Contributors to Agones a Series of LF Projects, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Based on https://github.com/headlamp-k8s/plugins/blob/main/.github/workflows/headlamp-plugin-github-workflow.yaml

name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
plugin:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node-version: [22.x]

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Typecheck
run: npm run tsc

- name: Lint
run: npm run lint

- name: Check formatting
run: npm run format -- --check

- name: Test
run: npm run test
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

.*
# .*
!.gitignore

### Node template
Expand Down
72 changes: 72 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Contributing to the Agones Headlamp plugin

Thank you for helping improve this plugin. Contributions via issues and pull requests are welcome.

## Before you start

- Read the [README](README.md) for prerequisites (Headlamp + Agones in a cluster).
- For **bugs** and **features**, use the [GitHub issue templates](.github/ISSUE_TEMPLATE/).
- For **security**, see [SECURITY.md](.github/SECURITY.md) — do not file public issues for vulnerabilities.

## Development setup

```bash
git clone <your-fork-url>
cd headlamp-plugin
npm install
npm run start
```

`npm run start` runs the plugin in development mode against your Headlamp instance. See the [Headlamp plugin getting started guide](https://headlamp.dev/docs/latest/development/plugins/getting-started).

## Commands

| Command | Purpose |
|---------|---------|
| `npm run start` | Dev mode |
| `npm run build` | Production build → `dist/` |
| `npm run tsc` | TypeScript check |
| `npm run lint` | ESLint |
| `npm run lint-fix` | ESLint with auto-fix |
| `npm run format` | Prettier write |
| `npm run format -- --check` | Prettier check (CI) |
| `npm run test` | Vitest unit tests |
| `npm run package` | Package for distribution |

Run the same checks as CI before opening a PR:

```bash
npm ci
npm run build && npm run tsc && npm run lint && npm run format -- --check && npm run test
```

## Pull requests

- Use the [pull request template](.github/pull_request_template.md).
- Keep changes focused; link related issues.
- Add or update tests for non-trivial logic (see `src/**/*.test.ts`).
- Include screenshots for UI changes when possible.

## Project layout

```text
src/
index.tsx # Routes and sidebar registration
resources/ # KubeObject classes per Agones CRD
views/ # List and detail pages
components/ # Shared UI (chips, tables, dialogs)
utils/ # Pure helpers (e.g. allocation body builder)
mapView.tsx # Map graph sources
```

## Agones context

This plugin surfaces [Agones](https://agones.dev) CRDs in Headlamp. Useful references:

- [Agones CRD API](https://agones.dev/site/docs/reference/agones_crd_api_reference/)
- [GameServer lifecycle](https://agones.dev/site/docs/reference/gameserver/)
- [Official Headlamp plugins](https://github.com/headlamp-k8s/plugins) (KEDA, Flux, etc.) for patterns

## License

By contributing, you agree that your contributions are licensed under the [Apache License 2.0](LICENSE).
Loading