Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
b54a553
chore: add unit test file path to make test unit task
jonathanfoster Dec 30, 2025
cddcada
chore: add helm docs to pre-commit check make task
jonathanfoster Dec 30, 2025
7473e6a
chore: update yamllint to ignore .gitignore and .yamlignore
jonathanfoster Dec 31, 2025
0a506c7
chore: add pre-commit fix make task
jonathanfoster Dec 31, 2025
40edc5c
chore: add lint manifest make task
jonathanfoster Dec 31, 2025
fb79496
chore: update install deps linux make task to support amd64 and arm64
jonathanfoster Jan 4, 2026
03b429c
chore: disable debug for e2e tests
jonathanfoster Jan 4, 2026
cf60725
chore: bump e2e test chart testing and kubernetes versions to latest
jonathanfoster Jan 3, 2026
4c5f665
test(hoppscotch): increase e2e test readiness probe initial delay and…
jonathanfoster Jan 4, 2026
4f6e7d2
test(hoppscotch): fix distributed enterprise e2e test image repository
jonathanfoster Jan 4, 2026
1662680
docs: add agents guide
jonathanfoster Dec 31, 2025
28957fa
feat(hoppscotch): add custom image to wait for database init container
jonathanfoster Dec 30, 2025
9955da7
feat(hoppscotch): add global image registry to hoppscotch container i…
jonathanfoster Dec 30, 2025
8ec8bb1
feat(hoppscotch): add custom scheduling to migrations job
jonathanfoster Dec 30, 2025
42668b3
feat(hoppscotch): add extra env vars to init containers
jonathanfoster Dec 31, 2025
b295749
feat(hoppscotch): add postgres, redis, and clickhouse existing secret…
jonathanfoster Jan 3, 2026
acec143
feat(hoppscotch): increase default resources presets to small to avoi…
jonathanfoster Jan 4, 2026
cf98b15
ci: bump chart testing action to v2.8.0
jonathanfoster Jan 5, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
python-version: "3.x"
check-latest: true
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.7.0
uses: helm/chart-testing-action@v2.8.0
- name: Run chart-testing (list-changed)
id: list-changed
run: |
Expand Down
2 changes: 2 additions & 0 deletions .yamlignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
charts/*/templates/
charts/*/values.yaml
7 changes: 3 additions & 4 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
extends: default
ignore:
- .cr-release-packages/
- charts/*/templates/
- charts/*/values.yaml
ignore-from-file:
- .gitignore
- .yamlignore
rules:
comments:
min-spaces-from-content: 1
Expand Down
94 changes: 94 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Agent guidelines

