Skip to content
Merged
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
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Bug Report
description: Create a report to help us improve
title: "bug: "
labels:
- kind/bug
body:
- type: textarea
id: description
attributes:
label: Describe the bug *
description: Add logs and screenshots if any.
placeholder: |
A clear and concise description of what the bug is.
validations:
required: true

- type: textarea
id: reproducing
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See the error
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true

- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context about the problem here.
validations:
required: false

- type: textarea
id: environment
attributes:
label: Environment
description: |
Please provide details about your environment
placeholder: |
- OS: [e.g. Ubuntu 22.04]
- Kubernetes Version: [e.g. 1.28]
- Toolhive Webhook Version: [e.g. v1.0.0]
validations:
required: false
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/epic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Epic
description: Create an epic to track large initiatives
title: "epic: "
labels:
- kind/epic
body:
- type: textarea
id: description
attributes:
label: Description *
description: A clear and concise description of the epic
placeholder: |
Describe the high-level goal or initiative
validations:
required: true

- type: textarea
id: goals
attributes:
label: Goals
description: What are the main objectives of this epic?
placeholder: |
- Goal 1
- Goal 2
- Goal 3
validations:
required: true

- type: textarea
id: user_stories
attributes:
label: User Stories
description: List the user stories or sub-tasks that make up this epic
placeholder: |
- [ ] User story 1
- [ ] User story 2
- [ ] User story 3
validations:
required: false

- type: textarea
id: acceptance_criteria
attributes:
label: Acceptance Criteria
description: What defines completion for this epic?
placeholder: |
- Criteria 1
- Criteria 2
validations:
required: false

- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context, dependencies, or technical considerations
validations:
required: false
65 changes: 65 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Feature Request
description: Suggest an idea for this project
title: "feat: "
labels:
- kind/feature
body:
- type: textarea
id: problem
attributes:
label: Problem Statement *
description: Is your feature request related to a problem? Please describe.
placeholder: |
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed Solution *
description: Describe the solution you'd like
placeholder: |
A clear and concise description of what you want to happen.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Describe alternatives you've considered
placeholder: |
A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false

- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context or screenshots about the feature request here
validations:
required: false

- type: dropdown
id: priority
attributes:
label: Priority
description: How important is this feature to you?
options:
- Low
- Medium
- High
- Critical
validations:
required: false

- type: checkboxes
id: willingness
attributes:
label: Contribution
description: Are you willing to contribute to this feature?
options:
- label: I am willing to submit a pull request for this feature
required: false
118 changes: 118 additions & 0 deletions .github/ISSUE_TEMPLATE_EXAMPLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
title: "feat: Add GitHub Actions CI/CD workflows and complete .github setup"
labels: ["kind/feature", "ci/cd"]
---

## Description

This PR adds complete GitHub Actions CI/CD workflows following the kagenti-operator repository pattern, along with all supporting `.github` configuration files.

## Changes Made

### GitHub Workflows

1. **CI Workflow** ([`.github/workflows/ci.yaml`](.github/workflows/ci.yaml))
- Runs on pull requests to `main` and `release-*` branches
- Performs linting (`go fmt`), static analysis (`go vet`), and build checks
- Uses Go 1.22

2. **GoReleaser Workflow** ([`.github/workflows/goreleaser.yml`](.github/workflows/goreleaser.yml))
- Triggers on version tags (e.g., `v1.0.0`)
- Builds multi-architecture binaries (Linux/Darwin, amd64/arm64)
- Creates and pushes Docker images to `ghcr.io/kagenti/toolhive-webhook`
- Packages and publishes Helm charts to GHCR
- Creates GitHub releases with changelog

3. **PR Verifier Workflow** ([`.github/workflows/pr-verifier.yaml`](.github/workflows/pr-verifier.yaml))
- Validates PR titles follow semantic commit convention
- Supports types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert

4. **Spellcheck Workflow** ([`.github/workflows/spellcheck_action.yml`](.github/workflows/spellcheck_action.yml))
- Runs on PRs and pushes to main
- Checks spelling in Markdown files using custom wordlist

### Issue Templates

- **Bug Report** ([`.github/ISSUE_TEMPLATE/bug_report.yaml`](.github/ISSUE_TEMPLATE/bug_report.yaml))
- **Epic** ([`.github/ISSUE_TEMPLATE/epic.yaml`](.github/ISSUE_TEMPLATE/epic.yaml))
- **Feature Request** ([`.github/ISSUE_TEMPLATE/feature_request.yaml`](.github/ISSUE_TEMPLATE/feature_request.yaml))

### Spellcheck Configuration

- **Wordlist** ([`.github/spellcheck/.wordlist.txt`](.github/spellcheck/.wordlist.txt)) - 374 technical terms
- **Config** ([`.github/spellcheck/.spellcheck.yml`](.github/spellcheck/.spellcheck.yml)) - Spellcheck rules for Markdown and text files

### Other Configuration

- **Dependabot** ([`.github/dependabot.yaml`](.github/dependabot.yaml)) - Automated dependency updates for Go modules, Docker, and GitHub Actions
- **PR Template** ([`.github/pull_request_template.md`](.github/pull_request_template.md)) - Standardized PR description template

### Release Configuration

- **GoReleaser Config** ([`.goreleaser.yaml`](.goreleaser.yaml))
- Multi-architecture builds for Linux and Darwin (amd64, arm64)
- Docker image creation with multiple tags (version, major, minor, latest)
- Multi-architecture Docker manifests
- Automatic changelog generation

### Helm Chart Updates

- **Values** ([`charts/toolhive-webhook/values.yaml`](charts/toolhive-webhook/values.yaml))
- Updated image repository to `ghcr.io/kagenti/toolhive-webhook`
- Added version placeholder `__PLACEHOLDER__` for automated releases

- **New Templates**:
- [`mutatingwebhook.yaml`](charts/toolhive-webhook/templates/mutatingwebhook.yaml) - Webhook configuration
- [`validatingwebhook.yaml`](charts/toolhive-webhook/templates/validatingwebhook.yaml) - Validation webhook
- [`clusterrole.yaml`](charts/toolhive-webhook/templates/clusterrole.yaml) - RBAC permissions
- [`clusterrolebinding.yaml`](charts/toolhive-webhook/templates/clusterrolebinding.yaml) - Role binding
- [`certificate-issuer.yaml`](charts/toolhive-webhook/templates/certificate-issuer.yaml) - Self-signed issuer
- [`certificate.yaml`](charts/toolhive-webhook/templates/certificate.yaml) - TLS certificate

### Documentation

- **Deployment Guide** ([`DEPLOYMENT.md`](DEPLOYMENT.md)) - Comprehensive deployment instructions including:
- CI/CD workflow documentation
- Release creation process
- Deployment methods (Helm, kubectl, Docker)
- Troubleshooting guide
- Local testing instructions

## How to Create a Release

```bash
# Tag and push
git tag -a v1.0.0 -m "Release v1.0.0"
git push origin v1.0.0
```

This automatically:
- Builds binaries for all platforms
- Creates Docker images for `ghcr.io/kagenti/toolhive-webhook:v1.0.0`
- Packages and publishes Helm chart to GHCR
- Creates GitHub release with artifacts and changelog

## Testing Checklist

- [ ] CI workflow runs successfully on PR
- [ ] PR verifier validates semantic commit titles
- [ ] Spellcheck passes on documentation
- [ ] GoReleaser dry-run succeeds: `goreleaser release --snapshot --clean`
- [ ] Helm chart templates correctly: `helm template toolhive-webhook ./charts/toolhive-webhook`
- [ ] Helm chart lints cleanly: `helm lint charts/toolhive-webhook`
- [ ] Webhook configurations are created
- [ ] Certificates are generated
- [ ] RBAC resources are applied

## Related Issues

Closes #XXX

## Additional Context

This implementation follows the same patterns as the `kagenti-operator` repository to ensure consistency across the Kagenti ecosystem.

## Dependencies

- **cert-manager** is required for webhook TLS certificates
- **GitHub Container Registry** permissions for publishing images and charts
31 changes: 31 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: 2
updates:
# Enable version updates for Go modules
- package-ecosystem: "gomod"
directory: "/kagenti-webhook"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
labels:
- "dependencies"
- "go"

# Enable version updates for Docker
- package-ecosystem: "docker"
directory: "/kagenti-webhook"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "docker"

# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "github-actions"
50 changes: 50 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Description

<!-- Please include a summary of the changes and the related issue. Please also include relevant motivation and context. -->

Fixes # (issue)

## Type of Change

<!-- Please delete options that are not relevant. -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Refactoring (no functional changes)
- [ ] Performance improvement
- [ ] Test addition or update
- [ ] CI/CD update

## How Has This Been Tested?

<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. -->

- [ ] Test A
- [ ] Test B

**Test Configuration**:

- Kubernetes version:
- Toolhive webhook version:
- OS:

## Checklist

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules

## Screenshots (if appropriate)

<!-- Add screenshots to help explain your changes -->

## Additional Notes

<!-- Add any other context about the pull request here -->
Loading