This repository contains [Helm charts](https://helm.sh/) for [Hoppscotch](https://github.com/hoppscotch/hoppscotch), a
lightweight, web-based API development suite. Follow the guidelines below when working in this repository with an agent.

## Chart structure and organization

### Directory structure

- Place templates in the `templates/` directory and use subdirectories to organize by container or resource type. For
example, `templates/aio/` includes AIO container templates and `templates/config/` includes configmap and secret
templates.
- Place unit tests in the `tests/` directory
- Place integration tests in the `templates/tests/` directory
- Place end-to-end tests in the `ci/` directory
- Place commonly shared templates in `_helpers.tpl` and resource-specific shared templates `_<resource-type>.tpl` files
- Use subdirectories to organize templates by either container or resource group (e.g., `templates/<container-name>/` or
`templates/<resource-group>/`)

### Naming conventions

- Use lowercase, hyphenated names for chart directories and values files
- Use camelCase for template definitions and variables
- Name template files after the resources they create

## Development environment

- Use `make install-deps` to install dependencies

## Build and test commands

- Run `make fmt` and `make fmt-fix` to check and fix file formatting issues
- Run `make fmt-<file-type>` and `make fmt-<file-type>-fix` to check and fix file formatting issues for a specific file
type
- Run `make lint` to check for linting issues
- Run `make lint-<file-type>` to check for linting issues for a specific file type
- Run `make test` to run unit, integration, and end-to-end tests
- Run `make test-<test-type>` to run specific test types
- Run `TEST_UNIT_FILES=<test-file-glob-paths> make test-unit` to run specific unit tests

## Code style and conventions

- Use [Helm Chart Best Practices Guide](https://helm.sh/docs/chart_best_practices/) for chart design best practices
- Use popular Helm charts such as [Bitnami charts](https://github.com/bitnami/charts) and
[Grafana charts](https://github.com/grafana/helm-charts) for common design patterns

## Testing guidelines

### Unit testing

- Use [helm unittest](https://github.com/helm-unittest/helm-unittest) for unit tests
- Add unit tests for major, minor, and patch changes
- Do not write unit tests that just check the existence of a value. Instead, assert the correctness of the value using
helm unittest [assertions](https://github.com/helm-unittest/helm-unittest/blob/main/DOCUMENT.md#assertion) such as
`equal` for static values or `matchRegex` for dynamic values.
- Use helm unittest [Kubernetes provider](https://github.com/helm-unittest/helm-unittest/blob/main/DOCUMENT.md) to unit
test existing resource lookup logic

### Integration testing

- Use [helm chart tests](https://helm.sh/docs/topics/chart_tests/) for integration tests
- Add integration tests to check readiness probes for each container

### End-to-end testing

- Use [chart-testing](https://github.com/helm/chart-testing) for end-to-end tests
- Add end-to-end tests for major changes

## Security considerations

- Prefer secure defaults that can be disabled if needed
- Use [Kubernetes RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) to restrict access to resources
- Store sensitive information in [secrets](https://kubernetes.io/docs/concepts/configuration/secret/) and reference them
using environment variables

## Commit guidelines

- Use `make pre-commit` to run pre-commit checks and resolve all issues before committing
- Use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for commit messages
- Type should be one of the following:
- **build**: Changes that affect the build system or external dependencies
- **chore**: Other changes that don't modify src or test files
- **ci**: Changes to CI configuration files and scripts
- **docs**: Documentation only changes
- **feat**: A new feature
- **fix**: A bug fix
- **perf**: A code change that improves performance
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **style**: Changes that don't affect the meaning of the code
- **test**: Adding missing tests or correcting existing tests
- Scope should be the name of the chart affected. The following is the list of supported scopes:
- **hoppscotch**: Hoppscotch chart
- **shc**: Hoppscotch community chart
- **she**: Hoppscotch enterprise chart`
48 changes: 28 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
.DEFAULT_GOAL:=help

ARCH:=$(shell uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
BUILD_DIR:=build
CHART_NAME?=hoppscotch
CHART_NAMESPACE?=default
CHART_VALUES?=charts/${CHART_NAME}/ci/default-values.yaml
CLUSTER_NAME?=helm-charts
TEST_E2E_DIR:=test/e2e
TEST_UNIT_FILES?=tests/*_test.yaml
TEST_UNIT_CHARTS?=charts/*

.PHONY: clean
clean: ## Clean up temporary resources
Expand Down Expand Up @@ -118,22 +121,16 @@ install-deps: ## Install dependencies
.PHONY: install-deps-linux
install-deps-linux: ## Install dependencies for Linux
@echo "Installing dependencies for Linux"
@if ! command -v go &> /dev/null; then \
echo "Error: Go is not installed" 1>&2; \
exit 1; \
fi
@if ! command -v npm &> /dev/null; then \
echo "Error: NPM is not installed" 1>&2; \
exit 1; \
fi
@echo "Installing prerequisite packages"
sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y curl golang-go nodejs npm
@echo "Installing chart-releaser"
curl -sLo cr.tar.gz https://github.com/helm/chart-releaser/releases/download/v1.8.1/chart-releaser_1.8.1_linux_amd64.tar.gz && tar -C /usr/local/bin -xzf cr.tar.gz && rm cr.tar.gz
curl -sLo cr.tar.gz "https://github.com/helm/chart-releaser/releases/download/v1.8.1/chart-releaser_1.8.1_linux_${ARCH}.tar.gz" && sudo tar -C /usr/local/bin -xzf cr.tar.gz && rm cr.tar.gz
@echo "Installing chart-testing"
curl -sLo ct.tar.gz https://github.com/helm/chart-testing/releases/download/v3.13.0/chart-testing_3.13.0_linux_amd64.tar.gz && tar -C /usr/local/bin -xzf ct.tar.gz && rm ct.tar.gz
curl -sLo ct.tar.gz "https://github.com/helm/chart-testing/releases/download/v3.14.0/chart-testing_3.14.0_linux_${ARCH}.tar.gz" && sudo tar -C /usr/local/bin -xzf ct.tar.gz && rm ct.tar.gz
@echo "Installing Docker"
sudo apt -y install docker.io
sudo apt-get install -y docker.io
@echo "Installing Helm"
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-4 | bash
@echo "Installing helm-unittest"
@if ! helm plugin list | grep -q 'unittest'; then \
helm plugin install https://github.com/helm-unittest/helm-unittest; \
Expand All @@ -144,16 +141,18 @@ install-deps-linux: ## Install dependencies for Linux
go install github.com/norwoodj/helm-docs/cmd/helm-docs@latest
@echo "Installing kind"
go install sigs.k8s.io/kind@latest
@echo "Installing kubeconform"
go install github.com/yannh/kubeconform/cmd/kubeconform@latest
@echo "Installing markdownlint-cli"
npm install -g markdownlint-cli
sudo npm install -g markdownlint-cli
@echo "Installing prettier"
npm install -g prettier
sudo npm install -g prettier
@echo "Installing shellcheck"
sudo apt -y install shellcheck
sudo apt-get install -y shellcheck
@echo "Installing shfmt"
go install mvdan.cc/sh/v3/cmd/shfmt@latest
@echo "Installing yamllint"
sudo apt-get -y install yamllint
sudo apt-get install -y yamllint

.PHONY: install-deps-macos
install-deps-macos: ## Install dependencies for MacOS
Expand All @@ -174,6 +173,7 @@ install-deps-macos: ## Install dependencies for MacOS
fi
brew install norwoodj/tap/helm-docs
brew install kind
brew install kubeconform
brew install markdownlint-cli
brew install prettier
brew install shellcheck
Expand Down Expand Up @@ -203,13 +203,18 @@ kind-delete-cluster: ## Delete the kind cluster
fi

.PHONY: lint
lint: lint-helm lint-markdown lint-shell lint-yaml ## Run all linters
lint: lint-helm lint-manifest lint-markdown lint-shell lint-yaml ## Run all linters

.PHONY: lint-helm
lint-helm: ## Lint Helm charts
@echo "Linting Helm charts"
ct lint --config=ct.yaml --lint-conf=lintconf.yaml --all

.PHONY: lint-manifest
lint-manifest: helm-template ## Lint rendered chart manifests
@echo "Linting rendered chart manifests"
kubeconform -summary ${BUILD_DIR}/*.yaml

.PHONY: lint-markdown
lint-markdown: ## Lint Markdown files
@echo "Linting Markdown files"
Expand All @@ -226,20 +231,23 @@ lint-yaml: ## Lint YAML files
yamllint .

.PHONY: pre-commit
pre-commit: fmt lint test-unit ## Run pre-commit hooks
pre-commit: helm-docs fmt lint test-unit ## Run pre-commit hooks

.PHONY: pre-commit-fix
pre-commit-fix: helm-docs fmt-fix lint test-unit ## Run pre-commit hooks with fixes

.PHONY: test
test: test-unit test-e2e ## Run all tests

.PHONY: test-e2e
test-e2e: ## Run end-to-end tests
@echo "Running end-to-end tests for ${CHART_NAME} chart"
${TEST_E2E_DIR}/test-e2e.sh --charts=charts/${CHART_NAME} --debug
${TEST_E2E_DIR}/test-e2e.sh --charts=charts/${CHART_NAME}

.PHONY: test-integration
test-integration: helm-test ## Run integration tests

.PHONY: test-unit
test-unit: ## Run unit tests
@echo "Running unit tests"
helm unittest charts/*
helm unittest -f ${TEST_UNIT_FILES} ${TEST_UNIT_CHARTS}
Loading
Loading