From e38b73a488d0eb8b80502d0b1f1df9dcf665afc3 Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Tue, 30 Dec 2025 15:59:42 -0500 Subject: [PATCH 01/19] chore: add unit test file path to make test unit task --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4feffe3..a2c763a 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,8 @@ 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 @@ -242,4 +244,4 @@ 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} From d72870c669e6f7be58c61302cd6118c8d16b3ede Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Tue, 30 Dec 2025 16:33:53 -0500 Subject: [PATCH 02/19] chore: add helm docs to pre-commit check make task --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a2c763a..295bd12 100644 --- a/Makefile +++ b/Makefile @@ -228,7 +228,7 @@ 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: test test: test-unit test-e2e ## Run all tests From 8fd192568fe6c1247f7bd9e8e21fa4fc0e0df7ec Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Tue, 30 Dec 2025 22:44:26 -0500 Subject: [PATCH 03/19] chore: update yamllint to ignore .gitignore and .yamlignore --- .yamlignore | 2 ++ .yamllint.yaml | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 .yamlignore diff --git a/.yamlignore b/.yamlignore new file mode 100644 index 0000000..d2e0c42 --- /dev/null +++ b/.yamlignore @@ -0,0 +1,2 @@ + charts/*/templates/ + charts/*/values.yaml diff --git a/.yamllint.yaml b/.yamllint.yaml index 6ca88fa..2bb73a8 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -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 From 7a877afb0ae6c3b4832149b4a502ac2ec7d12706 Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Wed, 31 Dec 2025 12:27:26 -0500 Subject: [PATCH 04/19] chore: add pre-commit fix make task --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 295bd12..24bf332 100644 --- a/Makefile +++ b/Makefile @@ -230,6 +230,9 @@ lint-yaml: ## Lint YAML files .PHONY: pre-commit 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 From bcee9ce47350879d5f122360573abc8f25f2bf3a Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Wed, 31 Dec 2025 13:07:51 -0500 Subject: [PATCH 05/19] chore: add lint manifest make task --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 24bf332..1ac0135 100644 --- a/Makefile +++ b/Makefile @@ -146,6 +146,8 @@ 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 @echo "Installing prettier" @@ -176,6 +178,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 @@ -205,13 +208,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" From 9c3c78d40a13af71400c0af49e8be65f5445e86f Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Sun, 4 Jan 2026 14:39:33 -0500 Subject: [PATCH 06/19] chore: update install deps linux make task to support amd64 and arm64 --- Makefile | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 1ac0135..fdbb5a2 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ .DEFAULT_GOAL:=help +ARCH:=$(shell uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') BUILD_DIR:=build CHART_NAME?=hoppscotch CHART_NAMESPACE?=default @@ -120,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; \ @@ -149,15 +144,15 @@ install-deps-linux: ## Install dependencies for Linux @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 From 28f999e7983622d8f3eaebce4b17eefa4e82f44e Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Sat, 3 Jan 2026 20:36:42 -0500 Subject: [PATCH 07/19] chore: disable debug for e2e tests --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fdbb5a2..82f24db 100644 --- a/Makefile +++ b/Makefile @@ -242,7 +242,7 @@ 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 From f37bed818ff1558e5585afb13b944cd065e74a2f Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Sat, 3 Jan 2026 18:14:07 -0500 Subject: [PATCH 08/19] chore: bump e2e test chart testing and kubernetes versions to latest --- test/e2e/test-e2e.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/test-e2e.sh b/test/e2e/test-e2e.sh index 4a2dee7..51e72c9 100755 --- a/test/e2e/test-e2e.sh +++ b/test/e2e/test-e2e.sh @@ -6,8 +6,8 @@ set -o pipefail CLUSTER_CREATED=false CLUSTER_NAME=$(mktemp -u "chart-testing-XXXXXXXXXX" | tr "[:upper:]" "[:lower:]") -CT_VERSION=v3.13.0 -K8S_VERSION=v1.33.1 +CT_VERSION=v3.14.0 +K8S_VERSION=v1.35.0 ROOT_DIR="$(git rev-parse --show-toplevel)" RED='\033[0;31m' From 8ecf0a25e802de2b77a91a6b812b64cf9ac8ef1b Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Sat, 3 Jan 2026 19:53:06 -0500 Subject: [PATCH 09/19] test(hoppscotch): increase e2e test readiness probe initial delay and disable postgresql persistence to fix intermittent failures --- charts/hoppscotch/ci/aio-enterprise-values.yaml | 7 ++++--- charts/hoppscotch/ci/aio-multiport-values.yaml | 8 +++++--- charts/hoppscotch/ci/aio-subpath-values.yaml | 7 ++++--- charts/hoppscotch/ci/default-values.yaml | 7 ++++--- charts/hoppscotch/ci/distributed-enterprise-values.yaml | 7 ++++--- charts/hoppscotch/ci/distributed-values.yaml | 7 ++++--- 6 files changed, 25 insertions(+), 18 deletions(-) diff --git a/charts/hoppscotch/ci/aio-enterprise-values.yaml b/charts/hoppscotch/ci/aio-enterprise-values.yaml index 22629a4..0a8829f 100644 --- a/charts/hoppscotch/ci/aio-enterprise-values.yaml +++ b/charts/hoppscotch/ci/aio-enterprise-values.yaml @@ -5,6 +5,8 @@ hoppscotch: aio: image: repository: hoppscotch/hoppscotch-enterprise + readinessProbe: + initialDelaySeconds: 15 ingress: enabled: true hostname: hoppscotch.local @@ -20,6 +22,5 @@ postgresql: password: hoppscotch database: hoppscotch primary: - persistentVolumeClaimRetentionPolicy: - enabled: true - whenDeleted: Delete + persistence: + enabled: false diff --git a/charts/hoppscotch/ci/aio-multiport-values.yaml b/charts/hoppscotch/ci/aio-multiport-values.yaml index 6efcfca..86af838 100644 --- a/charts/hoppscotch/ci/aio-multiport-values.yaml +++ b/charts/hoppscotch/ci/aio-multiport-values.yaml @@ -2,6 +2,9 @@ deploymentMode: aio hoppscotch: frontend: enableSubpathBasedAccess: false +aio: + readinessProbe: + initialDelaySeconds: 15 postgresql: enabled: true auth: @@ -9,6 +12,5 @@ postgresql: password: hoppscotch database: hoppscotch primary: - persistentVolumeClaimRetentionPolicy: - enabled: true - whenDeleted: Delete + persistence: + enabled: false diff --git a/charts/hoppscotch/ci/aio-subpath-values.yaml b/charts/hoppscotch/ci/aio-subpath-values.yaml index 7f6de51..b809110 100644 --- a/charts/hoppscotch/ci/aio-subpath-values.yaml +++ b/charts/hoppscotch/ci/aio-subpath-values.yaml @@ -1,5 +1,7 @@ deploymentMode: aio aio: + readinessProbe: + initialDelaySeconds: 15 ingress: enabled: true hostname: hoppscotch.local @@ -15,6 +17,5 @@ postgresql: password: hoppscotch database: hoppscotch primary: - persistentVolumeClaimRetentionPolicy: - enabled: true - whenDeleted: Delete + persistence: + enabled: false diff --git a/charts/hoppscotch/ci/default-values.yaml b/charts/hoppscotch/ci/default-values.yaml index 7f6de51..b809110 100644 --- a/charts/hoppscotch/ci/default-values.yaml +++ b/charts/hoppscotch/ci/default-values.yaml @@ -1,5 +1,7 @@ deploymentMode: aio aio: + readinessProbe: + initialDelaySeconds: 15 ingress: enabled: true hostname: hoppscotch.local @@ -15,6 +17,5 @@ postgresql: password: hoppscotch database: hoppscotch primary: - persistentVolumeClaimRetentionPolicy: - enabled: true - whenDeleted: Delete + persistence: + enabled: false diff --git a/charts/hoppscotch/ci/distributed-enterprise-values.yaml b/charts/hoppscotch/ci/distributed-enterprise-values.yaml index df05245..0f954c4 100644 --- a/charts/hoppscotch/ci/distributed-enterprise-values.yaml +++ b/charts/hoppscotch/ci/distributed-enterprise-values.yaml @@ -14,6 +14,8 @@ frontend: annotations: nginx.ingress.kubernetes.io/force-ssl-redirect: "true" backend: + readinessProbe: + initialDelaySeconds: 15 image: repository: hoppscotch/hoppscotch-backend-enterprise ingress: @@ -42,6 +44,5 @@ postgresql: password: hoppscotch database: hoppscotch primary: - persistentVolumeClaimRetentionPolicy: - enabled: true - whenDeleted: Delete + persistence: + enabled: false diff --git a/charts/hoppscotch/ci/distributed-values.yaml b/charts/hoppscotch/ci/distributed-values.yaml index e5d39b4..5f732d8 100644 --- a/charts/hoppscotch/ci/distributed-values.yaml +++ b/charts/hoppscotch/ci/distributed-values.yaml @@ -9,6 +9,8 @@ frontend: annotations: nginx.ingress.kubernetes.io/force-ssl-redirect: "true" backend: + readinessProbe: + initialDelaySeconds: 15 ingress: enabled: true hostname: backend.hoppscotch.local @@ -33,6 +35,5 @@ postgresql: password: hoppscotch database: hoppscotch primary: - persistentVolumeClaimRetentionPolicy: - enabled: true - whenDeleted: Delete + persistence: + enabled: false From 2c44de4f287d3b92b8ce743c455f0e0ab237781e Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Sat, 3 Jan 2026 20:12:23 -0500 Subject: [PATCH 10/19] test(hoppscotch): fix distributed enterprise e2e test image repository --- charts/hoppscotch/ci/distributed-enterprise-values.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/hoppscotch/ci/distributed-enterprise-values.yaml b/charts/hoppscotch/ci/distributed-enterprise-values.yaml index 0f954c4..231e1eb 100644 --- a/charts/hoppscotch/ci/distributed-enterprise-values.yaml +++ b/charts/hoppscotch/ci/distributed-enterprise-values.yaml @@ -4,7 +4,7 @@ hoppscotch: enterpriseLicenseKey: your-enterprise-license-key frontend: image: - repository: hoppscotch/hoppscotch-frontend-enterprise + repository: hoppscotch/hoppscotch-enterprise-frontend ingress: enabled: true hostname: frontend.hoppscotch.local @@ -17,7 +17,7 @@ backend: readinessProbe: initialDelaySeconds: 15 image: - repository: hoppscotch/hoppscotch-backend-enterprise + repository: hoppscotch/hoppscotch-enterprise-backend ingress: enabled: true hostname: backend.hoppscotch.local @@ -28,7 +28,7 @@ backend: nginx.ingress.kubernetes.io/force-ssl-redirect: "true" admin: image: - repository: hoppscotch/hoppscotch-admin-enterprise + repository: hoppscotch/hoppscotch-enterprise-admin ingress: enabled: true hostname: admin.hoppscotch.local From bda9931bda93a4713719e504648c0ca0c6cf57c3 Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Wed, 31 Dec 2025 12:34:05 -0500 Subject: [PATCH 11/19] docs: add agents guide --- AGENTS.md | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..b8f679f --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,73 @@ +# 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. + +## Development environment + +- Use `make install-deps` to install dependencies + +## Build and test commands + +- Use `make fmt` and `make fmt-fix` to check and fix file formatting issues +- Use `make fmt-` and `make fmt--fix` to check and fix file formatting issues for a specific file + type +- Use `make lint` to check for linting issues +- Use `make lint-` to check for linting issues for a specific file type +- Use `make test` to run unit, integration, and end-to-end tests +- Use `make test-` to run specific test types +- Use `TEST_UNIT_FILES= 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 to `/charts//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 `/charts//templates/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 to `/charts//ci` for major changes + +## Security considerations + +- 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` From 4e21a820c3947ef61b237c0567f79c2bc06e697b Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Tue, 30 Dec 2025 15:44:11 -0500 Subject: [PATCH 12/19] feat(hoppscotch): add custom image to wait for database init container --- charts/hoppscotch/README.md | 17 +- .../templates/_default_init_containers.tpl | 3 +- charts/hoppscotch/templates/_helpers.tpl | 24 +++ ...init_container_wait_for_database_test.yaml | 183 ++++++++++++++++++ ...t_container_wait_for_migrations_test.yaml} | 50 +++-- charts/hoppscotch/values.yaml | 10 + 6 files changed, 259 insertions(+), 28 deletions(-) create mode 100644 charts/hoppscotch/tests/default_init_container_wait_for_database_test.yaml rename charts/hoppscotch/tests/{default_init_containers_test.yaml => default_init_container_wait_for_migrations_test.yaml} (71%) diff --git a/charts/hoppscotch/README.md b/charts/hoppscotch/README.md index 9790c32..c69d404 100644 --- a/charts/hoppscotch/README.md +++ b/charts/hoppscotch/README.md @@ -1,7 +1,7 @@ # Hoppscotch Helm Chart -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) -![AppVersion: 2025.7.1](https://img.shields.io/badge/AppVersion-2025.7.1-informational?style=flat-square) +![Version: 0.2.5](https://img.shields.io/badge/Version-0.2.5-informational?style=flat-square) +![AppVersion: 2025.12.0](https://img.shields.io/badge/AppVersion-2025.12.0-informational?style=flat-square) Hoppscotch is a lightweight, web-based API development suite. It was built from the ground up with ease of use and accessibility in mind providing all the functionality needed for developers with minimalist, unobtrusive UI. @@ -279,7 +279,7 @@ precedence of these methods is as follows (from highest to lowest): Extra env vars, secret, and configmap must be specified in container parameter sections (e.g. `aio`, `frontend`, `backend`, `admin`) -Note: Config order of precedence is driven by Kubernetes, not this chart. See +Note: Config order of precedence is driven by Kubernetes. See [Environment Variables in Kubernetes Pod](https://www.baeldung.com/ops/kubernetes-pod-environment-variables#1-order-of-precedence) for more info. @@ -920,10 +920,13 @@ unique for each release. This allows the job to be run multiple times without co ### Default Init Containers Parameters -| Key | Type | Default | Description | -| ----------------------------------------------- | ---- | ------- | ----------------------------------------------------------- | -| defaultInitContainers.waitForDatabase.enabled | bool | `true` | Enable init container that waits for database to be ready | -| defaultInitContainers.waitForMigrations.enabled | bool | `true` | Enable init container that waits for migrations to complete | +| Key | Type | Default | Description | +| ------------------------------------------------------ | ------ | ---------------- | ----------------------------------------------------------- | +| defaultInitContainers.waitForDatabase.enabled | bool | `true` | Enable init container that waits for database to be ready | +| defaultInitContainers.waitForDatabase.image.repository | string | `"postgres"` | Wait for database image repository | +| defaultInitContainers.waitForDatabase.image.pullPolicy | string | `"IfNotPresent"` | Wait for database image pull policy | +| defaultInitContainers.waitForDatabase.image.tag | string | `"16-alpine"` | Wait for database image tag | +| defaultInitContainers.waitForMigrations.enabled | bool | `true` | Enable init container that waits for migrations to complete | ### Other Parameters diff --git a/charts/hoppscotch/templates/_default_init_containers.tpl b/charts/hoppscotch/templates/_default_init_containers.tpl index a823d64..f8977ef 100644 --- a/charts/hoppscotch/templates/_default_init_containers.tpl +++ b/charts/hoppscotch/templates/_default_init_containers.tpl @@ -3,7 +3,8 @@ Default init container that waits for the database to be ready. */}} {{- define "hoppscotch.defaultInitContainers.waitForDatabase" -}} - name: wait-for-db - image: postgres:16-alpine + image: {{ include "hoppscotch.images.image" (dict "component" .Values.defaultInitContainers.waitForDatabase "context" .) }} + imagePullPolicy: {{ .Values.defaultInitContainers.waitForDatabase.image.pullPolicy }} command: - /bin/sh args: diff --git a/charts/hoppscotch/templates/_helpers.tpl b/charts/hoppscotch/templates/_helpers.tpl index 64bec6b..459746c 100644 --- a/charts/hoppscotch/templates/_helpers.tpl +++ b/charts/hoppscotch/templates/_helpers.tpl @@ -40,6 +40,30 @@ Usage: {{ include "hoppscotch.image" (dict "component" .Values.frontend "context {{- printf "%s:%s" .component.image.repository (default .context.Chart.AppVersion .component.image.tag) -}} {{- end -}} +{{/* +Return the container image name. The global image registry is used if specified. If no tag is provided, only the image +name is returned without a tag defaulting to `latest`. +Usage: {{ include "hoppscotch.images.image" (dict "component" .Values.frontend "context" .) }} +*/}} +{{- define "hoppscotch.images.image" -}} + {{- $registry := .component.image.registry | default .context.Values.global.imageRegistry -}} + {{- $repository := .component.image.repository -}} + {{- $tag := .component.image.tag -}} + {{- if $registry -}} + {{- if $tag -}} + {{- printf "%s/%s:%s" $registry $repository $tag -}} + {{- else -}} + {{- printf "%s/%s" $registry $repository -}} + {{- end -}} + {{- else -}} + {{- if $tag -}} + {{- printf "%s:%s" $repository $tag -}} + {{- else -}} + {{- $repository -}} + {{- end -}} + {{- end -}} +{{- end -}} + {{/* Generate base URL from ingress resource Usage: {{ include "hoppscotch.ingressBaseUrl" .Values.aio.ingress }} diff --git a/charts/hoppscotch/tests/default_init_container_wait_for_database_test.yaml b/charts/hoppscotch/tests/default_init_container_wait_for_database_test.yaml new file mode 100644 index 0000000..7ab34df --- /dev/null +++ b/charts/hoppscotch/tests/default_init_container_wait_for_database_test.yaml @@ -0,0 +1,183 @@ +suite: Default Init Container Wait for Database +templates: + - aio/deployment.yaml + - backend/deployment.yaml + - configmap.yaml + - secrets.yaml +values: + - ../values.yaml +tests: + - it: should generate init container when enabled + template: aio/deployment.yaml + set: + defaultInitContainers: + waitForDatabase: + enabled: true + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - contains: + path: spec.template.spec.initContainers + content: + name: wait-for-db + any: true + + - it: should not generate init container when disabled + template: aio/deployment.yaml + set: + defaultInitContainers: + waitForDatabase: + enabled: false + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - notContains: + path: spec.template.spec.initContainers + content: + name: wait-for-db + any: true + + - it: should set container image to postgres by default + template: aio/deployment.yaml + set: + deploymentMode: aio + defaultInitContainers: + waitForDatabase: + enabled: true + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - contains: + path: spec.template.spec.initContainers + content: + name: wait-for-db + image: postgres:16-alpine + any: true + + - it: should set container image to component image when specified + template: aio/deployment.yaml + set: + deploymentMode: aio + defaultInitContainers: + waitForDatabase: + enabled: true + image: + repository: custom/postgres + tag: 18-alpine + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - contains: + path: spec.template.spec.initContainers + content: + name: wait-for-db + image: custom/postgres:18-alpine + any: true + + - it: should set container image to component registry when specified + template: aio/deployment.yaml + set: + deploymentMode: aio + defaultInitContainers: + waitForDatabase: + enabled: true + image: + registry: component-registry.example.com + repository: postgres + tag: 16-alpine + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - contains: + path: spec.template.spec.initContainers + content: + name: wait-for-db + image: component-registry.example.com/postgres:16-alpine + any: true + + - it: should set container image with global registry when specified + template: aio/deployment.yaml + set: + global: + imageRegistry: global-registry.example.com + deploymentMode: aio + defaultInitContainers: + waitForDatabase: + enabled: true + image: + repository: postgres + tag: 16-alpine + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - contains: + path: spec.template.spec.initContainers + content: + name: wait-for-db + image: global-registry.example.com/postgres:16-alpine + any: true + + - it: should set container image without tag when component tag is empty + template: aio/deployment.yaml + set: + deploymentMode: aio + defaultInitContainers: + waitForDatabase: + enabled: true + image: + repository: postgres + tag: "" + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - contains: + path: spec.template.spec.initContainers + content: + name: wait-for-db + image: postgres + any: true + + - it: should set container image pull policy to `IfNotPresent` by default + template: aio/deployment.yaml + set: + deploymentMode: aio + defaultInitContainers: + waitForDatabase: + enabled: true + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - contains: + path: spec.template.spec.initContainers + content: + name: wait-for-db + imagePullPolicy: IfNotPresent + any: true + + - it: should set container image pull policy to component image pull policy when specified + template: aio/deployment.yaml + set: + deploymentMode: aio + defaultInitContainers: + waitForDatabase: + enabled: true + image: + pullPolicy: Always + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - contains: + path: spec.template.spec.initContainers + content: + name: wait-for-db + imagePullPolicy: Always + any: true diff --git a/charts/hoppscotch/tests/default_init_containers_test.yaml b/charts/hoppscotch/tests/default_init_container_wait_for_migrations_test.yaml similarity index 71% rename from charts/hoppscotch/tests/default_init_containers_test.yaml rename to charts/hoppscotch/tests/default_init_container_wait_for_migrations_test.yaml index 7c89adc..d9c02ed 100644 --- a/charts/hoppscotch/tests/default_init_containers_test.yaml +++ b/charts/hoppscotch/tests/default_init_container_wait_for_migrations_test.yaml @@ -1,4 +1,4 @@ -suite: Default Init Containers +suite: Default Init Container Wait for Migrations templates: - aio/deployment.yaml - backend/deployment.yaml @@ -7,11 +7,11 @@ templates: values: - ../values.yaml tests: - - it: should generate wait for database init container when enabled + - it: should generate init container when enabled template: aio/deployment.yaml set: defaultInitContainers: - waitForDatabase: + waitForMigrations: enabled: true asserts: - containsDocument: @@ -20,14 +20,14 @@ tests: - contains: path: spec.template.spec.initContainers content: - name: wait-for-db + name: wait-for-migrations any: true - - it: should not generate wait for database init container when disabled + - it: should not generate init container when disabled template: aio/deployment.yaml set: defaultInitContainers: - waitForDatabase: + waitForMigrations: enabled: false asserts: - containsDocument: @@ -36,12 +36,17 @@ tests: - notContains: path: spec.template.spec.initContainers content: - name: wait-for-db + name: wait-for-migrations any: true - - it: should generate wait for migrations init container when enabled + - it: should set container image to aio image when deployment mode is aio template: aio/deployment.yaml set: + deploymentMode: aio + aio: + image: + repository: hoppscotch/hoppscotch + tag: latest defaultInitContainers: waitForMigrations: enabled: true @@ -53,32 +58,38 @@ tests: path: spec.template.spec.initContainers content: name: wait-for-migrations + image: hoppscotch/hoppscotch:latest any: true - - it: should not generate wait for migrations init container when disabled - template: aio/deployment.yaml + - it: should set container image to backend image when deployment mode is not aio + template: backend/deployment.yaml set: + deploymentMode: distributed + backend: + image: + repository: hoppscotch/hoppscotch-backend + tag: latest defaultInitContainers: waitForMigrations: - enabled: false + enabled: true asserts: - containsDocument: apiVersion: apps/v1 kind: Deployment - - notContains: + - contains: path: spec.template.spec.initContainers content: name: wait-for-migrations + image: hoppscotch/hoppscotch-backend:latest any: true - - it: should generate wait for database migration init container with aio image when deployment mode is aio + - it: should set container image pull policy to aio image pull policy when deployment mode is aio template: aio/deployment.yaml set: deploymentMode: aio aio: image: - repository: hoppscotch/hoppscotch - tag: latest + pullPolicy: Always defaultInitContainers: waitForMigrations: enabled: true @@ -90,17 +101,16 @@ tests: path: spec.template.spec.initContainers content: name: wait-for-migrations - image: hoppscotch/hoppscotch:latest + imagePullPolicy: Always any: true - - it: should generate wait for database migration init container with backend image when deployment mode is not aio + - it: should set container image pull policy to backend image pull policy when deployment mode is not aio template: backend/deployment.yaml set: deploymentMode: distributed backend: image: - repository: hoppscotch/hoppscotch-backend - tag: latest + pullPolicy: Always defaultInitContainers: waitForMigrations: enabled: true @@ -112,5 +122,5 @@ tests: path: spec.template.spec.initContainers content: name: wait-for-migrations - image: hoppscotch/hoppscotch-backend:latest + imagePullPolicy: Always any: true diff --git a/charts/hoppscotch/values.yaml b/charts/hoppscotch/values.yaml index bf1359a..254f805 100644 --- a/charts/hoppscotch/values.yaml +++ b/charts/hoppscotch/values.yaml @@ -1725,6 +1725,16 @@ defaultInitContainers: # -- Enable init container that waits for database to be ready # @section -- Default Init Containers Parameters enabled: true + image: + # -- Wait for database image repository + # @section -- Default Init Containers Parameters + repository: postgres + # -- Wait for database image pull policy + # @section -- Default Init Containers Parameters + pullPolicy: IfNotPresent + # -- Wait for database image tag + # @section -- Default Init Containers Parameters + tag: 16-alpine waitForMigrations: # -- Enable init container that waits for migrations to complete From 6f6b4508114edfca5ae7ae3647734e05337a1517 Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Tue, 30 Dec 2025 15:54:42 -0500 Subject: [PATCH 13/19] feat(hoppscotch): add global image registry to hoppscotch container images --- charts/hoppscotch/templates/_backend.tpl | 6 +- charts/hoppscotch/templates/_helpers.tpl | 9 +- .../tests/admin_deployment_test.yaml | 82 +++++++++++++++++++ .../hoppscotch/tests/aio_deployment_test.yaml | 82 +++++++++++++++++++ .../tests/backend_deployment_test.yaml | 82 +++++++++++++++++++ .../tests/frontend_deployment_test.yaml | 82 +++++++++++++++++++ .../hoppscotch/tests/migrations_job_test.yaml | 34 ++++++++ 7 files changed, 373 insertions(+), 4 deletions(-) diff --git a/charts/hoppscotch/templates/_backend.tpl b/charts/hoppscotch/templates/_backend.tpl index 38211f3..29c813c 100644 --- a/charts/hoppscotch/templates/_backend.tpl +++ b/charts/hoppscotch/templates/_backend.tpl @@ -44,14 +44,16 @@ Generate Google auth callback URL based on deployment mode and ingress configura {{- end }} {{/* -Backend image based on deployment mode +Backend image based on deployment mode. This named template is used by migrations and wait for migrations containers to +ensure the correct image is selected consistent with the deployment mode. */}} {{- define "hoppscotch.backend.image" -}} {{- include "hoppscotch.image" (dict "component" ((eq .Values.deploymentMode "aio") | ternary .Values.aio .Values.backend) "context" .) -}} {{- end -}} {{/* -Backend image pull policy based on deployment mode +Backend image pull policy based on deployment mode. This named template is used by migrations and wait for migrations +containers to ensure the correct image is pulled consistent with the deployment mode. */}} {{- define "hoppscotch.backend.imagePullPolicy" -}} {{- (eq .Values.deploymentMode "aio") | ternary .Values.aio.image.pullPolicy .Values.backend.image.pullPolicy -}} diff --git a/charts/hoppscotch/templates/_helpers.tpl b/charts/hoppscotch/templates/_helpers.tpl index 459746c..9bb54b8 100644 --- a/charts/hoppscotch/templates/_helpers.tpl +++ b/charts/hoppscotch/templates/_helpers.tpl @@ -33,11 +33,16 @@ Usage: {{ include "hoppscotch.hasCertManagerRequest" ( dict "annotations" .Value {{- end -}} {{/* -Image name and tag for component resources. Chart app version is used as a default tag if not specified. +Return the Hoppscotch container image name with tag. Chart app version is used as a default tag if not specified. This +helper is intended to be used for Hoppscotch components only. For all other components use `hoppscotch.images.image`. Usage: {{ include "hoppscotch.image" (dict "component" .Values.frontend "context" .) }} */}} {{- define "hoppscotch.image" -}} - {{- printf "%s:%s" .component.image.repository (default .context.Chart.AppVersion .component.image.tag) -}} + {{- $componentWithTag := .component -}} + {{- if not .component.image.tag -}} + {{- $componentWithTag = mergeOverwrite (deepCopy .component) (dict "image" (dict "tag" .context.Chart.AppVersion)) -}} + {{- end -}} + {{- include "hoppscotch.images.image" (dict "component" $componentWithTag "context" .context) -}} {{- end -}} {{/* diff --git a/charts/hoppscotch/tests/admin_deployment_test.yaml b/charts/hoppscotch/tests/admin_deployment_test.yaml index 541d3c9..7cf8eea 100644 --- a/charts/hoppscotch/tests/admin_deployment_test.yaml +++ b/charts/hoppscotch/tests/admin_deployment_test.yaml @@ -235,3 +235,85 @@ tests: - equal: path: spec.template.spec.containers[0].startupProbe.httpGet.port value: 8080 + + - it: should set container image + template: admin/deployment.yaml + set: + deploymentMode: distributed + admin: + image: + repository: hoppscotch/hoppscotch-admin + tag: latest + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - equal: + path: spec.template.spec.containers[0].image + value: hoppscotch/hoppscotch-admin:latest + + - it: should set container image tag to chart app version when tag is not specified + template: admin/deployment.yaml + set: + deploymentMode: distributed + admin: + image: + repository: hoppscotch/hoppscotch-admin + tag: "" + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - matchRegex: + path: spec.template.spec.containers[0].image + pattern: ^hoppscotch/hoppscotch-admin:[0-9]+\.[0-9]+\.[0-9]+$ + + - it: should set container image with global registry when specified + template: admin/deployment.yaml + set: + global: + imageRegistry: global-registry.example.com + deploymentMode: distributed + admin: + image: + repository: hoppscotch/hoppscotch-admin + tag: latest + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - equal: + path: spec.template.spec.containers[0].image + value: global-registry.example.com/hoppscotch/hoppscotch-admin:latest + + - it: should set container image with component registry when specified + template: admin/deployment.yaml + set: + deploymentMode: distributed + admin: + image: + registry: component-registry.example.com + repository: hoppscotch/hoppscotch-admin + tag: latest + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - equal: + path: spec.template.spec.containers[0].image + value: component-registry.example.com/hoppscotch/hoppscotch-admin:latest + + - it: should set container image pull policy when specified + template: admin/deployment.yaml + set: + deploymentMode: distributed + admin: + image: + pullPolicy: Always + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - equal: + path: spec.template.spec.containers[0].imagePullPolicy + value: Always diff --git a/charts/hoppscotch/tests/aio_deployment_test.yaml b/charts/hoppscotch/tests/aio_deployment_test.yaml index ed1e60a..e61a943 100644 --- a/charts/hoppscotch/tests/aio_deployment_test.yaml +++ b/charts/hoppscotch/tests/aio_deployment_test.yaml @@ -338,3 +338,85 @@ tests: - equal: path: spec.template.spec.containers[0].ports[3].containerPort value: 3100 + + - it: should set container image + template: aio/deployment.yaml + set: + deploymentMode: aio + aio: + image: + repository: hoppscotch/hoppscotch + tag: latest + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - equal: + path: spec.template.spec.containers[0].image + value: hoppscotch/hoppscotch:latest + + - it: should set container image tag to chart app version when tag is not specified + template: aio/deployment.yaml + set: + deploymentMode: aio + aio: + image: + repository: hoppscotch/hoppscotch + tag: "" + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - matchRegex: + path: spec.template.spec.containers[0].image + pattern: ^hoppscotch/hoppscotch:[0-9]+\.[0-9]+\.[0-9]+$ + + - it: should set container image with global registry when specified + template: aio/deployment.yaml + set: + global: + imageRegistry: global-registry.example.com + deploymentMode: aio + aio: + image: + repository: hoppscotch/hoppscotch + tag: latest + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - equal: + path: spec.template.spec.containers[0].image + value: global-registry.example.com/hoppscotch/hoppscotch:latest + + - it: should set container image with component registry when specified + template: aio/deployment.yaml + set: + deploymentMode: aio + aio: + image: + registry: component-registry.example.com + repository: hoppscotch/hoppscotch + tag: latest + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - equal: + path: spec.template.spec.containers[0].image + value: component-registry.example.com/hoppscotch/hoppscotch:latest + + - it: should set container image pull policy when specified + template: aio/deployment.yaml + set: + deploymentMode: aio + aio: + image: + pullPolicy: Always + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - equal: + path: spec.template.spec.containers[0].imagePullPolicy + value: Always diff --git a/charts/hoppscotch/tests/backend_deployment_test.yaml b/charts/hoppscotch/tests/backend_deployment_test.yaml index 4c87e79..01e7721 100644 --- a/charts/hoppscotch/tests/backend_deployment_test.yaml +++ b/charts/hoppscotch/tests/backend_deployment_test.yaml @@ -235,3 +235,85 @@ tests: - equal: path: spec.template.spec.containers[0].startupProbe.httpGet.port value: 8080 + + - it: should set container image + template: backend/deployment.yaml + set: + deploymentMode: distributed + backend: + image: + repository: hoppscotch/hoppscotch-backend + tag: latest + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - equal: + path: spec.template.spec.containers[0].image + value: hoppscotch/hoppscotch-backend:latest + + - it: should set container image tag to chart app version when tag is not specified + template: backend/deployment.yaml + set: + deploymentMode: distributed + backend: + image: + repository: hoppscotch/hoppscotch-backend + tag: "" + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - matchRegex: + path: spec.template.spec.containers[0].image + pattern: ^hoppscotch/hoppscotch-backend:[0-9]+\.[0-9]+\.[0-9]+$ + + - it: should set container image with global registry when specified + template: backend/deployment.yaml + set: + global: + imageRegistry: global-registry.example.com + deploymentMode: distributed + backend: + image: + repository: hoppscotch/hoppscotch-backend + tag: latest + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - equal: + path: spec.template.spec.containers[0].image + value: global-registry.example.com/hoppscotch/hoppscotch-backend:latest + + - it: should set container image with component registry when specified + template: backend/deployment.yaml + set: + deploymentMode: distributed + backend: + image: + registry: component-registry.example.com + repository: hoppscotch/hoppscotch-backend + tag: latest + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - equal: + path: spec.template.spec.containers[0].image + value: component-registry.example.com/hoppscotch/hoppscotch-backend:latest + + - it: should set container image pull policy when specified + template: backend/deployment.yaml + set: + deploymentMode: distributed + backend: + image: + pullPolicy: Always + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - equal: + path: spec.template.spec.containers[0].imagePullPolicy + value: Always diff --git a/charts/hoppscotch/tests/frontend_deployment_test.yaml b/charts/hoppscotch/tests/frontend_deployment_test.yaml index af67c28..7336154 100644 --- a/charts/hoppscotch/tests/frontend_deployment_test.yaml +++ b/charts/hoppscotch/tests/frontend_deployment_test.yaml @@ -235,3 +235,85 @@ tests: - equal: path: spec.template.spec.containers[0].startupProbe.httpGet.port value: 8080 + + - it: should set container image + template: frontend/deployment.yaml + set: + deploymentMode: distributed + frontend: + image: + repository: hoppscotch/hoppscotch-frontend + tag: latest + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - equal: + path: spec.template.spec.containers[0].image + value: hoppscotch/hoppscotch-frontend:latest + + - it: should set container image tag to chart app version when tag is not specified + template: frontend/deployment.yaml + set: + deploymentMode: distributed + frontend: + image: + repository: hoppscotch/hoppscotch-frontend + tag: "" + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - matchRegex: + path: spec.template.spec.containers[0].image + pattern: ^hoppscotch/hoppscotch-frontend:[0-9]+\.[0-9]+\.[0-9]+$ + + - it: should set container image with global registry when specified + template: frontend/deployment.yaml + set: + global: + imageRegistry: global-registry.example.com + deploymentMode: distributed + frontend: + image: + repository: hoppscotch/hoppscotch-frontend + tag: latest + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - equal: + path: spec.template.spec.containers[0].image + value: global-registry.example.com/hoppscotch/hoppscotch-frontend:latest + + - it: should set container image with component registry when specified + template: frontend/deployment.yaml + set: + deploymentMode: distributed + frontend: + image: + registry: component-registry.example.com + repository: hoppscotch/hoppscotch-frontend + tag: latest + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - equal: + path: spec.template.spec.containers[0].image + value: component-registry.example.com/hoppscotch/hoppscotch-frontend:latest + + - it: should set container image pull policy when specified + template: frontend/deployment.yaml + set: + deploymentMode: distributed + frontend: + image: + pullPolicy: Always + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - equal: + path: spec.template.spec.containers[0].imagePullPolicy + value: Always diff --git a/charts/hoppscotch/tests/migrations_job_test.yaml b/charts/hoppscotch/tests/migrations_job_test.yaml index 49e3eed..7190ac4 100644 --- a/charts/hoppscotch/tests/migrations_job_test.yaml +++ b/charts/hoppscotch/tests/migrations_job_test.yaml @@ -124,6 +124,40 @@ tests: imagePullPolicy: IfNotPresent any: true + - it: should use aio image pull policy when deployment mode is aio + template: migrations/job.yaml + set: + deploymentMode: aio + aio: + image: + pullPolicy: Always + migrations: + enabled: true + asserts: + - containsDocument: + apiVersion: batch/v1 + kind: Job + - equal: + path: spec.template.spec.containers[0].imagePullPolicy + value: Always + + - it: should use backend image pull policy when deployment mode is not aio + template: migrations/job.yaml + set: + deploymentMode: distributed + backend: + image: + pullPolicy: Always + migrations: + enabled: true + asserts: + - containsDocument: + apiVersion: batch/v1 + kind: Job + - equal: + path: spec.template.spec.containers[0].imagePullPolicy + value: Always + - it: should append the release revision to the job name template: migrations/job.yaml release: From d8efe5c61ee50b20d830ff924babc348cf372122 Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Tue, 30 Dec 2025 16:37:07 -0500 Subject: [PATCH 14/19] feat(hoppscotch): add custom scheduling to migrations job --- charts/hoppscotch/README.md | 20 ++-- .../hoppscotch/templates/migrations/job.yaml | 16 ++++ .../hoppscotch/tests/migrations_job_test.yaml | 91 +++++++++++++++++++ charts/hoppscotch/values.yaml | 16 ++++ 4 files changed, 135 insertions(+), 8 deletions(-) diff --git a/charts/hoppscotch/README.md b/charts/hoppscotch/README.md index c69d404..976dbbd 100644 --- a/charts/hoppscotch/README.md +++ b/charts/hoppscotch/README.md @@ -909,14 +909,18 @@ unique for each release. This allows the job to be run multiple times without co ### Hoppscotch Migrations Container Parameters -| Key | Type | Default | Description | -| ----------------------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------- | -| migrations.enabled | bool | `true` | Enable database migrations job | -| migrations.extraEnvVars | list | `[]` | Array of extra environment variables to be added to Hoppscotch containers | -| migrations.extraEnvVarsCM | string | `""` | Name of existing ConfigMap containing extra environment variables | -| migrations.extraEnvVarsSecret | string | `""` | Name of existing Secret containing extra environment variables | -| migrations.resourcesPreset | string | `"nano"` | Set container resources according to one common preset (allowed values: nano, small, medium, large, xlarge, 2xlarge) | -| migrations.resources | object | `{}` | Set container resources for Hoppscotch (overrides resourcesPreset) | +| Key | Type | Default | Description | +| ------------------------------------ | ------ | -------- | -------------------------------------------------------------------------------------------------------------------- | +| migrations.enabled | bool | `true` | Enable database migrations job | +| migrations.extraEnvVars | list | `[]` | Array of extra environment variables to be added to Hoppscotch containers | +| migrations.extraEnvVarsCM | string | `""` | Name of existing ConfigMap containing extra environment variables | +| migrations.extraEnvVarsSecret | string | `""` | Name of existing Secret containing extra environment variables | +| migrations.resourcesPreset | string | `"nano"` | Set container resources according to one common preset (allowed values: nano, small, medium, large, xlarge, 2xlarge) | +| migrations.resources | object | `{}` | Set container resources for Hoppscotch (overrides resourcesPreset) | +| migrations.nodeSelector | object | `{}` | Node labels for Hoppscotch pods assignment | +| migrations.tolerations | list | `[]` | Tolerations for Hoppscotch pods assignment | +| migrations.affinity | object | `{}` | Affinity for Hoppscotch pods assignment | +| migrations.topologySpreadConstraints | list | `[]` | Topology spread constraints for Hoppscotch pods assignment | ### Default Init Containers Parameters diff --git a/charts/hoppscotch/templates/migrations/job.yaml b/charts/hoppscotch/templates/migrations/job.yaml index 9459938..a63d27d 100644 --- a/charts/hoppscotch/templates/migrations/job.yaml +++ b/charts/hoppscotch/templates/migrations/job.yaml @@ -56,4 +56,20 @@ spec: resources: {{- $resources | nindent 12 }} {{- end }} + {{- with .Values.migrations.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.migrations.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.migrations.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.migrations.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/hoppscotch/tests/migrations_job_test.yaml b/charts/hoppscotch/tests/migrations_job_test.yaml index 7190ac4..52bcbac 100644 --- a/charts/hoppscotch/tests/migrations_job_test.yaml +++ b/charts/hoppscotch/tests/migrations_job_test.yaml @@ -172,3 +172,94 @@ tests: - equal: path: metadata.name value: release-name-hoppscotch-migrations-1 + + - it: should set node selector when specified + template: migrations/job.yaml + set: + migrations: + enabled: true + nodeSelector: + app: hoppscotch + asserts: + - containsDocument: + apiVersion: batch/v1 + kind: Job + - equal: + path: spec.template.spec.nodeSelector.app + value: hoppscotch + + - it: should set affinity when specified + template: migrations/job.yaml + set: + migrations: + enabled: true + affinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: app + operator: In + values: + - hoppscotch + asserts: + - containsDocument: + apiVersion: batch/v1 + kind: Job + - equal: + path: spec.template.spec.affinity + value: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: app + operator: In + values: + - hoppscotch + + - it: should set tolerations when specified + template: migrations/job.yaml + set: + migrations: + enabled: true + tolerations: + - key: app + operator: Equal + value: hoppscotch + effect: NoSchedule + asserts: + - containsDocument: + apiVersion: batch/v1 + kind: Job + - equal: + path: spec.template.spec.tolerations + value: + - key: app + operator: Equal + value: hoppscotch + effect: NoSchedule + + - it: should set topology spread constraints when specified + template: migrations/job.yaml + set: + migrations: + enabled: true + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: topology.kubernetes.io/zone + whenUnsatisfiable: DoNotSchedule + labelSelector: + matchLabels: + app: hoppscotch + asserts: + - containsDocument: + apiVersion: batch/v1 + kind: Job + - equal: + path: spec.template.spec.topologySpreadConstraints + value: + - maxSkew: 1 + topologyKey: topology.kubernetes.io/zone + whenUnsatisfiable: DoNotSchedule + labelSelector: + matchLabels: + app: hoppscotch diff --git a/charts/hoppscotch/values.yaml b/charts/hoppscotch/values.yaml index 254f805..07249fb 100644 --- a/charts/hoppscotch/values.yaml +++ b/charts/hoppscotch/values.yaml @@ -1718,6 +1718,22 @@ migrations: # @section -- Hoppscotch Migrations Container Parameters resources: {} + # -- Node labels for Hoppscotch pods assignment + # @section -- Hoppscotch Migrations Container Parameters + nodeSelector: {} + + # -- Tolerations for Hoppscotch pods assignment + # @section -- Hoppscotch Migrations Container Parameters + tolerations: [] + + # -- Affinity for Hoppscotch pods assignment + # @section -- Hoppscotch Migrations Container Parameters + affinity: {} + + # -- Topology spread constraints for Hoppscotch pods assignment + # @section -- Hoppscotch Migrations Container Parameters + topologySpreadConstraints: [] + # @section -- Default Init Containers Parameters defaultInitContainers: From cc1fb24e55b1575f1bea7fa5608437917d6215be Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Tue, 30 Dec 2025 22:33:10 -0500 Subject: [PATCH 15/19] feat(hoppscotch): add extra env vars to init containers --- charts/hoppscotch/README.md | 20 ++++-- .../templates/_default_init_containers.tpl | 24 +++++++ ...init_container_wait_for_database_test.yaml | 65 +++++++++++++++++++ ...it_container_wait_for_migrations_test.yaml | 65 +++++++++++++++++++ charts/hoppscotch/values.yaml | 21 ++++++ 5 files changed, 188 insertions(+), 7 deletions(-) diff --git a/charts/hoppscotch/README.md b/charts/hoppscotch/README.md index 976dbbd..1a22016 100644 --- a/charts/hoppscotch/README.md +++ b/charts/hoppscotch/README.md @@ -924,13 +924,19 @@ unique for each release. This allows the job to be run multiple times without co ### Default Init Containers Parameters -| Key | Type | Default | Description | -| ------------------------------------------------------ | ------ | ---------------- | ----------------------------------------------------------- | -| defaultInitContainers.waitForDatabase.enabled | bool | `true` | Enable init container that waits for database to be ready | -| defaultInitContainers.waitForDatabase.image.repository | string | `"postgres"` | Wait for database image repository | -| defaultInitContainers.waitForDatabase.image.pullPolicy | string | `"IfNotPresent"` | Wait for database image pull policy | -| defaultInitContainers.waitForDatabase.image.tag | string | `"16-alpine"` | Wait for database image tag | -| defaultInitContainers.waitForMigrations.enabled | bool | `true` | Enable init container that waits for migrations to complete | +| Key | Type | Default | Description | +| ---------------------------------------------------------- | ------ | ---------------- | ------------------------------------------------------------------------------------------------------------------- | +| defaultInitContainers.waitForDatabase.enabled | bool | `true` | Enable init container that waits for database to be ready | +| defaultInitContainers.waitForDatabase.image.repository | string | `"postgres"` | Wait for database image repository | +| defaultInitContainers.waitForDatabase.image.pullPolicy | string | `"IfNotPresent"` | Wait for database image pull policy | +| defaultInitContainers.waitForDatabase.image.tag | string | `"16-alpine"` | Wait for database image tag | +| defaultInitContainers.waitForDatabase.extraEnvVars | list | `[]` | Array of extra environment variables to be added to wait for database containers | +| defaultInitContainers.waitForDatabase.extraEnvVarsCM | string | `""` | Name of the existing ConfigMap containing extra environment variables to be added to wait for database containers | +| defaultInitContainers.waitForDatabase.extraEnvVarsSecret | string | `""` | Name of existing Secret containing extra environment variables to be added to wait for database containers | +| defaultInitContainers.waitForMigrations.enabled | bool | `true` | Enable init container that waits for migrations to complete | +| defaultInitContainers.waitForMigrations.extraEnvVars | list | `[]` | Array of extra environment variables to be added to wait for migrations containers | +| defaultInitContainers.waitForMigrations.extraEnvVarsCM | string | `""` | Name of the existing ConfigMap containing extra environment variables to be added to wait for migrations containers | +| defaultInitContainers.waitForMigrations.extraEnvVarsSecret | string | `""` | Name of existing Secret containing extra environment variables to be added to wait for migrations containers | ### Other Parameters diff --git a/charts/hoppscotch/templates/_default_init_containers.tpl b/charts/hoppscotch/templates/_default_init_containers.tpl index f8977ef..9d32d3f 100644 --- a/charts/hoppscotch/templates/_default_init_containers.tpl +++ b/charts/hoppscotch/templates/_default_init_containers.tpl @@ -10,9 +10,21 @@ Default init container that waits for the database to be ready. args: - -c - until pg_isready -d $DATABASE_URL; do sleep 3; done + {{- if .Values.defaultInitContainers.waitForDatabase.extraEnvVars }} + env: + {{- toYaml .Values.defaultInitContainers.waitForDatabase.extraEnvVars | nindent 12 }} + {{- end }} envFrom: - secretRef: name: {{ include "hoppscotch.secretName" . }} + {{- if .Values.migrations.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.defaultInitContainers.waitForDatabase.extraEnvVarsCM }} + {{- end }} + {{- if .Values.defaultInitContainers.waitForDatabase.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.defaultInitContainers.waitForDatabase.extraEnvVarsSecret }} + {{- end }} {{- end -}} {{/* @@ -27,7 +39,19 @@ Default init container that waits for the database migrations to be complete. args: - -c - until ./node_modules/.bin/prisma migrate status; do sleep 2; done + {{- if .Values.defaultInitContainers.waitForMigrations.extraEnvVars }} + env: + {{- toYaml .Values.defaultInitContainers.waitForMigrations.extraEnvVars | nindent 12 }} + {{- end }} envFrom: - secretRef: name: {{ include "hoppscotch.secretName" . }} + {{- if .Values.migrations.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.defaultInitContainers.waitForMigrations.extraEnvVarsCM }} + {{- end }} + {{- if .Values.defaultInitContainers.waitForMigrations.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.defaultInitContainers.waitForMigrations.extraEnvVarsSecret }} + {{- end }} {{- end -}} diff --git a/charts/hoppscotch/tests/default_init_container_wait_for_database_test.yaml b/charts/hoppscotch/tests/default_init_container_wait_for_database_test.yaml index 7ab34df..7ad8d49 100644 --- a/charts/hoppscotch/tests/default_init_container_wait_for_database_test.yaml +++ b/charts/hoppscotch/tests/default_init_container_wait_for_database_test.yaml @@ -181,3 +181,68 @@ tests: name: wait-for-db imagePullPolicy: Always any: true + + - it: should set extra env vars when specified + template: aio/deployment.yaml + set: + deploymentMode: aio + defaultInitContainers: + waitForDatabase: + enabled: true + extraEnvVars: + - name: EXTRA_ENV_VAR_1 + value: value_1 + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - contains: + path: spec.template.spec.initContainers + content: + name: wait-for-db + env: + - name: EXTRA_ENV_VAR_1 + value: value_1 + any: true + + - it: should set extra env vars config map when specified + template: aio/deployment.yaml + set: + deploymentMode: aio + defaultInitContainers: + waitForDatabase: + enabled: true + extraEnvVarsCM: extra-env-vars-config-map + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - notContains: + path: spec.template.spec.initContainers + content: + name: wait-for-db + envFrom: + - configMapRef: + name: extra-env-vars-config-map + any: true + + - it: should set extra env vars secret when specified + template: aio/deployment.yaml + set: + deploymentMode: aio + defaultInitContainers: + waitForDatabase: + enabled: true + extraEnvVarsSecret: env-vars-secret + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - notContains: + path: spec.template.spec.initContainers + content: + name: wait-for-db + envFrom: + - secretRef: + name: env-vars-secret + any: true diff --git a/charts/hoppscotch/tests/default_init_container_wait_for_migrations_test.yaml b/charts/hoppscotch/tests/default_init_container_wait_for_migrations_test.yaml index d9c02ed..ded09cf 100644 --- a/charts/hoppscotch/tests/default_init_container_wait_for_migrations_test.yaml +++ b/charts/hoppscotch/tests/default_init_container_wait_for_migrations_test.yaml @@ -124,3 +124,68 @@ tests: name: wait-for-migrations imagePullPolicy: Always any: true + + - it: should set extra env vars when specified + template: aio/deployment.yaml + set: + deploymentMode: aio + defaultInitContainers: + waitForMigrations: + enabled: true + extraEnvVars: + - name: EXTRA_ENV_VAR_1 + value: value_1 + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - contains: + path: spec.template.spec.initContainers + content: + name: wait-for-migrations + env: + - name: EXTRA_ENV_VAR_1 + value: value_1 + any: true + + - it: should set extra env vars config map when specified + template: aio/deployment.yaml + set: + deploymentMode: aio + defaultInitContainers: + waitForMigrations: + enabled: true + extraEnvVarsCM: extra-env-vars-config-map + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - notContains: + path: spec.template.spec.initContainers + content: + name: wait-for-migrations + envFrom: + - configMapRef: + name: extra-env-vars-config-map + any: true + + - it: should set extra env vars secret when specified + template: aio/deployment.yaml + set: + deploymentMode: aio + defaultInitContainers: + waitForMigrations: + enabled: true + extraEnvVarsSecret: env-vars-secret + asserts: + - containsDocument: + apiVersion: apps/v1 + kind: Deployment + - notContains: + path: spec.template.spec.initContainers + content: + name: wait-for-migrations + envFrom: + - secretRef: + name: env-vars-secret + any: true diff --git a/charts/hoppscotch/values.yaml b/charts/hoppscotch/values.yaml index 07249fb..1d6cdcc 100644 --- a/charts/hoppscotch/values.yaml +++ b/charts/hoppscotch/values.yaml @@ -1741,6 +1741,7 @@ defaultInitContainers: # -- Enable init container that waits for database to be ready # @section -- Default Init Containers Parameters enabled: true + image: # -- Wait for database image repository # @section -- Default Init Containers Parameters @@ -1752,11 +1753,31 @@ defaultInitContainers: # @section -- Default Init Containers Parameters tag: 16-alpine + # -- Array of extra environment variables to be added to wait for database containers + # @section -- Default Init Containers Parameters + extraEnvVars: [] + # -- Name of the existing ConfigMap containing extra environment variables to be added to wait for database containers + # @section -- Default Init Containers Parameters + extraEnvVarsCM: "" + # -- Name of existing Secret containing extra environment variables to be added to wait for database containers + # @section -- Default Init Containers Parameters + extraEnvVarsSecret: "" + waitForMigrations: # -- Enable init container that waits for migrations to complete # @section -- Default Init Containers Parameters enabled: true + # -- Array of extra environment variables to be added to wait for migrations containers + # @section -- Default Init Containers Parameters + extraEnvVars: [] + # -- Name of the existing ConfigMap containing extra environment variables to be added to wait for migrations containers + # @section -- Default Init Containers Parameters + extraEnvVarsCM: "" + # -- Name of existing Secret containing extra environment variables to be added to wait for migrations containers + # @section -- Default Init Containers Parameters + extraEnvVarsSecret: "" + # @section -- Other Parameters serviceAccount: From c5c2505a70a57f2aecce267995c5c878a27bac02 Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Sat, 3 Jan 2026 13:54:12 -0500 Subject: [PATCH 16/19] feat(hoppscotch): add postgres, redis, and clickhouse existing secret lookup --- charts/hoppscotch/README.md | 15 +- charts/hoppscotch/README.md.gotmpl | 2 +- .../templates/{_secrets.yaml => _secret.tpl} | 97 ++--- .../templates/admin/deployment.yaml | 4 +- .../hoppscotch/templates/aio/deployment.yaml | 4 +- .../templates/backend/deployment.yaml | 4 +- .../templates/{ => config}/configmap.yaml | 2 +- .../hoppscotch/templates/config/secret.yaml | 38 ++ .../templates/frontend/deployment.yaml | 4 +- charts/hoppscotch/templates/secrets.yaml | 68 ---- .../tests/admin_deployment_test.yaml | 6 +- charts/hoppscotch/tests/admin_hpa_test.yaml | 6 +- .../hoppscotch/tests/admin_ingress_test.yaml | 6 +- .../tests/admin_networkpolicy_test.yaml | 6 +- charts/hoppscotch/tests/admin_pdb_test.yaml | 6 +- charts/hoppscotch/tests/admin_pvc_test.yaml | 6 +- .../hoppscotch/tests/admin_service_test.yaml | 6 +- .../tests/admin_servicemonitor_test.yaml | 6 +- .../hoppscotch/tests/aio_deployment_test.yaml | 6 +- charts/hoppscotch/tests/aio_hpa_test.yaml | 6 +- charts/hoppscotch/tests/aio_ingress_test.yaml | 6 +- .../tests/aio_networkpolicy_test.yaml | 6 +- charts/hoppscotch/tests/aio_pdb_test.yaml | 6 +- charts/hoppscotch/tests/aio_pvc_test.yaml | 6 +- charts/hoppscotch/tests/aio_service_test.yaml | 6 +- .../tests/aio_servicemonitor_test.yaml | 6 +- .../tests/backend_deployment_test.yaml | 6 +- charts/hoppscotch/tests/backend_hpa_test.yaml | 6 +- .../tests/backend_ingress_test.yaml | 6 +- .../tests/backend_networkpolicy_test.yaml | 6 +- charts/hoppscotch/tests/backend_pdb_test.yaml | 6 +- charts/hoppscotch/tests/backend_pvc_test.yaml | 6 +- .../tests/backend_service_test.yaml | 6 +- .../tests/backend_servicemonitor_test.yaml | 6 +- charts/hoppscotch/tests/clickhouse_test.yaml | 93 ----- charts/hoppscotch/tests/configmap_test.yaml | 128 +++++-- .../hoppscotch/tests/database_url_test.yaml | 219 ------------ ...init_container_wait_for_database_test.yaml | 6 +- ...it_container_wait_for_migrations_test.yaml | 6 +- .../tests/frontend_deployment_test.yaml | 6 +- .../hoppscotch/tests/frontend_hpa_test.yaml | 6 +- .../tests/frontend_ingress_test.yaml | 6 +- .../tests/frontend_networkpolicy_test.yaml | 6 +- .../hoppscotch/tests/frontend_pdb_test.yaml | 6 +- .../hoppscotch/tests/frontend_pvc_test.yaml | 6 +- .../tests/frontend_service_test.yaml | 6 +- .../tests/frontend_servicemonitor_test.yaml | 6 +- .../hoppscotch/tests/migrations_job_test.yaml | 4 +- charts/hoppscotch/tests/redis_test.yaml | 74 ---- charts/hoppscotch/tests/resources_test.yaml | 4 +- .../tests/secret_clickhouse_test.yaml | 218 ++++++++++++ .../tests/secret_database_test.yaml | 329 +++++++++++++++++ .../hoppscotch/tests/secret_redis_test.yaml | 259 ++++++++++++++ charts/hoppscotch/tests/secret_test.yaml | 331 ++++++++++++++++++ charts/hoppscotch/tests/secrets_test.yaml | 214 ----------- charts/hoppscotch/values.yaml | 17 +- 56 files changed, 1432 insertions(+), 900 deletions(-) rename charts/hoppscotch/templates/{_secrets.yaml => _secret.tpl} (74%) rename charts/hoppscotch/templates/{ => config}/configmap.yaml (97%) create mode 100644 charts/hoppscotch/templates/config/secret.yaml delete mode 100644 charts/hoppscotch/templates/secrets.yaml delete mode 100644 charts/hoppscotch/tests/clickhouse_test.yaml delete mode 100644 charts/hoppscotch/tests/database_url_test.yaml delete mode 100644 charts/hoppscotch/tests/redis_test.yaml create mode 100644 charts/hoppscotch/tests/secret_clickhouse_test.yaml create mode 100644 charts/hoppscotch/tests/secret_database_test.yaml create mode 100644 charts/hoppscotch/tests/secret_redis_test.yaml create mode 100644 charts/hoppscotch/tests/secret_test.yaml delete mode 100644 charts/hoppscotch/tests/secrets_test.yaml diff --git a/charts/hoppscotch/README.md b/charts/hoppscotch/README.md index 1a22016..89abe6a 100644 --- a/charts/hoppscotch/README.md +++ b/charts/hoppscotch/README.md @@ -320,8 +320,8 @@ To use an existing secret: existingSecret: my-existing-secret ``` -Note: The existing secret must contain all required keys. See [templates/secrets.yaml](templates/secrets.yaml) for more -info. +Note: The existing secret must contain all required keys. See +[templates/config/secret.yaml](templates/config/secret.yaml) for more info. ## Waiting for Database Readiness @@ -480,7 +480,7 @@ unique for each release. This allows the job to be run multiple times without co | hoppscotch.backend.rateLimit.ttl | int | `60` | Time window for rate limiting (in seconds) | | hoppscotch.backend.rateLimit.max | int | `100` | Maximum number of requests per IP within TTL window | | hoppscotch.backend.enterpriseLicenseKey | string | `""` | Enterprise license key for Hoppscotch Enterprise features | -| hoppscotch.backend.clickhouse.allowAuditLogs | bool | `false` | Enable audit logs collection to ClickHouse. Enterprise Edition required. | +| hoppscotch.backend.allowAuditLogs | bool | `false` | Enable audit logs collection to ClickHouse. Enterprise Edition required. | | hoppscotch.backend.horizontalScalingEnabled | bool | `false` | Enable horizontal scaling with Redis for state management. Enterprise Edition required. | ### Hoppscotch AIO Container Parameters @@ -960,6 +960,7 @@ unique for each release. This allows the job to be run multiple times without co | postgresql.auth.password | string | `""` | PostgreSQL application password | | postgresql.auth.database | string | `""` | PostgreSQL application database name | | postgresql.auth.existingSecret | string | `""` | Existing secret containing PostgreSQL credentials | +| postgresql.auth.secretKeys.userPasswordKey | string | `""` | Key in existing secret containing username | | postgresql.architecture | string | `"standalone"` | PostgreSQL architecture (standalone or replication) | | postgresql.primary.resourcesPreset | string | `"nano"` | PostgreSQL primary resource preset | | postgresql.primary.resources | object | `{}` | PostgreSQL primary resource limits/requests | @@ -984,6 +985,7 @@ unique for each release. This allows the job to be run multiple times without co | redis.auth.enabled | bool | `true` | Enable Redis authentication | | redis.auth.password | string | `""` | Redis password | | redis.auth.existingSecret | string | `""` | Existing secret containing Redis credentials | +| redis.auth.existingSecretPasswordKey | string | `""` | Key in existing secret containing password | | redis.architecture | string | `"standalone"` | Redis architecture (standalone or replication) | | redis.master.resourcesPreset | string | `"nano"` | Redis master resource preset | | redis.master.resources | object | `{}` | Redis master resource limits/requests | @@ -1008,6 +1010,7 @@ unique for each release. This allows the job to be run multiple times without co | clickhouse.auth.username | string | `""` | ClickHouse username | | clickhouse.auth.password | string | `""` | ClickHouse password | | clickhouse.auth.existingSecret | string | `""` | Existing secret containing ClickHouse credentials | +| clickhouse.auth.existingSecretKey | string | `""` | Key in existing secret containing password | | clickhouse.resourcesPreset | string | `"nano"` | ClickHouse resource preset | | clickhouse.resources | object | `{}` | ClickHouse resource limits/requests | | clickhouse.keeper.image.repository | string | `"bitnamilegacy/clickhouse-keeper"` | ClickHouse Keeper image repository | @@ -1018,4 +1021,10 @@ unique for each release. This allows the job to be run multiple times without co | externalClickhouse.existingSecret | string | `""` | Existing secret containing external ClickHouse credentials | | externalClickhouse.existingSecretPasswordKey | string | `""` | Key in existing secret containing password | +### Other Values + +| Key | Type | Default | Description | +| ----------------------------- | ------ | ------- | ----------- | +| hoppscotch.backend.clickhouse | object | `{}` | | + diff --git a/charts/hoppscotch/README.md.gotmpl b/charts/hoppscotch/README.md.gotmpl index c0baaa0..ee98ef0 100644 --- a/charts/hoppscotch/README.md.gotmpl +++ b/charts/hoppscotch/README.md.gotmpl @@ -319,7 +319,7 @@ To use an existing secret: existingSecret: my-existing-secret ``` -Note: The existing secret must contain all required keys. See [templates/secrets.yaml](templates/secrets.yaml) for more +Note: The existing secret must contain all required keys. See [templates/config/secret.yaml](templates/config/secret.yaml) for more info. ## Waiting for Database Readiness diff --git a/charts/hoppscotch/templates/_secrets.yaml b/charts/hoppscotch/templates/_secret.tpl similarity index 74% rename from charts/hoppscotch/templates/_secrets.yaml rename to charts/hoppscotch/templates/_secret.tpl index 92f8ca6..58a01f2 100644 --- a/charts/hoppscotch/templates/_secrets.yaml +++ b/charts/hoppscotch/templates/_secret.tpl @@ -14,12 +14,13 @@ Return the secret name to use for environment variables. Return the ClickHouse host based on the ClickHouse chart or external ClickHouse settings */}} {{- define "hoppscotch.secret.clickhouseHost" -}} + {{- $defaultPort := 8123 -}} {{- if .Values.clickhouse.enabled -}} - {{- printf "%s-clickhouse.%s.svc.%s:8123" .Release.Name (include "hoppscotch.namespace" .) .Values.clusterDomain -}} + {{- $namespace := include "hoppscotch.namespace" . -}} + {{- printf "%s-clickhouse.%s.svc.%s:%d" .Release.Name $namespace .Values.clusterDomain $defaultPort -}} {{- else if .Values.externalClickhouse.host -}} - {{- printf "%s:%d" .Values.externalClickhouse.host (.Values.externalClickhouse.port | int) -}} - {{- else -}} - {{- "" -}} + {{- $port := .Values.externalClickhouse.port | default $defaultPort | int -}} + {{- printf "%s:%d" .Values.externalClickhouse.host $port -}} {{- end -}} {{- end -}} @@ -27,18 +28,18 @@ Return the ClickHouse host based on the ClickHouse chart or external ClickHouse Return the ClickHouse password based on the ClickHouse chart or external ClickHouse settings */}} {{- define "hoppscotch.secret.clickhousePassword" -}} + {{- $namespace := include "hoppscotch.namespace" . -}} {{- if .Values.clickhouse.enabled -}} {{- $password := .Values.clickhouse.auth.password -}} {{- if not $password -}} - {{- $namespace := include "hoppscotch.namespace" . -}} - {{- $clickhouseSecretName := printf "%s-clickhouse" .Release.Name -}} - {{- $password = include "hoppscotch.secret.lookupValue" (dict "name" $clickhouseSecretName "namespace" $namespace "key" "admin-password") -}} + {{- $secretName := .Values.clickhouse.auth.existingSecret | default (printf "%s-clickhouse" .Release.Name) -}} + {{- $secretKey := .Values.clickhouse.auth.existingSecretKey | default "admin-password" -}} + {{- $password = include "hoppscotch.secret.lookupValue" (dict "name" $secretName "namespace" $namespace "key" $secretKey) -}} {{- end -}} {{- $password -}} {{- else -}} {{- $password := .Values.externalClickhouse.password -}} {{- if and (not $password) .Values.externalClickhouse.existingSecret -}} - {{- $namespace := include "hoppscotch.namespace" . -}} {{- $secretKey := .Values.externalClickhouse.existingSecretPasswordKey | default "password" -}} {{- $password = include "hoppscotch.secret.lookupValue" (dict "name" .Values.externalClickhouse.existingSecret "namespace" $namespace "key" $secretKey) -}} {{- end -}} @@ -57,33 +58,41 @@ Return the ClickHouse user based on the ClickHouse chart or external ClickHouse {{- end -}} {{- end -}} + {{/* -Return the database URL based on the PostgreSQL chart or external database settings +Return the database URL based on the PostgreSQL chart or external database settings. */}} {{- define "hoppscotch.secret.databaseUrl" -}} + {{- $defaultPort := 5432 -}} + {{- $defaultSecretKey := "password" -}} + {{- $namespace := include "hoppscotch.namespace" . -}} {{- if .Values.postgresql.enabled -}} - {{- $namespace := include "hoppscotch.namespace" . -}} {{- $host := printf "%s-postgresql.%s.svc.%s" .Release.Name $namespace .Values.clusterDomain -}} - {{- $port := 5432 -}} {{- $user := .Values.postgresql.auth.username -}} {{- $database := .Values.postgresql.auth.database -}} {{- $password := .Values.postgresql.auth.password -}} {{- if not $password -}} - {{- $postgresSecretName := printf "%s-postgresql" .Release.Name -}} - {{- $password = include "hoppscotch.secret.lookupValue" (dict "name" $postgresSecretName "namespace" $namespace "key" "password") -}} + {{- if .Values.postgresql.auth.existingSecret -}} + {{- $secretKey := .Values.postgresql.auth.secretKeys.userPasswordKey | default $defaultSecretKey -}} + {{- $password = include "hoppscotch.secret.lookupValue" (dict "name" .Values.postgresql.auth.existingSecret "namespace" $namespace "key" $secretKey) -}} + {{- else -}} + {{- $secretName := printf "%s-postgresql" .Release.Name -}} + {{- $password = include "hoppscotch.secret.lookupValue" (dict "name" $secretName "namespace" $namespace "key" $defaultSecretKey) -}} + {{- end -}} {{- end -}} - {{- include "hoppscotch.secret.formatPostgresUrl" (dict "host" $host "port" $port "user" $user "password" $password "database" $database) -}} + {{- include "hoppscotch.secret.formatPostgresUrl" (dict "host" $host "port" $defaultPort "user" $user "password" $password "database" $database) -}} {{- else if .Values.externalDatabase.sqlConnection -}} {{- .Values.externalDatabase.sqlConnection -}} + {{- else if and .Values.externalDatabase.existingSecret .Values.externalDatabase.existingSecretSqlConnectionKey -}} + {{- include "hoppscotch.secret.lookupValue" (dict "name" .Values.externalDatabase.existingSecret "namespace" $namespace "key" .Values.externalDatabase.existingSecretSqlConnectionKey) -}} {{- else -}} {{- $host := .Values.externalDatabase.host -}} - {{- $port := .Values.externalDatabase.port | default 5432 | int -}} + {{- $port := .Values.externalDatabase.port | default $defaultPort | int -}} {{- $user := .Values.externalDatabase.user -}} {{- $database := .Values.externalDatabase.database -}} {{- $password := .Values.externalDatabase.password -}} {{- if and (not $password) .Values.externalDatabase.existingSecret -}} - {{- $namespace := include "hoppscotch.namespace" . -}} - {{- $secretKey := .Values.externalDatabase.existingSecretPasswordKey | default "password" -}} + {{- $secretKey := .Values.externalDatabase.existingSecretPasswordKey | default $defaultSecretKey -}} {{- $password = include "hoppscotch.secret.lookupValue" (dict "name" .Values.externalDatabase.existingSecret "namespace" $namespace "key" $secretKey) -}} {{- end -}} {{- include "hoppscotch.secret.formatPostgresUrl" (dict "host" $host "port" $port "user" $user "password" $password "database" $database) -}} @@ -105,22 +114,6 @@ Generate a secure data encryption key that persists across upgrades {{- end -}} {{- end -}} -{{/* -Format a Redis URL for use in configuration files. -Usage: {{- include "hoppscotch.secret.formatRedisUrl" (dict "host" $host "port" $port "password" $password) -}} -*/}} -{{- define "hoppscotch.secret.formatRedisUrl" -}} - {{- $authspec := "" -}} - {{- $hostspec := .host -}} - {{- if .password -}} - {{- $authspec = printf ":%s@" .password -}} - {{- end -}} - {{- if .port -}} - {{- $hostspec = printf "%s:%d" .host .port -}} - {{- end -}} - {{- printf "redis://%s%s" $authspec $hostspec -}} -{{- end -}} - {{/* Format a database URL for use in configuration files. Usage: {{- include "hoppscotch.secret.formatPostgresUrl" (dict "host" $host "port" $port "user" $user "password" $password "database" $database "params" $params) -}} @@ -147,6 +140,22 @@ Usage: {{- include "hoppscotch.secret.formatPostgresUrl" (dict "host" $host "por {{- printf "postgres://%s%s%s%s" $userspec $hostspec $dbname $paramspec -}} {{- end -}} +{{/* +Format a Redis URL for use in configuration files. +Usage: {{- include "hoppscotch.secret.formatRedisUrl" (dict "host" $host "port" $port "password" $password) -}} +*/}} +{{- define "hoppscotch.secret.formatRedisUrl" -}} + {{- $authspec := "" -}} + {{- $hostspec := .host -}} + {{- if .password -}} + {{- $authspec = printf ":%s@" .password -}} + {{- end -}} + {{- if .port -}} + {{- $hostspec = printf "%s:%d" .host .port -}} + {{- end -}} + {{- printf "redis://%s%s" $authspec $hostspec -}} +{{- end -}} + {{/* Generate a secure JWT secret that persists across upgrades */}} @@ -173,27 +182,33 @@ Usage: {{- include "hoppscotch.secret.lookupValue" (dict "name" "my-secret" "nam {{- end -}} {{- end }} + {{/* Return the Redis URL based on the Redis chart or external Redis settings */}} {{- define "hoppscotch.secret.redisUrl" -}} + {{- $defaultPort := 6379 -}} + {{- $defaultSecretKey := "redis-password" -}} + {{- $namespace := include "hoppscotch.namespace" . -}} {{- if .Values.redis.enabled -}} - {{- $namespace := include "hoppscotch.namespace" . -}} {{- $host := printf "%s-redis-master.%s.svc.%s" .Release.Name $namespace .Values.clusterDomain -}} - {{- $port := 6379 -}} {{- $password := .Values.redis.auth.password -}} {{- if not $password -}} - {{- $redisSecretName := printf "%s-redis" .Release.Name -}} - {{- $password = include "hoppscotch.secret.lookupValue" (dict "name" $redisSecretName "namespace" $namespace "key" "redis-password") -}} + {{- if .Values.redis.auth.existingSecret -}} + {{- $secretKey := .Values.redis.auth.existingSecretPasswordKey | default $defaultSecretKey -}} + {{- $password = include "hoppscotch.secret.lookupValue" (dict "name" .Values.redis.auth.existingSecret "namespace" $namespace "key" $secretKey) -}} + {{- else -}} + {{- $secretName := printf "%s-redis" .Release.Name -}} + {{- $password = include "hoppscotch.secret.lookupValue" (dict "name" $secretName "namespace" $namespace "key" $defaultSecretKey) -}} + {{- end -}} {{- end -}} - {{- include "hoppscotch.secret.formatRedisUrl" (dict "host" $host "port" $port "password" $password) -}} + {{- include "hoppscotch.secret.formatRedisUrl" (dict "host" $host "port" $defaultPort "password" $password) -}} {{- else -}} {{- $host := .Values.externalRedis.host -}} - {{- $port := .Values.externalRedis.port | default 6379 | int -}} + {{- $port := .Values.externalRedis.port | default $defaultPort | int -}} {{- $password := .Values.externalRedis.password -}} {{- if and (not $password) .Values.externalRedis.existingSecret -}} - {{- $namespace := include "hoppscotch.namespace" . -}} - {{- $secretKey := .Values.externalRedis.existingSecretPasswordKey | default "password" -}} + {{- $secretKey := .Values.externalRedis.existingSecretPasswordKey | default $defaultSecretKey -}} {{- $password = include "hoppscotch.secret.lookupValue" (dict "name" .Values.externalRedis.existingSecret "namespace" $namespace "key" $secretKey) -}} {{- end -}} {{- include "hoppscotch.secret.formatRedisUrl" (dict "host" $host "port" $port "password" $password) -}} diff --git a/charts/hoppscotch/templates/admin/deployment.yaml b/charts/hoppscotch/templates/admin/deployment.yaml index 4e2f9f7..25d0748 100644 --- a/charts/hoppscotch/templates/admin/deployment.yaml +++ b/charts/hoppscotch/templates/admin/deployment.yaml @@ -27,8 +27,8 @@ spec: template: metadata: annotations: - checksum/configmap-{{ include "hoppscotch.fullname" . }}: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - checksum/secret-{{ include "hoppscotch.fullname" . }}: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} + checksum/configmap-{{ include "hoppscotch.fullname" . }}: {{ include (print $.Template.BasePath "/config/configmap.yaml") . | sha256sum }} + checksum/secret-{{ include "hoppscotch.fullname" . }}: {{ include (print $.Template.BasePath "/config/secret.yaml") . | sha256sum }} {{- with .Values.admin.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/hoppscotch/templates/aio/deployment.yaml b/charts/hoppscotch/templates/aio/deployment.yaml index 4b8957f..c452199 100644 --- a/charts/hoppscotch/templates/aio/deployment.yaml +++ b/charts/hoppscotch/templates/aio/deployment.yaml @@ -27,8 +27,8 @@ spec: template: metadata: annotations: - checksum/configmap-{{ include "hoppscotch.fullname" . }}: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - checksum/secret-{{ include "hoppscotch.fullname" . }}: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} + checksum/configmap-{{ include "hoppscotch.fullname" . }}: {{ include (print $.Template.BasePath "/config/configmap.yaml") . | sha256sum }} + checksum/secret-{{ include "hoppscotch.fullname" . }}: {{ include (print $.Template.BasePath "/config/secret.yaml") . | sha256sum }} {{- with .Values.aio.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/hoppscotch/templates/backend/deployment.yaml b/charts/hoppscotch/templates/backend/deployment.yaml index 4379b14..610d6b7 100644 --- a/charts/hoppscotch/templates/backend/deployment.yaml +++ b/charts/hoppscotch/templates/backend/deployment.yaml @@ -27,8 +27,8 @@ spec: template: metadata: annotations: - checksum/configmap-{{ include "hoppscotch.fullname" . }}: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - checksum/secret-{{ include "hoppscotch.fullname" . }}: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} + checksum/configmap-{{ include "hoppscotch.fullname" . }}: {{ include (print $.Template.BasePath "/config/configmap.yaml") . | sha256sum }} + checksum/secret-{{ include "hoppscotch.fullname" . }}: {{ include (print $.Template.BasePath "/config/secret.yaml") . | sha256sum }} {{- with .Values.backend.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/hoppscotch/templates/configmap.yaml b/charts/hoppscotch/templates/config/configmap.yaml similarity index 97% rename from charts/hoppscotch/templates/configmap.yaml rename to charts/hoppscotch/templates/config/configmap.yaml index 228a635..6acc1ae 100644 --- a/charts/hoppscotch/templates/configmap.yaml +++ b/charts/hoppscotch/templates/config/configmap.yaml @@ -12,7 +12,7 @@ metadata: {{- end }} data: ACCESS_TOKEN_VALIDITY: {{ .Values.hoppscotch.backend.authToken.accessTokenValidity | quote }} - ALLOW_AUDIT_LOGS: {{ .Values.hoppscotch.backend.clickhouse.allowAuditLogs | quote }} + ALLOW_AUDIT_LOGS: {{ or .Values.hoppscotch.backend.allowAuditLogs .Values.hoppscotch.backend.clickhouse.allowAuditLogs | quote }} ALLOW_SECURE_COOKIES: {{ .Values.hoppscotch.backend.allowSecureCookies | quote }} CLICKHOUSE_HOST: {{ include "hoppscotch.secret.clickhouseHost" . | quote }} {{- if eq .Values.deploymentMode "aio" }} diff --git a/charts/hoppscotch/templates/config/secret.yaml b/charts/hoppscotch/templates/config/secret.yaml new file mode 100644 index 0000000..a94d112 --- /dev/null +++ b/charts/hoppscotch/templates/config/secret.yaml @@ -0,0 +1,38 @@ +{{- if not .Values.existingSecret }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "hoppscotch.fullname" . }} + namespace: {{ include "hoppscotch.namespace" . | quote }} + labels: + app.kubernetes.io/component: hoppscotch + {{- include "hoppscotch.labels" . | nindent 4 }} + {{- if .Values.commonAnnotations }} + annotations: + {{- toYaml .Values.commonAnnotations | nindent 4 }} + {{- end }} +type: Opaque +data: + {{- with .Values.hoppscotch.backend }} + DATABASE_URL: {{ include "hoppscotch.secret.databaseUrl" $ | b64enc | quote }} + JWT_SECRET: {{ include "hoppscotch.secret.jwtSecret" $ | b64enc | quote }} + SESSION_SECRET: {{ include "hoppscotch.secret.sessionSecret" $ | b64enc | quote }} + DATA_ENCRYPTION_KEY: {{ include "hoppscotch.secret.dataEncryptionKey" $ | b64enc | quote }} + GOOGLE_CLIENT_ID: {{ .auth.google.clientId | b64enc | quote }} + GOOGLE_CLIENT_SECRET: {{ .auth.google.clientSecret | b64enc | quote }} + GITHUB_CLIENT_ID: {{ .auth.github.clientId | b64enc | quote }} + GITHUB_CLIENT_SECRET: {{ .auth.github.clientSecret | b64enc | quote }} + MICROSOFT_CLIENT_ID: {{ .auth.microsoft.clientId | b64enc | quote }} + MICROSOFT_CLIENT_SECRET: {{ .auth.microsoft.clientSecret | b64enc | quote }} + MAILER_SMTP_URL: {{ .mailer.smtpUrl | b64enc | quote }} + MAILER_SMTP_USER: {{ .mailer.smtpUser | b64enc | quote }} + MAILER_SMTP_PASSWORD: {{ .mailer.smtpPassword | b64enc | quote }} + ENTERPRISE_LICENSE_KEY: {{ .enterpriseLicenseKey | b64enc | quote }} + SAML_CERT: {{ .auth.saml.cert | b64enc | quote }} + OIDC_CLIENT_ID: {{ .auth.oidc.clientId | b64enc | quote }} + OIDC_CLIENT_SECRET: {{ .auth.oidc.clientSecret | b64enc | quote }} + CLICKHOUSE_USER: {{ include "hoppscotch.secret.clickhouseUser" $ | b64enc | quote }} + CLICKHOUSE_PASSWORD: {{ include "hoppscotch.secret.clickhousePassword" $ | b64enc | quote }} + REDIS_URL: {{ include "hoppscotch.secret.redisUrl" $ | b64enc | quote }} + {{- end }} +{{- end }} diff --git a/charts/hoppscotch/templates/frontend/deployment.yaml b/charts/hoppscotch/templates/frontend/deployment.yaml index 3fb063a..e5225ed 100644 --- a/charts/hoppscotch/templates/frontend/deployment.yaml +++ b/charts/hoppscotch/templates/frontend/deployment.yaml @@ -27,8 +27,8 @@ spec: template: metadata: annotations: - checksum/configmap-{{ include "hoppscotch.fullname" . }}: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - checksum/secret-{{ include "hoppscotch.fullname" . }}: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} + checksum/configmap-{{ include "hoppscotch.fullname" . }}: {{ include (print $.Template.BasePath "/config/configmap.yaml") . | sha256sum }} + checksum/secret-{{ include "hoppscotch.fullname" . }}: {{ include (print $.Template.BasePath "/config/secret.yaml") . | sha256sum }} {{- with .Values.frontend.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/hoppscotch/templates/secrets.yaml b/charts/hoppscotch/templates/secrets.yaml deleted file mode 100644 index 5cd24ce..0000000 --- a/charts/hoppscotch/templates/secrets.yaml +++ /dev/null @@ -1,68 +0,0 @@ -{{- if not .Values.existingSecret }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "hoppscotch.fullname" . }} - namespace: {{ include "hoppscotch.namespace" . | quote }} - labels: - app.kubernetes.io/component: hoppscotch - {{- include "hoppscotch.labels" . | nindent 4 }} - {{- if .Values.commonAnnotations }} - annotations: - {{- toYaml .Values.commonAnnotations | nindent 4 }} - {{- end }} -type: Opaque -data: - {{- with .Values.hoppscotch.backend }} - {{- if .databaseUrl }} - DATABASE_URL: {{ .databaseUrl | b64enc | quote }} - {{- else }} - DATABASE_URL: {{ include "hoppscotch.secret.databaseUrl" $ | b64enc | quote }} - {{- end }} - JWT_SECRET: {{ include "hoppscotch.secret.jwtSecret" $ | b64enc | quote }} - SESSION_SECRET: {{ include "hoppscotch.secret.sessionSecret" $ | b64enc | quote }} - DATA_ENCRYPTION_KEY: {{ include "hoppscotch.secret.dataEncryptionKey" $ | b64enc | quote }} - {{- with .auth.google }} - GOOGLE_CLIENT_ID: {{ .clientId | b64enc | quote }} - GOOGLE_CLIENT_SECRET: {{ .clientSecret | b64enc | quote }} - {{- end }} - {{- with .auth.github }} - GITHUB_CLIENT_ID: {{ .clientId | b64enc | quote }} - GITHUB_CLIENT_SECRET: {{ .clientSecret | b64enc | quote }} - {{- end }} - {{- with .auth.microsoft }} - MICROSOFT_CLIENT_ID: {{ .clientId | b64enc | quote }} - MICROSOFT_CLIENT_SECRET: {{ .clientSecret | b64enc | quote }} - {{- end }} - {{- with .mailer }} - MAILER_SMTP_URL: {{ .smtpUrl | b64enc | quote }} - MAILER_SMTP_USER: {{ .smtpUser | b64enc | quote }} - MAILER_SMTP_PASSWORD: {{ .smtpPassword | b64enc | quote }} - {{- end }} - ENTERPRISE_LICENSE_KEY: {{ .enterpriseLicenseKey | b64enc | quote }} - {{- with .auth.saml }} - SAML_CERT: {{ .cert | b64enc | quote }} - {{- end }} - {{- with .auth.oidc }} - OIDC_CLIENT_ID: {{ .clientId | b64enc | quote }} - OIDC_CLIENT_SECRET: {{ .clientSecret | b64enc | quote }} - {{- end }} - {{- if and .clickhouse .clickhouse.allowAuditLogs }} - {{- if .clickhouse.user }} - CLICKHOUSE_USER: {{ .clickhouse.user | b64enc | quote }} - {{- else if or $.Values.clickhouse.enabled $.Values.externalClickhouse.host }} - CLICKHOUSE_USER: {{ include "hoppscotch.secret.clickhouseUser" $ | b64enc | quote }} - {{- end }} - {{- if .clickhouse.password }} - CLICKHOUSE_PASSWORD: {{ .clickhouse.password | b64enc | quote }} - {{- else if or $.Values.clickhouse.enabled $.Values.externalClickhouse.host }} - CLICKHOUSE_PASSWORD: {{ include "hoppscotch.secret.clickhousePassword" $ | b64enc | quote }} - {{- end }} - {{- end }} - {{- if .redisUrl }} - REDIS_URL: {{ .redisUrl | b64enc | quote }} - {{- else if or $.Values.redis.enabled $.Values.externalRedis.host }} - REDIS_URL: {{ include "hoppscotch.secret.redisUrl" $ | b64enc | quote }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/hoppscotch/tests/admin_deployment_test.yaml b/charts/hoppscotch/tests/admin_deployment_test.yaml index 7cf8eea..ad3d2f1 100644 --- a/charts/hoppscotch/tests/admin_deployment_test.yaml +++ b/charts/hoppscotch/tests/admin_deployment_test.yaml @@ -1,10 +1,8 @@ suite: Admin Deployment templates: - admin/deployment.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate deployment when deployment mode is distributed template: admin/deployment.yaml diff --git a/charts/hoppscotch/tests/admin_hpa_test.yaml b/charts/hoppscotch/tests/admin_hpa_test.yaml index d7a5f7d..5c747d2 100644 --- a/charts/hoppscotch/tests/admin_hpa_test.yaml +++ b/charts/hoppscotch/tests/admin_hpa_test.yaml @@ -2,10 +2,8 @@ suite: Admin HPA templates: - admin/deployment.yaml - admin/hpa.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate HPA when deployment mode is distributed and autoscaling is enabled template: admin/hpa.yaml diff --git a/charts/hoppscotch/tests/admin_ingress_test.yaml b/charts/hoppscotch/tests/admin_ingress_test.yaml index 795ca9f..79f910b 100644 --- a/charts/hoppscotch/tests/admin_ingress_test.yaml +++ b/charts/hoppscotch/tests/admin_ingress_test.yaml @@ -3,10 +3,8 @@ templates: - admin/deployment.yaml - admin/ingress.yaml - admin/service.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate ingress when deployment mode is distributed template: admin/ingress.yaml diff --git a/charts/hoppscotch/tests/admin_networkpolicy_test.yaml b/charts/hoppscotch/tests/admin_networkpolicy_test.yaml index 548f908..f027ca8 100644 --- a/charts/hoppscotch/tests/admin_networkpolicy_test.yaml +++ b/charts/hoppscotch/tests/admin_networkpolicy_test.yaml @@ -1,12 +1,10 @@ suite: Admin Network Policy templates: - admin/networkpolicy.yaml - - configmap.yaml + - config/configmap.yaml - deployment.yaml - - secrets.yaml + - config/secret.yaml - service.yaml -values: - - ../values.yaml tests: - it: should generate network policy when deployment mode is distributed and network policy is enabled template: admin/networkpolicy.yaml diff --git a/charts/hoppscotch/tests/admin_pdb_test.yaml b/charts/hoppscotch/tests/admin_pdb_test.yaml index 5629922..c3a1a19 100644 --- a/charts/hoppscotch/tests/admin_pdb_test.yaml +++ b/charts/hoppscotch/tests/admin_pdb_test.yaml @@ -2,10 +2,8 @@ suite: Admin PDB templates: - admin/deployment.yaml - admin/pdb.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate PDB when deployment mode is distributed and PDB is enabled template: admin/pdb.yaml diff --git a/charts/hoppscotch/tests/admin_pvc_test.yaml b/charts/hoppscotch/tests/admin_pvc_test.yaml index a8cbb40..414db46 100644 --- a/charts/hoppscotch/tests/admin_pvc_test.yaml +++ b/charts/hoppscotch/tests/admin_pvc_test.yaml @@ -2,10 +2,8 @@ suite: Admin PVC templates: - admin/deployment.yaml - admin/pvc.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate PVC when deployment mode is distributed and persistence is enabled template: admin/pvc.yaml diff --git a/charts/hoppscotch/tests/admin_service_test.yaml b/charts/hoppscotch/tests/admin_service_test.yaml index 63eca20..b2db131 100644 --- a/charts/hoppscotch/tests/admin_service_test.yaml +++ b/charts/hoppscotch/tests/admin_service_test.yaml @@ -2,10 +2,8 @@ suite: Admin Service templates: - admin/deployment.yaml - admin/service.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate service when deployment mode is distributed template: admin/service.yaml diff --git a/charts/hoppscotch/tests/admin_servicemonitor_test.yaml b/charts/hoppscotch/tests/admin_servicemonitor_test.yaml index 86512be..39db76b 100644 --- a/charts/hoppscotch/tests/admin_servicemonitor_test.yaml +++ b/charts/hoppscotch/tests/admin_servicemonitor_test.yaml @@ -2,10 +2,8 @@ suite: Admin Service Monitor templates: - admin/deployment.yaml - admin/servicemonitor.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate ServiceMonitor when deployment mode is distributed and metrics are enabled template: admin/servicemonitor.yaml diff --git a/charts/hoppscotch/tests/aio_deployment_test.yaml b/charts/hoppscotch/tests/aio_deployment_test.yaml index e61a943..903124e 100644 --- a/charts/hoppscotch/tests/aio_deployment_test.yaml +++ b/charts/hoppscotch/tests/aio_deployment_test.yaml @@ -1,10 +1,8 @@ suite: AIO Deployment templates: - aio/deployment.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate deployment when deployment mode is aio template: aio/deployment.yaml diff --git a/charts/hoppscotch/tests/aio_hpa_test.yaml b/charts/hoppscotch/tests/aio_hpa_test.yaml index a515a08..6e099a9 100644 --- a/charts/hoppscotch/tests/aio_hpa_test.yaml +++ b/charts/hoppscotch/tests/aio_hpa_test.yaml @@ -2,10 +2,8 @@ suite: AIO HPA templates: - aio/deployment.yaml - aio/hpa.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate HPA when deployment mode is aio and autoscaling is enabled template: aio/hpa.yaml diff --git a/charts/hoppscotch/tests/aio_ingress_test.yaml b/charts/hoppscotch/tests/aio_ingress_test.yaml index be18e39..0a50ede 100644 --- a/charts/hoppscotch/tests/aio_ingress_test.yaml +++ b/charts/hoppscotch/tests/aio_ingress_test.yaml @@ -2,10 +2,8 @@ suite: AIO Ingress templates: - aio/deployment.yaml - aio/ingress.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate Ingress when deployment mode is aio and ingress is enabled template: aio/ingress.yaml diff --git a/charts/hoppscotch/tests/aio_networkpolicy_test.yaml b/charts/hoppscotch/tests/aio_networkpolicy_test.yaml index 4603aff..71feada 100644 --- a/charts/hoppscotch/tests/aio_networkpolicy_test.yaml +++ b/charts/hoppscotch/tests/aio_networkpolicy_test.yaml @@ -1,12 +1,10 @@ suite: AIO Network Policy templates: - aio/networkpolicy.yaml - - configmap.yaml + - config/configmap.yaml - deployment.yaml - - secrets.yaml + - config/secret.yaml - service.yaml -values: - - ../values.yaml tests: - it: should generate network policy when deployment mode is aio and network policy is enabled template: aio/networkpolicy.yaml diff --git a/charts/hoppscotch/tests/aio_pdb_test.yaml b/charts/hoppscotch/tests/aio_pdb_test.yaml index 4b123ff..aa1b6b5 100644 --- a/charts/hoppscotch/tests/aio_pdb_test.yaml +++ b/charts/hoppscotch/tests/aio_pdb_test.yaml @@ -2,10 +2,8 @@ suite: AIO PDB templates: - aio/deployment.yaml - aio/pdb.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate PDB when deployment mode is aio and PDB is enabled template: aio/pdb.yaml diff --git a/charts/hoppscotch/tests/aio_pvc_test.yaml b/charts/hoppscotch/tests/aio_pvc_test.yaml index e1a1422..7f57670 100644 --- a/charts/hoppscotch/tests/aio_pvc_test.yaml +++ b/charts/hoppscotch/tests/aio_pvc_test.yaml @@ -2,10 +2,8 @@ suite: AIO PVC templates: - aio/deployment.yaml - aio/pvc.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate PVC when deployment mode is aio and persistence is enabled template: aio/pvc.yaml diff --git a/charts/hoppscotch/tests/aio_service_test.yaml b/charts/hoppscotch/tests/aio_service_test.yaml index 6417dc1..6e4c029 100644 --- a/charts/hoppscotch/tests/aio_service_test.yaml +++ b/charts/hoppscotch/tests/aio_service_test.yaml @@ -2,10 +2,8 @@ suite: AIO Service templates: - aio/deployment.yaml - aio/service.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate service when deployment mode is aio template: aio/service.yaml diff --git a/charts/hoppscotch/tests/aio_servicemonitor_test.yaml b/charts/hoppscotch/tests/aio_servicemonitor_test.yaml index 74ecda3..ae936d7 100644 --- a/charts/hoppscotch/tests/aio_servicemonitor_test.yaml +++ b/charts/hoppscotch/tests/aio_servicemonitor_test.yaml @@ -2,10 +2,8 @@ suite: AIO Service Monitor templates: - aio/deployment.yaml - aio/servicemonitor.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate ServiceMonitor when deployment mode is aio and metrics are enabled template: aio/servicemonitor.yaml diff --git a/charts/hoppscotch/tests/backend_deployment_test.yaml b/charts/hoppscotch/tests/backend_deployment_test.yaml index 01e7721..4d5454d 100644 --- a/charts/hoppscotch/tests/backend_deployment_test.yaml +++ b/charts/hoppscotch/tests/backend_deployment_test.yaml @@ -1,10 +1,8 @@ suite: Backend Deployment templates: - backend/deployment.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate deployment when deployment mode is distributed template: backend/deployment.yaml diff --git a/charts/hoppscotch/tests/backend_hpa_test.yaml b/charts/hoppscotch/tests/backend_hpa_test.yaml index c5a8de5..97e0335 100644 --- a/charts/hoppscotch/tests/backend_hpa_test.yaml +++ b/charts/hoppscotch/tests/backend_hpa_test.yaml @@ -2,10 +2,8 @@ suite: Backend HPA templates: - backend/deployment.yaml - backend/hpa.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate HPA when deployment mode is distributed and autoscaling is enabled template: backend/hpa.yaml diff --git a/charts/hoppscotch/tests/backend_ingress_test.yaml b/charts/hoppscotch/tests/backend_ingress_test.yaml index a60855e..9978bda 100644 --- a/charts/hoppscotch/tests/backend_ingress_test.yaml +++ b/charts/hoppscotch/tests/backend_ingress_test.yaml @@ -3,10 +3,8 @@ templates: - backend/deployment.yaml - backend/ingress.yaml - backend/service.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate ingress when deployment mode is distributed template: backend/ingress.yaml diff --git a/charts/hoppscotch/tests/backend_networkpolicy_test.yaml b/charts/hoppscotch/tests/backend_networkpolicy_test.yaml index d7d7ec0..15d0c8a 100644 --- a/charts/hoppscotch/tests/backend_networkpolicy_test.yaml +++ b/charts/hoppscotch/tests/backend_networkpolicy_test.yaml @@ -1,12 +1,10 @@ suite: Backend Network Policy templates: - backend/networkpolicy.yaml - - configmap.yaml + - config/configmap.yaml - deployment.yaml - - secrets.yaml + - config/secret.yaml - service.yaml -values: - - ../values.yaml tests: - it: should generate network policy when deployment mode is distributed and network policy is enabled template: backend/networkpolicy.yaml diff --git a/charts/hoppscotch/tests/backend_pdb_test.yaml b/charts/hoppscotch/tests/backend_pdb_test.yaml index f7175dc..dc20d3a 100644 --- a/charts/hoppscotch/tests/backend_pdb_test.yaml +++ b/charts/hoppscotch/tests/backend_pdb_test.yaml @@ -2,10 +2,8 @@ suite: Backend PDB templates: - backend/deployment.yaml - backend/pdb.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate PDB when deployment mode is distributed and PDB is enabled template: backend/pdb.yaml diff --git a/charts/hoppscotch/tests/backend_pvc_test.yaml b/charts/hoppscotch/tests/backend_pvc_test.yaml index 5b44675..3e41c9f 100644 --- a/charts/hoppscotch/tests/backend_pvc_test.yaml +++ b/charts/hoppscotch/tests/backend_pvc_test.yaml @@ -2,10 +2,8 @@ suite: Backend PVC templates: - backend/deployment.yaml - backend/pvc.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate PVC when deployment mode is distributed and persistence is enabled template: backend/pvc.yaml diff --git a/charts/hoppscotch/tests/backend_service_test.yaml b/charts/hoppscotch/tests/backend_service_test.yaml index 7687600..28de29d 100644 --- a/charts/hoppscotch/tests/backend_service_test.yaml +++ b/charts/hoppscotch/tests/backend_service_test.yaml @@ -2,10 +2,8 @@ suite: Backend Service templates: - backend/deployment.yaml - backend/service.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate service when deployment mode is distributed template: backend/service.yaml diff --git a/charts/hoppscotch/tests/backend_servicemonitor_test.yaml b/charts/hoppscotch/tests/backend_servicemonitor_test.yaml index d1fdb13..934d219 100644 --- a/charts/hoppscotch/tests/backend_servicemonitor_test.yaml +++ b/charts/hoppscotch/tests/backend_servicemonitor_test.yaml @@ -2,10 +2,8 @@ suite: Backend Service Monitor templates: - backend/deployment.yaml - backend/servicemonitor.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate ServiceMonitor when deployment mode is distributed and metrics are enabled template: backend/servicemonitor.yaml diff --git a/charts/hoppscotch/tests/clickhouse_test.yaml b/charts/hoppscotch/tests/clickhouse_test.yaml deleted file mode 100644 index a67524c..0000000 --- a/charts/hoppscotch/tests/clickhouse_test.yaml +++ /dev/null @@ -1,93 +0,0 @@ -suite: ClickHouse -templates: - - templates/configmap.yaml - - templates/secrets.yaml -tests: - - it: should include ClickHouse configuration when subchart is enabled and audit logs are enabled - set: - hoppscotch: - backend: - clickhouse: - allowAuditLogs: true - clickhouse: - enabled: true - auth: - username: test-user - password: test-password - asserts: - - equal: - path: data.ALLOW_AUDIT_LOGS - value: "true" - template: templates/configmap.yaml - - equal: - path: data.CLICKHOUSE_HOST - value: "RELEASE-NAME-clickhouse.NAMESPACE.svc.cluster.local:8123" - template: templates/configmap.yaml - - equal: - path: data.CLICKHOUSE_USER - value: dGVzdC11c2Vy - template: templates/secrets.yaml - - equal: - path: data.CLICKHOUSE_PASSWORD - value: dGVzdC1wYXNzd29yZA== - template: templates/secrets.yaml - - - it: should include external ClickHouse configuration when external host is set - set: - hoppscotch: - backend: - clickhouse: - allowAuditLogs: true - clickhouse: - enabled: false - externalClickhouse: - host: external.clickhouse.com - port: 9123 - user: external-user - password: external-password - asserts: - - equal: - path: data.ALLOW_AUDIT_LOGS - value: "true" - template: templates/configmap.yaml - - equal: - path: data.CLICKHOUSE_HOST - value: "external.clickhouse.com:9123" - template: templates/configmap.yaml - - equal: - path: data.CLICKHOUSE_USER - value: ZXh0ZXJuYWwtdXNlcg== - template: templates/secrets.yaml - - equal: - path: data.CLICKHOUSE_PASSWORD - value: ZXh0ZXJuYWwtcGFzc3dvcmQ= - template: templates/secrets.yaml - - - it: should use custom ClickHouse configuration when provided - set: - hoppscotch: - backend: - clickhouse: - allowAuditLogs: true - externalClickhouse: - host: custom.clickhouse.com - port: 8443 - user: custom-user - password: custom-password - asserts: - - equal: - path: data.ALLOW_AUDIT_LOGS - value: "true" - template: templates/configmap.yaml - - equal: - path: data.CLICKHOUSE_HOST - value: "custom.clickhouse.com:8443" - template: templates/configmap.yaml - - equal: - path: data.CLICKHOUSE_USER - value: Y3VzdG9tLXVzZXI= - template: templates/secrets.yaml - - equal: - path: data.CLICKHOUSE_PASSWORD - value: Y3VzdG9tLXBhc3N3b3Jk - template: templates/secrets.yaml diff --git a/charts/hoppscotch/tests/configmap_test.yaml b/charts/hoppscotch/tests/configmap_test.yaml index c264710..2f85fa1 100644 --- a/charts/hoppscotch/tests/configmap_test.yaml +++ b/charts/hoppscotch/tests/configmap_test.yaml @@ -1,11 +1,8 @@ suite: Config Map templates: - - configmap.yaml -values: - - ../values.yaml + - config/configmap.yaml tests: - it: should render frontend parameters when explicitly set - template: configmap.yaml set: hoppscotch: frontend: @@ -54,7 +51,6 @@ tests: value: "true" - it: should render backend parameters when explicitly set - template: configmap.yaml set: hoppscotch: backend: @@ -190,7 +186,6 @@ tests: value: "100" - it: should render enterprise parameters when explicitly set - template: configmap.yaml set: hoppscotch: frontend: @@ -321,7 +316,6 @@ tests: path: data.REDIS_URL - it: should default custom SMTP port to 587 - template: configmap.yaml set: hoppscotch: backend: @@ -336,7 +330,6 @@ tests: value: "587" - it: should generate auth callback URL for GitHub when deployment mode is aio and ingress is enabled - template: configmap.yaml set: deploymentMode: aio aio: @@ -354,7 +347,6 @@ tests: value: https://example.com/backend/v1/auth/github/callback - it: should generate auth callback URL for GitHub when deployment mode is distributed and ingress is enabled - template: configmap.yaml set: deploymentMode: distributed frontend: @@ -381,7 +373,6 @@ tests: value: https://backend.example.com/v1/auth/github/callback - it: should generate auth callback URL for Google when deployment mode is aio and ingress is enabled - template: configmap.yaml set: deploymentMode: aio aio: @@ -399,7 +390,6 @@ tests: value: https://example.com/backend/v1/auth/google/callback - it: should generate auth callback URL for Google when deployment mode is distributed and ingress is enabled - template: configmap.yaml set: deploymentMode: distributed frontend: @@ -426,7 +416,6 @@ tests: value: https://backend.example.com/v1/auth/google/callback - it: should generate auth callback URL for Microsoft when deployment mode is aio and ingress is enabled - template: configmap.yaml set: deploymentMode: aio aio: @@ -444,7 +433,6 @@ tests: value: https://example.com/backend/v1/auth/microsoft/callback - it: should generate auth callback URL for Microsoft when deployment mode is distributed and ingress is enabled - template: configmap.yaml set: deploymentMode: distributed frontend: @@ -471,7 +459,6 @@ tests: value: https://backend.example.com/v1/auth/microsoft/callback - it: should generate auth callback URL for OIDC when deployment mode is aio and ingress is enabled - template: configmap.yaml set: deploymentMode: aio aio: @@ -489,7 +476,6 @@ tests: value: https://example.com/backend/v1/auth/oidc/callback - it: should generate auth callback URL for OIDC when deployment mode is distributed and ingress is enabled - template: configmap.yaml set: deploymentMode: distributed frontend: @@ -516,7 +502,6 @@ tests: value: https://backend.example.com/v1/auth/oidc/callback - it: should generate auth callback URL for SAML when deployment mode is aio and ingress is enabled - template: configmap.yaml set: deploymentMode: aio aio: @@ -534,7 +519,6 @@ tests: value: https://example.com/backend/v1/auth/saml/callback - it: should generate auth callback URL for SAML when deployment mode is distributed and ingress is enabled - template: configmap.yaml set: deploymentMode: distributed frontend: @@ -561,7 +545,6 @@ tests: value: https://backend.example.com/v1/auth/saml/callback - it: should generate backend redirect URL when deployment mode is aio and ingress is enabled - template: configmap.yaml set: deploymentMode: aio aio: @@ -579,7 +562,6 @@ tests: value: https://example.com - it: should generate backend redirect URL when deployment mode is distributed and ingress is enabled - template: configmap.yaml set: deploymentMode: distributed frontend: @@ -606,7 +588,6 @@ tests: value: https://frontend.example.com - it: should generate backend whitelisted origins when deployment mode is aio and ingress is enabled - template: configmap.yaml set: deploymentMode: aio aio: @@ -624,7 +605,6 @@ tests: value: https://example.com,app://example_com,http://app.example_com - it: should generate backend whitelisted origins when deployment mode is aio and ingress is not enabled - template: configmap.yaml set: deploymentMode: aio aio: @@ -642,7 +622,6 @@ tests: value: "" - it: should generate backend whitelisted origins when deployment mode is distributed and ingress is enabled - template: configmap.yaml set: deploymentMode: distributed frontend: @@ -670,7 +649,6 @@ tests: value: https://frontend.example.com,app://frontend_example_com,http://app.frontend_example_com,https://backend.example.com,https://admin.example.com - it: should generate frontend admin URL when deployment mode is aio and ingress is enabled - template: configmap.yaml set: deploymentMode: aio aio: @@ -688,7 +666,6 @@ tests: value: https://example.com/admin - it: should generate frontend admin URL when deployment mode is distributed and ingress is enabled - template: configmap.yaml set: deploymentMode: distributed frontend: @@ -715,7 +692,6 @@ tests: value: https://admin.example.com - it: should generate frontend backend API URL when deployment mode is aio and ingress is enabled - template: configmap.yaml set: deploymentMode: aio aio: @@ -733,7 +709,6 @@ tests: value: https://example.com/backend/v1 - it: should generate frontend backend API URL when deployment mode is distributed and ingress is enabled - template: configmap.yaml set: deploymentMode: distributed frontend: @@ -760,7 +735,6 @@ tests: value: https://backend.example.com/v1 - it: should generate frontend backend GraphQL URL when deployment mode is aio and ingress is enabled - template: configmap.yaml set: deploymentMode: aio aio: @@ -778,7 +752,6 @@ tests: value: https://example.com/backend/graphql - it: should generate frontend backend GraphQL URL when deployment mode is distributed and ingress is enabled - template: configmap.yaml set: deploymentMode: distributed frontend: @@ -805,7 +778,6 @@ tests: value: https://backend.example.com/graphql - it: should generate frontend backend WebSocket URL when deployment mode is aio and ingress is enabled - template: configmap.yaml set: deploymentMode: aio aio: @@ -823,7 +795,6 @@ tests: value: wss://example.com/backend/graphql - it: should generate frontend backend WebSocket URL when deployment mode is distributed and ingress is enabled - template: configmap.yaml set: deploymentMode: distributed frontend: @@ -850,7 +821,6 @@ tests: value: wss://backend.example.com/graphql - it: should generate frontend base URL when deployment mode is aio and ingress is enabled - template: configmap.yaml set: deploymentMode: aio aio: @@ -868,7 +838,6 @@ tests: value: https://example.com - it: should generate frontend base URL when deployment mode is distributed and ingress is enabled - template: configmap.yaml set: deploymentMode: distributed frontend: @@ -895,7 +864,6 @@ tests: value: https://frontend.example.com - it: should generate frontend shortcode base URL when deployment mode is aio and ingress is enabled - template: configmap.yaml set: deploymentMode: aio aio: @@ -913,7 +881,6 @@ tests: value: https://example.com - it: should generate frontend shortcode base URL when deployment mode is distributed and ingress is enabled - template: configmap.yaml set: deploymentMode: distributed frontend: @@ -940,7 +907,6 @@ tests: value: https://frontend.example.com - it: should enable subpath based access when deployment mode is aio and subpath based access is enabled - template: configmap.yaml set: deploymentMode: aio hoppscotch: @@ -955,7 +921,6 @@ tests: value: "true" - it: should disable subpath based access when deployment mode is not aio - template: configmap.yaml set: deploymentMode: distributed hoppscotch: @@ -968,3 +933,94 @@ tests: - equal: path: data.ENABLE_SUBPATH_BASED_ACCESS value: "false" + + - it: should set allow audit logs to true when hoppscotch backend allow audit logs is enabled + set: + hoppscotch: + backend: + allowAuditLogs: true + asserts: + - containsDocument: + apiVersion: v1 + kind: ConfigMap + - equal: + path: data.ALLOW_AUDIT_LOGS + value: "true" + + - it: should set allow audit logs to false when hoppscotch backend allow audit logs is disabled + set: + hoppscotch: + backend: + allowAuditLogs: false + asserts: + - containsDocument: + apiVersion: v1 + kind: ConfigMap + - equal: + path: data.ALLOW_AUDIT_LOGS + value: "false" + + - it: should set allow audit logs to true when hoppscotch backend clickhouse allow audit logs is enabled + set: + hoppscotch: + backend: + clickhouse: + allowAuditLogs: true + asserts: + - containsDocument: + apiVersion: v1 + kind: ConfigMap + - equal: + path: data.ALLOW_AUDIT_LOGS + value: "true" + + - it: should set allow audit logs to false when hoppscotch backend clickhouse allow audit logs is disabled + set: + hoppscotch: + backend: + clickhouse: + allowAuditLogs: false + asserts: + - containsDocument: + apiVersion: v1 + kind: ConfigMap + - equal: + path: data.ALLOW_AUDIT_LOGS + value: "false" + + - it: should set clickhouse host to clickhouse values + set: + clickhouse: + enabled: true + asserts: + - containsDocument: + apiVersion: v1 + kind: ConfigMap + - equal: + path: data.CLICKHOUSE_HOST + value: RELEASE-NAME-clickhouse.NAMESPACE.svc.cluster.local:8123 + + - it: should set clickhouse host to external clickhouse values with default port + set: + externalClickhouse: + host: external-clickhouse + asserts: + - containsDocument: + apiVersion: v1 + kind: ConfigMap + - equal: + path: data.CLICKHOUSE_HOST + value: external-clickhouse:8123 + + - it: should set clickhouse host to external clickhouse values with custom port + set: + externalClickhouse: + host: external-clickhouse + port: 1234 + asserts: + - containsDocument: + apiVersion: v1 + kind: ConfigMap + - equal: + path: data.CLICKHOUSE_HOST + value: external-clickhouse:1234 diff --git a/charts/hoppscotch/tests/database_url_test.yaml b/charts/hoppscotch/tests/database_url_test.yaml deleted file mode 100644 index 0ddab01..0000000 --- a/charts/hoppscotch/tests/database_url_test.yaml +++ /dev/null @@ -1,219 +0,0 @@ -# yamllint disable rule:line-length -suite: Database URL -templates: - - secrets.yaml -values: - - ../values.yaml -tests: - - it: should use user-provided database URL when backend.databaseUrl is set - template: secrets.yaml - set: - hoppscotch: - backend: - databaseUrl: postgres://custom-user:custom-pass@custom-host:9999/custom-db - documentIndex: 0 - asserts: - - containsDocument: - apiVersion: v1 - kind: Secret - - equal: - path: data.DATABASE_URL - value: cG9zdGdyZXM6Ly9jdXN0b20tdXNlcjpjdXN0b20tcGFzc0BjdXN0b20taG9zdDo5OTk5L2N1c3RvbS1kYg== # base64 of postgres://custom-user:custom-pass@custom-host:9999/custom-db - - - it: should generate database URL from PostgreSQL chart when enabled and no user URL - template: secrets.yaml - set: - hoppscotch: - backend: - databaseUrl: "" - postgresql: - enabled: true - auth: - username: hoppscotch - password: mypassword - database: hoppscotch - documentIndex: 0 - asserts: - - containsDocument: - apiVersion: v1 - kind: Secret - - equal: - path: data.DATABASE_URL - value: cG9zdGdyZXM6Ly9ob3Bwc2NvdGNoOm15cGFzc3dvcmRAUkVMRUFTRS1OQU1FLXBvc3RncmVzcWwuTkFNRVNQQUNFLnN2Yy5jbHVzdGVyLmxvY2FsOjU0MzIvaG9wcHNjb3RjaA== # echo -n 'postgres://hoppscotch:mypassword@release-name-postgresql.NAMESPACE.svc.cluster.local:5432/hoppscotch' | base64 - - - it: should generate database URL from external database config when PostgreSQL disabled - template: secrets.yaml - set: - hoppscotch: - backend: - databaseUrl: "" - postgresql: - enabled: false - externalDatabase: - host: external-postgres - port: 5432 - user: myuser - password: mypass - database: mydb - documentIndex: 0 - asserts: - - containsDocument: - apiVersion: v1 - kind: Secret - - equal: - path: data.DATABASE_URL - value: cG9zdGdyZXM6Ly9teXVzZXI6bXlwYXNzQGV4dGVybmFsLXBvc3RncmVzOjU0MzIvbXlkYg== # echo -n 'postgres://myuser:mypass@external-postgres:5432/mydb' | base64 - - - it: should use direct SQL connection string when provided - template: secrets.yaml - set: - hoppscotch: - backend: - databaseUrl: "" - postgresql: - enabled: false - externalDatabase: - sqlConnection: postgresql://user:pass@custom-host:1234/customdb - documentIndex: 0 - asserts: - - containsDocument: - apiVersion: v1 - kind: Secret - - equal: - path: data.DATABASE_URL - value: cG9zdGdyZXNxbDovL3VzZXI6cGFzc0BjdXN0b20taG9zdDoxMjM0L2N1c3RvbWRi # echo -n 'postgresql://user:pass@custom-host:1234/customdb' | base64 - - - it: should handle custom port for external database - template: secrets.yaml - set: - hoppscotch: - backend: - databaseUrl: "" - postgresql: - enabled: false - externalDatabase: - host: external-postgres - port: 3306 - user: testuser - password: testpass - database: testdb - documentIndex: 0 - asserts: - - containsDocument: - apiVersion: v1 - kind: Secret - - equal: - path: data.DATABASE_URL - value: cG9zdGdyZXM6Ly90ZXN0dXNlcjp0ZXN0cGFzc0BleHRlcm5hbC1wb3N0Z3JlczozMzA2L3Rlc3RkYg== # echo -n 'postgres://testuser:testpass@external-postgres:3306/testdb' | base64 - - - it: should default to port 5432 when not specified for external database - template: secrets.yaml - set: - backend: - databaseUrl: "" - postgresql: - enabled: false - externalDatabase: - host: external-postgres - user: testuser - password: testpass - database: testdb - documentIndex: 0 - asserts: - - containsDocument: - apiVersion: v1 - kind: Secret - - equal: - path: data.DATABASE_URL - value: cG9zdGdyZXM6Ly90ZXN0dXNlcjp0ZXN0cGFzc0BleHRlcm5hbC1wb3N0Z3Jlczo1NDMyL3Rlc3RkYg== # echo -n 'postgres://testuser:testpass@external-postgres:5432/testdb' | base64 - - - it: should handle empty password for PostgreSQL chart - template: secrets.yaml - set: - backend: - databaseUrl: "" - postgresql: - enabled: true - auth: - username: hoppscotch - password: "" - database: hoppscotch - documentIndex: 0 - asserts: - - containsDocument: - apiVersion: v1 - kind: Secret - - equal: - path: data.DATABASE_URL - value: cG9zdGdyZXM6Ly9ob3Bwc2NvdGNoQFJFTEVBU0UtTkFNRS1wb3N0Z3Jlc3FsLk5BTUVTUEFDRS5zdmMuY2x1c3Rlci5sb2NhbDo1NDMyL2hvcHBzY290Y2g= # echo -n 'postgres://hoppscotch@release-name-postgresql.NAMESPACE.svc.cluster.local:5432/hoppscotch' | base64 - - - it: should use correct namespace in database URL - set: - namespaceOverride: custom-namespace - postgresql: - enabled: true - auth: - username: hoppscotch - password: testpass123 - database: hoppscotch - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Secret - - exists: - path: data.DATABASE_URL - - equal: - path: data.DATABASE_URL - value: cG9zdGdyZXM6Ly9ob3Bwc2NvdGNoOnRlc3RwYXNzMTIzQFJFTEVBU0UtTkFNRS1wb3N0Z3Jlc3FsLmN1c3RvbS1uYW1lc3BhY2Uuc3ZjLmNsdXN0ZXIubG9jYWw6NTQzMi9ob3Bwc2NvdGNo - - - it: should generate external database URL correctly - set: - postgresql.enabled: false - externalDatabase: - host: external-db.example.com - user: testuser - password: testpass - database: testdb - port: 5433 - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Secret - - equal: - path: data.DATABASE_URL - value: cG9zdGdyZXM6Ly90ZXN0dXNlcjp0ZXN0cGFzc0BleHRlcm5hbC1kYi5leGFtcGxlLmNvbTo1NDMzL3Rlc3RkYg== - - - it: should use sqlConnection when provided - set: - postgresql: - enabled: false - externalDatabase: - sqlConnection: postgres://customuser:custompass@custom-host:5432/customdb - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Secret - - equal: - path: data.DATABASE_URL - value: cG9zdGdyZXM6Ly9jdXN0b211c2VyOmN1c3RvbXBhc3NAY3VzdG9tLWhvc3Q6NTQzMi9jdXN0b21kYg== - - - it: should handle external database with existing secret (simulated) - set: - postgresql.enabled: false - externalDatabase: - host: external-db.example.com - user: testuser - password: "" - database: testdb - existingSecret: my-db-secret - existingSecretPasswordKey: db-password - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Secret - - exists: - path: data.DATABASE_URL diff --git a/charts/hoppscotch/tests/default_init_container_wait_for_database_test.yaml b/charts/hoppscotch/tests/default_init_container_wait_for_database_test.yaml index 7ad8d49..5ba2da7 100644 --- a/charts/hoppscotch/tests/default_init_container_wait_for_database_test.yaml +++ b/charts/hoppscotch/tests/default_init_container_wait_for_database_test.yaml @@ -2,10 +2,8 @@ suite: Default Init Container Wait for Database templates: - aio/deployment.yaml - backend/deployment.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate init container when enabled template: aio/deployment.yaml diff --git a/charts/hoppscotch/tests/default_init_container_wait_for_migrations_test.yaml b/charts/hoppscotch/tests/default_init_container_wait_for_migrations_test.yaml index ded09cf..1672722 100644 --- a/charts/hoppscotch/tests/default_init_container_wait_for_migrations_test.yaml +++ b/charts/hoppscotch/tests/default_init_container_wait_for_migrations_test.yaml @@ -2,10 +2,8 @@ suite: Default Init Container Wait for Migrations templates: - aio/deployment.yaml - backend/deployment.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate init container when enabled template: aio/deployment.yaml diff --git a/charts/hoppscotch/tests/frontend_deployment_test.yaml b/charts/hoppscotch/tests/frontend_deployment_test.yaml index 7336154..47b1ec7 100644 --- a/charts/hoppscotch/tests/frontend_deployment_test.yaml +++ b/charts/hoppscotch/tests/frontend_deployment_test.yaml @@ -1,10 +1,8 @@ suite: Frontend Deployment templates: - frontend/deployment.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate deployment when deployment mode is distributed template: frontend/deployment.yaml diff --git a/charts/hoppscotch/tests/frontend_hpa_test.yaml b/charts/hoppscotch/tests/frontend_hpa_test.yaml index 91518f8..a8183d1 100644 --- a/charts/hoppscotch/tests/frontend_hpa_test.yaml +++ b/charts/hoppscotch/tests/frontend_hpa_test.yaml @@ -2,10 +2,8 @@ suite: Frontend HPA templates: - frontend/deployment.yaml - frontend/hpa.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate HPA when deployment mode is distributed and autoscaling is enabled template: frontend/hpa.yaml diff --git a/charts/hoppscotch/tests/frontend_ingress_test.yaml b/charts/hoppscotch/tests/frontend_ingress_test.yaml index 58c1553..5a60bdb 100644 --- a/charts/hoppscotch/tests/frontend_ingress_test.yaml +++ b/charts/hoppscotch/tests/frontend_ingress_test.yaml @@ -3,10 +3,8 @@ templates: - frontend/deployment.yaml - frontend/ingress.yaml - frontend/service.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate ingress when deployment mode is distributed template: frontend/ingress.yaml diff --git a/charts/hoppscotch/tests/frontend_networkpolicy_test.yaml b/charts/hoppscotch/tests/frontend_networkpolicy_test.yaml index 63b3786..c07e681 100644 --- a/charts/hoppscotch/tests/frontend_networkpolicy_test.yaml +++ b/charts/hoppscotch/tests/frontend_networkpolicy_test.yaml @@ -1,12 +1,10 @@ suite: Frontend Network Policy templates: - frontend/networkpolicy.yaml - - configmap.yaml + - config/configmap.yaml - deployment.yaml - - secrets.yaml + - config/secret.yaml - service.yaml -values: - - ../values.yaml tests: - it: should generate network policy when deployment mode is distributed and network policy is enabled template: frontend/networkpolicy.yaml diff --git a/charts/hoppscotch/tests/frontend_pdb_test.yaml b/charts/hoppscotch/tests/frontend_pdb_test.yaml index a93fcdc..571ea1e 100644 --- a/charts/hoppscotch/tests/frontend_pdb_test.yaml +++ b/charts/hoppscotch/tests/frontend_pdb_test.yaml @@ -2,10 +2,8 @@ suite: Frontend PDB templates: - frontend/deployment.yaml - frontend/pdb.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate PDB when deployment mode is distributed and PDB is enabled template: frontend/pdb.yaml diff --git a/charts/hoppscotch/tests/frontend_pvc_test.yaml b/charts/hoppscotch/tests/frontend_pvc_test.yaml index 0ff489f..32b7a65 100644 --- a/charts/hoppscotch/tests/frontend_pvc_test.yaml +++ b/charts/hoppscotch/tests/frontend_pvc_test.yaml @@ -2,10 +2,8 @@ suite: Frontend PVC templates: - frontend/deployment.yaml - frontend/pvc.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate PVC when deployment mode is distributed and persistence is enabled template: frontend/pvc.yaml diff --git a/charts/hoppscotch/tests/frontend_service_test.yaml b/charts/hoppscotch/tests/frontend_service_test.yaml index 56a8cf8..7f652b5 100644 --- a/charts/hoppscotch/tests/frontend_service_test.yaml +++ b/charts/hoppscotch/tests/frontend_service_test.yaml @@ -2,10 +2,8 @@ suite: Frontend Service templates: - frontend/deployment.yaml - frontend/service.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate service when deployment mode is distributed template: frontend/service.yaml diff --git a/charts/hoppscotch/tests/frontend_servicemonitor_test.yaml b/charts/hoppscotch/tests/frontend_servicemonitor_test.yaml index 6cecbca..2ac9c17 100644 --- a/charts/hoppscotch/tests/frontend_servicemonitor_test.yaml +++ b/charts/hoppscotch/tests/frontend_servicemonitor_test.yaml @@ -2,10 +2,8 @@ suite: Frontend Service Monitor templates: - frontend/deployment.yaml - frontend/servicemonitor.yaml - - configmap.yaml - - secrets.yaml -values: - - ../values.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should generate ServiceMonitor when deployment mode is distributed and metrics are enabled template: frontend/servicemonitor.yaml diff --git a/charts/hoppscotch/tests/migrations_job_test.yaml b/charts/hoppscotch/tests/migrations_job_test.yaml index 52bcbac..5a897e7 100644 --- a/charts/hoppscotch/tests/migrations_job_test.yaml +++ b/charts/hoppscotch/tests/migrations_job_test.yaml @@ -1,9 +1,7 @@ suite: Migrations Job templates: - migrations/job.yaml - - secrets.yaml -values: - - ../values.yaml + - config/secret.yaml tests: - it: should exist when migrations are enabled template: migrations/job.yaml diff --git a/charts/hoppscotch/tests/redis_test.yaml b/charts/hoppscotch/tests/redis_test.yaml deleted file mode 100644 index f9f395d..0000000 --- a/charts/hoppscotch/tests/redis_test.yaml +++ /dev/null @@ -1,74 +0,0 @@ -suite: Redis -templates: - - secrets.yaml -tests: - - it: should use Redis subchart when enabled - set: - redis.enabled: true - redis.auth.password: "myredispassword" - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Secret - - equal: - path: data.REDIS_URL - value: "cmVkaXM6Ly86bXlyZWRpc3Bhc3N3b3JkQFJFTEVBU0UtTkFNRS1yZWRpcy1tYXN0ZXIuTkFNRVNQQUNFLnN2Yy5jbHVzdGVyLmxvY2FsOjYzNzk=" # yamllint disable-line rule:line-length - # echo -n 'redis://:myredispassword@RELEASE-NAME-redis-master.NAMESPACE.svc.cluster.local:6379' | base64 - - - it: should use external Redis when subchart disabled - set: - redis.enabled: false - externalRedis.host: "external-redis.example.com" - externalRedis.port: 6380 - externalRedis.password: "externalpass" - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Secret - - equal: - path: data.REDIS_URL - value: "cmVkaXM6Ly86ZXh0ZXJuYWxwYXNzQGV4dGVybmFsLXJlZGlzLmV4YW1wbGUuY29tOjYzODA=" - # Decodes to: redis://:externalpass@external-redis.example.com:6380 - - - it: should use custom redisUrl when provided - set: - hoppscotch.backend.redisUrl: "redis://custom-redis:6379" - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Secret - - equal: - path: data.REDIS_URL - value: "cmVkaXM6Ly9jdXN0b20tcmVkaXM6NjM3OQ==" - # Decodes to: redis://custom-redis:6379 - - - it: should not include REDIS_URL when Redis disabled and no external config - set: - redis.enabled: false - externalRedis.host: "" - hoppscotch.backend.redisUrl: "" - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Secret - - notExists: - path: data.REDIS_URL - - - it: should handle Redis without password - set: - redis.enabled: false - externalRedis.host: "redis-no-auth.example.com" - externalRedis.password: "" - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Secret - - equal: - path: data.REDIS_URL - value: "cmVkaXM6Ly9yZWRpcy1uby1hdXRoLmV4YW1wbGUuY29tOjYzNzk=" - # Decodes to: redis://redis-no-auth.example.com:6379 diff --git a/charts/hoppscotch/tests/resources_test.yaml b/charts/hoppscotch/tests/resources_test.yaml index 4c324bd..bf601ff 100644 --- a/charts/hoppscotch/tests/resources_test.yaml +++ b/charts/hoppscotch/tests/resources_test.yaml @@ -1,8 +1,8 @@ suite: Resources Presets templates: - aio/deployment.yaml - - configmap.yaml - - secrets.yaml + - config/configmap.yaml + - config/secret.yaml tests: - it: should apply nano resource preset by default template: aio/deployment.yaml diff --git a/charts/hoppscotch/tests/secret_clickhouse_test.yaml b/charts/hoppscotch/tests/secret_clickhouse_test.yaml new file mode 100644 index 0000000..4f0d4f5 --- /dev/null +++ b/charts/hoppscotch/tests/secret_clickhouse_test.yaml @@ -0,0 +1,218 @@ +suite: Secret ClickHouse +templates: + - config/secret.yaml +tests: + - it: should set clickhouse config to clickhouse auth values + set: + clickhouse: + enabled: true + auth: + username: clickhouse-user + password: clickhouse-password + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.CLICKHOUSE_USER + value: clickhouse-user + decodeBase64: true + - equal: + path: data.CLICKHOUSE_PASSWORD + value: clickhouse-password + decodeBase64: true + + - it: should set clickhouse config to clickhouse auth values with default secret + set: + clickhouse: + enabled: true + auth: + username: clickhouse-user + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: RELEASE-NAME-clickhouse + namespace: NAMESPACE + data: + # echo -n clickhouse-password | base64 + admin-password: Y2xpY2tob3VzZS1wYXNzd29yZA== + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.CLICKHOUSE_USER + value: clickhouse-user + decodeBase64: true + - equal: + path: data.CLICKHOUSE_PASSWORD + value: clickhouse-password + decodeBase64: true + + - it: should set clickhouse config to clickhouse auth values with existing secret + set: + clickhouse: + enabled: true + auth: + username: clickhouse-user + existingSecret: clickhouse-secret + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: clickhouse-secret + namespace: NAMESPACE + data: + # echo -n clickhouse-password | base64 + admin-password: Y2xpY2tob3VzZS1wYXNzd29yZA== + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.CLICKHOUSE_USER + value: clickhouse-user + decodeBase64: true + - equal: + path: data.CLICKHOUSE_PASSWORD + value: clickhouse-password + decodeBase64: true + + - it: should set clickhouse config to clickhouse auth values with existing secret and key + set: + clickhouse: + enabled: true + auth: + username: clickhouse-user + existingSecret: clickhouse-secret + existingSecretKey: clickhouse-password + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: clickhouse-secret + namespace: NAMESPACE + data: + # echo -n clickhouse-password | base64 + clickhouse-password: Y2xpY2tob3VzZS1wYXNzd29yZA== + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.CLICKHOUSE_USER + value: clickhouse-user + decodeBase64: true + - equal: + path: data.CLICKHOUSE_PASSWORD + value: clickhouse-password + decodeBase64: true + + - it: should set clickhouse config to external clickhouse values + set: + externalClickhouse: + user: clickhouse-user + password: clickhouse-password + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.CLICKHOUSE_USER + value: clickhouse-user + decodeBase64: true + - equal: + path: data.CLICKHOUSE_PASSWORD + value: clickhouse-password + decodeBase64: true + + - it: should set clickhouse config to external clickhouse values with existing secret + set: + externalClickhouse: + user: clickhouse-user + existingSecret: clickhouse-secret + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: clickhouse-secret + namespace: NAMESPACE + data: + # echo -n clickhouse-password | base64 + password: Y2xpY2tob3VzZS1wYXNzd29yZA== + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.CLICKHOUSE_USER + value: clickhouse-user + decodeBase64: true + - equal: + path: data.CLICKHOUSE_PASSWORD + value: clickhouse-password + decodeBase64: true + + - it: should set clickhouse config to external clickhouse values with existing secret and key + set: + externalClickhouse: + user: clickhouse-user + existingSecret: clickhouse-secret + existingSecretPasswordKey: clickhouse-password + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: clickhouse-secret + namespace: NAMESPACE + data: + # echo -n clickhouse-password | base64 + clickhouse-password: Y2xpY2tob3VzZS1wYXNzd29yZA== + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.CLICKHOUSE_USER + value: clickhouse-user + decodeBase64: true + - equal: + path: data.CLICKHOUSE_PASSWORD + value: clickhouse-password + decodeBase64: true diff --git a/charts/hoppscotch/tests/secret_database_test.yaml b/charts/hoppscotch/tests/secret_database_test.yaml new file mode 100644 index 0000000..fcb836a --- /dev/null +++ b/charts/hoppscotch/tests/secret_database_test.yaml @@ -0,0 +1,329 @@ +# yamllint disable rule:line-length +suite: Secret Database +templates: + - config/secret.yaml +tests: + - it: should set database config to postgresql auth values + set: + hoppscotch: + backend: + databaseUrl: "" + postgresql: + enabled: true + auth: + username: postgresql-user + password: postgresql-password + database: postgresql-db + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.DATABASE_URL + value: postgres://postgresql-user:postgresql-password@RELEASE-NAME-postgresql.NAMESPACE.svc.cluster.local:5432/postgresql-db + decodeBase64: true + + - it: should set database config to postgresql auth values with default secret + set: + hoppscotch: + backend: + databaseUrl: "" + postgresql: + enabled: true + auth: + username: postgresql-user + password: "" + database: postgresql-db + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: RELEASE-NAME-postgresql + namespace: NAMESPACE + data: + # echo -n postgresql-password | base64 + password: cG9zdGdyZXNxbC1wYXNzd29yZA== + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.DATABASE_URL + value: postgres://postgresql-user:postgresql-password@RELEASE-NAME-postgresql.NAMESPACE.svc.cluster.local:5432/postgresql-db + decodeBase64: true + + - it: should set database config to postgresql auth values with existing secret + set: + hoppscotch: + backend: + databaseUrl: "" + postgresql: + enabled: true + auth: + username: postgresql-user + password: "" + database: postgresql-db + existingSecret: postgresql-secret + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: postgresql-secret + namespace: NAMESPACE + data: + # echo -n postgresql-password | base64 + password: cG9zdGdyZXNxbC1wYXNzd29yZA== + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.DATABASE_URL + value: postgres://postgresql-user:postgresql-password@RELEASE-NAME-postgresql.NAMESPACE.svc.cluster.local:5432/postgresql-db + decodeBase64: true + + - it: should set database config to postgresql auth values with existing secret and key + set: + hoppscotch: + backend: + databaseUrl: "" + postgresql: + enabled: true + auth: + username: postgresql-user + password: "" + database: postgresql-db + existingSecret: postgresql-secret + secretKeys: + userPasswordKey: postgresql-password + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: postgresql-secret + namespace: NAMESPACE + data: + # echo -n postgresql-password | base64 + postgresql-password: cG9zdGdyZXNxbC1wYXNzd29yZA== + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.DATABASE_URL + value: postgres://postgresql-user:postgresql-password@RELEASE-NAME-postgresql.NAMESPACE.svc.cluster.local:5432/postgresql-db + decodeBase64: true + + - it: should set database config to external database values + set: + hoppscotch: + backend: + databaseUrl: "" + postgresql: + enabled: false + externalDatabase: + host: external-postgres + port: 5432 + user: external-user + password: external-password + database: external-db + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.DATABASE_URL + value: postgres://external-user:external-password@external-postgres:5432/external-db + decodeBase64: true + + - it: should set database config to external database values with default port + set: + hoppscotch: + backend: + databaseUrl: "" + postgresql: + enabled: false + externalDatabase: + host: external-postgres + user: external-user + password: external-password + database: external-db + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.DATABASE_URL + value: postgres://external-user:external-password@external-postgres:5432/external-db + decodeBase64: true + + - it: should set database config to external database values with custom port + set: + hoppscotch: + backend: + databaseUrl: "" + postgresql: + enabled: false + externalDatabase: + host: external-postgres + port: 1234 + user: external-user + password: external-password + database: external-db + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.DATABASE_URL + value: postgres://external-user:external-password@external-postgres:1234/external-db + decodeBase64: true + + - it: should set database config to external database sql connection + set: + hoppscotch: + backend: + databaseUrl: "" + postgresql: + enabled: false + externalDatabase: + sqlConnection: postgresql://hoppscotch-external-sql-user:hoppscotch-external-sql-password@hoppscotch-external-sql-host:54325/hoppscotch-external-sql-db + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.DATABASE_URL + value: postgresql://hoppscotch-external-sql-user:hoppscotch-external-sql-password@hoppscotch-external-sql-host:54325/hoppscotch-external-sql-db + decodeBase64: true + + - it: should set database config to external database values with existing secret + set: + hoppscotch: + backend: + databaseUrl: "" + postgresql: + enabled: false + externalDatabase: + host: external-postgres + user: external-user + database: external-db + existingSecret: external-db-secret + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: external-db-secret + namespace: NAMESPACE + data: + # echo -n external-password | base64 + password: ZXh0ZXJuYWwtcGFzc3dvcmQ= + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.DATABASE_URL + value: postgres://external-user:external-password@external-postgres:5432/external-db + decodeBase64: true + + - it: should set database config to external database values with existing secret and key + set: + hoppscotch: + backend: + databaseUrl: "" + postgresql: + enabled: false + externalDatabase: + host: external-postgres + user: external-user + database: external-db + existingSecret: external-db-secret + existingSecretPasswordKey: external-db-password + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: external-db-secret + namespace: NAMESPACE + data: + # echo -n external-password | base64 + external-db-password: ZXh0ZXJuYWwtcGFzc3dvcmQ= + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.DATABASE_URL + value: postgres://external-user:external-password@external-postgres:5432/external-db + decodeBase64: true + + - it: should set database config to external database existing secret sql connection + set: + hoppscotch: + backend: + databaseUrl: "" + postgresql: + enabled: false + externalDatabase: + existingSecret: external-db-secret + existingSecretSqlConnectionKey: external-db-sql-connection + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: external-db-secret + namespace: NAMESPACE + data: + # echo -n postgres://external-user:external-password@external-postgres:5432/external-db | base64 + external-db-sql-connection: cG9zdGdyZXM6Ly9leHRlcm5hbC11c2VyOmV4dGVybmFsLXBhc3N3b3JkQGV4dGVybmFsLXBvc3RncmVzOjU0MzIvZXh0ZXJuYWwtZGI= + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.DATABASE_URL + value: postgres://external-user:external-password@external-postgres:5432/external-db + decodeBase64: true diff --git a/charts/hoppscotch/tests/secret_redis_test.yaml b/charts/hoppscotch/tests/secret_redis_test.yaml new file mode 100644 index 0000000..602c1bb --- /dev/null +++ b/charts/hoppscotch/tests/secret_redis_test.yaml @@ -0,0 +1,259 @@ +# yamllint disable rule:line-length +suite: Secret Redis +templates: + - config/secret.yaml +tests: + - it: should set redis config to redis auth values + set: + hoppscotch: + backend: + redisUrl: "" + redis: + enabled: true + auth: + password: redis-password + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.REDIS_URL + value: redis://:redis-password@RELEASE-NAME-redis-master.NAMESPACE.svc.cluster.local:6379 + decodeBase64: true + + - it: should set redis config to redis auth values with default secret + set: + hoppscotch: + backend: + redisUrl: "" + redis: + enabled: true + auth: + password: "" + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: RELEASE-NAME-redis + namespace: NAMESPACE + data: + # echo -n redis-password | base64 + redis-password: cmVkaXMtcGFzc3dvcmQ= + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.REDIS_URL + value: redis://:redis-password@RELEASE-NAME-redis-master.NAMESPACE.svc.cluster.local:6379 + decodeBase64: true + + - it: should set redis config to redis auth values with existing secret + set: + hoppscotch: + backend: + redisUrl: "" + redis: + enabled: true + auth: + password: "" + existingSecret: redis-secret + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: redis-secret + namespace: NAMESPACE + data: + # echo -n redis-password | base64 + redis-password: cmVkaXMtcGFzc3dvcmQ= + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.REDIS_URL + value: redis://:redis-password@RELEASE-NAME-redis-master.NAMESPACE.svc.cluster.local:6379 + decodeBase64: true + + - it: should set redis config to redis auth values and with existing secret and key + set: + hoppscotch: + backend: + redisUrl: "" + redis: + enabled: true + auth: + password: "" + existingSecret: redis-secret + existingSecretPasswordKey: password + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: redis-secret + namespace: NAMESPACE + data: + # echo -n redis-password | base64 + password: cmVkaXMtcGFzc3dvcmQ= + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.REDIS_URL + value: redis://:redis-password@RELEASE-NAME-redis-master.NAMESPACE.svc.cluster.local:6379 + decodeBase64: true + + - it: should set redis config to external redis values + set: + hoppscotch: + backend: + redisUrl: "" + redis: + enabled: false + externalRedis: + host: external-redis + port: 6379 + password: external-password + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.REDIS_URL + value: redis://:external-password@external-redis:6379 + decodeBase64: true + + - it: should set redis config to external redis values with default port + set: + hoppscotch: + backend: + redisUrl: "" + redis: + enabled: false + externalRedis: + host: external-redis + password: external-password + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.REDIS_URL + value: redis://:external-password@external-redis:6379 + decodeBase64: true + + - it: should set redis config to external redis values with custom port + set: + hoppscotch: + backend: + redisUrl: "" + redis: + enabled: false + externalRedis: + host: external-redis + port: 1234 + password: external-password + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.REDIS_URL + value: redis://:external-password@external-redis:1234 + decodeBase64: true + + - it: should set redis config to external redis values with existing secret + set: + hoppscotch: + backend: + redisUrl: "" + redis: + enabled: false + externalRedis: + host: external-redis + password: "" + existingSecret: redis-secret + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: redis-secret + namespace: NAMESPACE + data: + # echo -n redis-password | base64 + redis-password: cmVkaXMtcGFzc3dvcmQ= + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.REDIS_URL + value: redis://:redis-password@external-redis:6379 + decodeBase64: true + + - it: should set redis config to external redis values with existing secret and key + set: + hoppscotch: + backend: + redisUrl: "" + redis: + enabled: false + externalRedis: + host: external-redis + password: "" + existingSecret: redis-secret + existingSecretPasswordKey: password + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: redis-secret + namespace: NAMESPACE + data: + # echo -n redis-password | base64 + password: cmVkaXMtcGFzc3dvcmQ= + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.REDIS_URL + value: redis://:redis-password@external-redis:6379 + decodeBase64: true diff --git a/charts/hoppscotch/tests/secret_test.yaml b/charts/hoppscotch/tests/secret_test.yaml new file mode 100644 index 0000000..6621f04 --- /dev/null +++ b/charts/hoppscotch/tests/secret_test.yaml @@ -0,0 +1,331 @@ +suite: Secret +templates: + - config/secret.yaml +tests: + - it: should not create secret when existing secret is provided + set: + existingSecret: "my-existing-secret" + asserts: + - hasDocuments: + count: 0 + + - it: should set jwt secret + set: + hoppscotch: + backend: + authToken: + jwtSecret: hoppscotch-jwt-secret + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.JWT_SECRET + value: hoppscotch-jwt-secret + decodeBase64: true + + - it: should generate jwt secret when empty + set: + hoppscotch: + backend: + authToken: + jwtSecret: "" + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - matchRegex: + path: data.JWT_SECRET + # Match 64 random alphanumeric characters base64 encoded + pattern: "^[a-zA-Z0-9]{64}$" + decodeBase64: true + + - it: should set jwt secret with existing secret + set: + hoppscotch: + backend: + authToken: + jwtSecret: "" + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: release-name-hoppscotch + namespace: NAMESPACE + data: + # echo -n hoppscotch-jwt-secret | base64 + JWT_SECRET: aG9wcHNjb3RjaC1qd3Qtc2VjcmV0 + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.JWT_SECRET + value: hoppscotch-jwt-secret + decodeBase64: true + + - it: should set session secret + set: + hoppscotch: + backend: + authToken: + sessionSecret: hoppscotch-session-secret + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.SESSION_SECRET + value: hoppscotch-session-secret + decodeBase64: true + + - it: should generate session secret when empty + set: + hoppscotch: + backend: + authToken: + sessionSecret: "" + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - matchRegex: + path: data.SESSION_SECRET + pattern: "^[a-zA-Z0-9]{64}$" + decodeBase64: true + + - it: should set session secret with existing secret + set: + hoppscotch: + backend: + authToken: + sessionSecret: "" + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: release-name-hoppscotch + namespace: NAMESPACE + data: + # echo -n hoppscotch-session-secret | base64 + SESSION_SECRET: aG9wcHNjb3RjaC1zZXNzaW9uLXNlY3JldA== + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.SESSION_SECRET + value: hoppscotch-session-secret + decodeBase64: true + + - it: should set data encryption key + set: + hoppscotch: + backend: + dataEncryptionKey: hoppscotch-data-encryption-key + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.DATA_ENCRYPTION_KEY + value: hoppscotch-data-encryption-key + decodeBase64: true + + - it: should generate data encryption key when empty + set: + hoppscotch: + backend: + dataEncryptionKey: "" + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - matchRegex: + path: data.DATA_ENCRYPTION_KEY + pattern: "^[a-zA-Z0-9]{32}$" + decodeBase64: true + + - it: should set data encryption key with existing secret + set: + hoppscotch: + backend: + authToken: + sessionSecret: "" + kubernetesProvider: + scheme: + v1/Secret: + gvr: + version: v1 + resource: secrets + namespaced: true + objects: + - apiVersion: v1 + kind: Secret + metadata: + name: release-name-hoppscotch + namespace: NAMESPACE + data: + # echo -n hoppscotch-data-encryption-key | base64 + DATA_ENCRYPTION_KEY: aG9wcHNjb3RjaC1kYXRhLWVuY3J5cHRpb24ta2V5 + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.DATA_ENCRYPTION_KEY + value: hoppscotch-data-encryption-key + decodeBase64: true + + - it: should set github client config + set: + hoppscotch: + backend: + auth: + github: + clientId: hoppscotch-client-id + clientSecret: hoppscotch-client-secret + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.GITHUB_CLIENT_ID + value: hoppscotch-client-id + decodeBase64: true + - equal: + path: data.GITHUB_CLIENT_SECRET + value: hoppscotch-client-secret + decodeBase64: true + + - it: should set google client config + set: + hoppscotch: + backend: + auth: + google: + clientId: hoppscotch-client-id + clientSecret: hoppscotch-client-secret + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.GOOGLE_CLIENT_ID + value: hoppscotch-client-id + decodeBase64: true + - equal: + path: data.GOOGLE_CLIENT_SECRET + value: hoppscotch-client-secret + decodeBase64: true + + - it: should set microsoft client config + set: + hoppscotch: + backend: + auth: + microsoft: + clientId: hoppscotch-client-id + clientSecret: hoppscotch-client-secret + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.MICROSOFT_CLIENT_ID + value: hoppscotch-client-id + decodeBase64: true + - equal: + path: data.MICROSOFT_CLIENT_SECRET + value: hoppscotch-client-secret + decodeBase64: true + + - it: should set mailer config + set: + hoppscotch: + backend: + mailer: + smtpUrl: smtp://smtp.example.com:587 + smtpUser: smtp-user + smtpPassword: smtp-password + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.MAILER_SMTP_URL + value: smtp://smtp.example.com:587 + decodeBase64: true + - equal: + path: data.MAILER_SMTP_USER + value: smtp-user + decodeBase64: true + - equal: + path: data.MAILER_SMTP_PASSWORD + value: smtp-password + decodeBase64: true + + - it: should set oidc client config + set: + hoppscotch: + backend: + auth: + oidc: + clientId: hoppscotch-client-id + clientSecret: hoppscotch-client-secret + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.OIDC_CLIENT_ID + value: hoppscotch-client-id + decodeBase64: true + - equal: + path: data.OIDC_CLIENT_SECRET + value: hoppscotch-client-secret + decodeBase64: true + + - it: should set saml cert + set: + hoppscotch: + backend: + auth: + saml: + cert: hoppscotch-saml-cert + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.SAML_CERT + value: hoppscotch-saml-cert + decodeBase64: true + + - it: should set enterprise license key + set: + hoppscotch: + backend: + enterpriseLicenseKey: hoppscotch-enterprise-license-key + asserts: + - containsDocument: + apiVersion: v1 + kind: Secret + - equal: + path: data.ENTERPRISE_LICENSE_KEY + value: hoppscotch-enterprise-license-key + decodeBase64: true diff --git a/charts/hoppscotch/tests/secrets_test.yaml b/charts/hoppscotch/tests/secrets_test.yaml deleted file mode 100644 index d3eedfe..0000000 --- a/charts/hoppscotch/tests/secrets_test.yaml +++ /dev/null @@ -1,214 +0,0 @@ -suite: Secrets -templates: - - secrets.yaml -values: - - ../values.yaml -tests: - - it: should render backend secrets - template: secrets.yaml - set: - hoppscotch: - backend: - databaseUrl: postgresql://user:password@example.com:5432/database - authToken: - jwtSecret: jwt-secret - sessionSecret: session-secret - dataEncryptionKey: data-encryption-key - enterpriseLicenseKey: enterprise-license-key - auth: - google: - clientId: google-client-id - clientSecret: google-client-secret - github: - clientId: github-client-id - clientSecret: github-client-secret - microsoft: - clientId: microsoft-client-id - clientSecret: microsoft-client-secret - saml: - cert: |- - -----BEGIN CERTIFICATE----- - MIID... - -----END CERTIFICATE----- - oidc: - clientId: oidc-client-id - clientSecret: oidc-client-secret - mailer: - smtpUrl: smtp://user:password@smtp.example.com:465 - smtpUser: smtp-user - smtpPassword: smtp-password - clickhouse: - user: clickhouse-user - password: clickhouse-password - redisUrl: redis://user:password@redis.example.com:6379 - documentIndex: 0 - asserts: - - containsDocument: - apiVersion: v1 - kind: Secret - - equal: - path: metadata.name - value: release-name-hoppscotch - - isNotNullOrEmpty: - path: data.DATABASE_URL - - isNotNullOrEmpty: - path: data.JWT_SECRET - - isNotNullOrEmpty: - path: data.SESSION_SECRET - - isNotNullOrEmpty: - path: data.DATA_ENCRYPTION_KEY - - isNotNullOrEmpty: - path: data.GOOGLE_CLIENT_ID - - isNotNullOrEmpty: - path: data.GOOGLE_CLIENT_SECRET - - isNotNullOrEmpty: - path: data.GITHUB_CLIENT_ID - - isNotNullOrEmpty: - path: data.GITHUB_CLIENT_SECRET - - isNotNullOrEmpty: - path: data.MICROSOFT_CLIENT_ID - - isNotNullOrEmpty: - path: data.MICROSOFT_CLIENT_SECRET - - isNotNullOrEmpty: - path: data.MAILER_SMTP_URL - - isNotNullOrEmpty: - path: data.MAILER_SMTP_USER - - isNotNullOrEmpty: - path: data.MAILER_SMTP_PASSWORD - - isNotNullOrEmpty: - path: data.ENTERPRISE_LICENSE_KEY - - isNotNullOrEmpty: - path: data.SAML_CERT - - isNotNullOrEmpty: - path: data.OIDC_CLIENT_ID - - isNotNullOrEmpty: - path: data.OIDC_CLIENT_SECRET - - isNotNullOrEmpty: - path: data.CLICKHOUSE_USER - - isNotNullOrEmpty: - path: data.CLICKHOUSE_PASSWORD - - isNotNullOrEmpty: - path: data.REDIS_URL - - - it: should generate secure JWT secret when empty - set: - hoppscotch.backend.authToken.jwtSecret: "" - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Secret - - exists: - path: data.JWT_SECRET - - notEqual: - path: data.JWT_SECRET - value: "" - - - it: should generate secure session secret when empty - set: - hoppscotch.backend.authToken.sessionSecret: "" - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Secret - - exists: - path: data.SESSION_SECRET - - notEqual: - path: data.SESSION_SECRET - value: "" - - - it: should generate secure data encryption key when empty - set: - hoppscotch.backend.dataEncryptionKey: "" - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Secret - - exists: - path: data.DATA_ENCRYPTION_KEY - - notEqual: - path: data.DATA_ENCRYPTION_KEY - value: "" - - - it: should use provided JWT secret when specified - set: - hoppscotch.backend.authToken.jwtSecret: "my-custom-jwt-secret" - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Secret - - equal: - path: data.JWT_SECRET - value: "bXktY3VzdG9tLWp3dC1zZWNyZXQ=" - - - it: should use provided session secret when specified - set: - hoppscotch.backend.authToken.sessionSecret: "my-custom-session-secret" - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Secret - - equal: - path: data.SESSION_SECRET - value: "bXktY3VzdG9tLXNlc3Npb24tc2VjcmV0" - - - it: should use provided data encryption key when specified - set: - hoppscotch.backend.dataEncryptionKey: "12345678901234567890123456789012" - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Secret - - equal: - path: data.DATA_ENCRYPTION_KEY - value: "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI=" - - - it: should not create secret when existingSecret is provided - set: - existingSecret: "my-existing-secret" - asserts: - - hasDocuments: - count: 0 - - - it: should use correct secret key for custom user (password key) - set: - postgresql.enabled: true - postgresql.auth.username: "customuser" - postgresql.auth.password: "" # Empty password should trigger secret lookup - postgresql.auth.database: "customdb" - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Secret - - exists: - path: data.DATABASE_URL - # The helper should attempt to look up the "password" key for custom user - # When password is empty, it should generate a URL with the custom user but no password - - equal: - path: data.DATABASE_URL - value: >- - cG9zdGdyZXM6Ly9jdXN0b211c2VyQFJFTEVBU0UtTkFNRS1wb3N0Z3Jlc3FsLk5BTUVTUEFDRS5zdmMuY2x1c3Rlci5sb2NhbDo1NDMyL2N1c3RvbWRi - - - it: should use explicit password when provided for custom user - set: - postgresql.enabled: true - postgresql.auth.username: "customuser" - postgresql.auth.password: "explicitpass" - postgresql.auth.database: "customdb" - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Secret - - exists: - path: data.DATABASE_URL - - equal: - path: data.DATABASE_URL - value: >- - cG9zdGdyZXM6Ly9jdXN0b211c2VyOmV4cGxpY2l0cGFzc0BSRUxFQVNFLU5BTUUtcG9zdGdyZXNxbC5OQU1FU1BBQ0Uuc3ZjLmNsdXN0ZXIubG9jYWw6NTQzMi9jdXN0b21kYg== diff --git a/charts/hoppscotch/values.yaml b/charts/hoppscotch/values.yaml index 1d6cdcc..aa3ada6 100644 --- a/charts/hoppscotch/values.yaml +++ b/charts/hoppscotch/values.yaml @@ -301,8 +301,13 @@ hoppscotch: # @section -- Hoppscotch Application Parameters enterpriseLicenseKey: "" + # -- Enable audit logs collection to ClickHouse. Enterprise Edition required. + # @section -- Hoppscotch Application Parameters + allowAuditLogs: false + clickhouse: - # -- Enable audit logs collection to ClickHouse. Enterprise Edition required. + # @ignored -- Enable audit logs collection to ClickHouse. Enterprise Edition required. Deprecated: use + # `hoppscotch.backend.allowAuditLogs` instead. # @section -- Hoppscotch Application Parameters allowAuditLogs: false @@ -1828,6 +1833,10 @@ postgresql: # -- Existing secret containing PostgreSQL credentials # @section -- Database Parameters existingSecret: "" + secretKeys: + # -- Key in existing secret containing username + # @section -- Database Parameters + userPasswordKey: "" # -- PostgreSQL architecture (standalone or replication) # @section -- Database Parameters architecture: standalone @@ -1898,6 +1907,9 @@ redis: # -- Existing secret containing Redis credentials # @section -- Redis Parameters existingSecret: "" + # -- Key in existing secret containing password + # @section -- Redis Parameters + existingSecretPasswordKey: "" # -- Redis architecture (standalone or replication) # @section -- Redis Parameters architecture: standalone @@ -1977,6 +1989,9 @@ clickhouse: # -- Existing secret containing ClickHouse credentials # @section -- ClickHouse Parameters existingSecret: "" + # -- Key in existing secret containing password + # @section -- ClickHouse Parameters + existingSecretKey: "" # -- ClickHouse resource preset # @section -- ClickHouse Parameters resourcesPreset: "nano" From 97a0ac2b97e1dd0099a4e6c41db4bad6d91e28fc Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Sat, 3 Jan 2026 19:49:25 -0500 Subject: [PATCH 17/19] feat(hoppscotch): increase default resources presets to small to avoid oomkilled status --- charts/hoppscotch/README.md | 854 ++++++++++---------- charts/hoppscotch/tests/resources_test.yaml | 10 +- charts/hoppscotch/values.yaml | 26 +- 3 files changed, 445 insertions(+), 445 deletions(-) diff --git a/charts/hoppscotch/README.md b/charts/hoppscotch/README.md index 89abe6a..02e3376 100644 --- a/charts/hoppscotch/README.md +++ b/charts/hoppscotch/README.md @@ -485,442 +485,442 @@ unique for each release. This allows the job to be run multiple times without co ### Hoppscotch AIO Container Parameters -| Key | Type | Default | Description | -| ------------------------------------------------- | ------ | -------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| aio.image.repository | string | `"hoppscotch/hoppscotch"` | Hoppscotch image repository | -| aio.image.pullPolicy | string | `"IfNotPresent"` | Hoppscotch image pull policy | -| aio.image.tag | string | `""` | Hoppscotch image tag | -| aio.replicaCount | int | `1` | Number of Hoppscotch replicas | -| aio.containerPorts.http | int | `80` | Hoppscotch HTTP container port | -| aio.containerPorts.https | int | `443` | Hoppscotch HTTPS container port | -| aio.containerPorts.frontend | int | `3000` | Hoppscotch frontend container port (for multiport access mode) | -| aio.containerPorts.desktop | int | `3200` | Hoppscotch desktop container port (for multiport access mode) | -| aio.containerPorts.backend | int | `3170` | Hoppscotch backend container port (for multiport access mode) | -| aio.containerPorts.admin | int | `3100` | Hoppscotch admin container port (for multiport access mode) | -| aio.readinessProbe.enabled | bool | `true` | Enable readiness probe | -| aio.readinessProbe.initialDelaySeconds | int | `0` | Initial delay seconds for readiness probe | -| aio.readinessProbe.periodSeconds | int | `10` | Period seconds for readiness probe | -| aio.readinessProbe.timeoutSeconds | int | `1` | Timeout seconds for readiness probe | -| aio.readinessProbe.failureThreshold | int | `3` | Failure threshold for readiness probe | -| aio.readinessProbe.successThreshold | int | `1` | Success threshold for readiness probe | -| aio.customLivenessProbe | object | `{}` | Custom liveness probe that overrides the default one | -| aio.customReadinessProbe | object | `{}` | Custom readiness probe that overrides the default one | -| aio.customStartupProbe | object | `{}` | Custom startup probe that overrides the default one | -| aio.extraEnvVars | list | `[]` | Array of extra environment variables to be added to Hoppscotch containers | -| aio.extraEnvVarsCM | string | `""` | Name of existing ConfigMap containing extra environment variables | -| aio.extraEnvVarsSecret | string | `""` | Name of existing Secret containing extra environment variables | -| aio.resourcesPreset | string | `"nano"` | Set container resources according to one common preset (allowed values: nano, small, medium, large, xlarge, 2xlarge) | -| aio.resources | object | `{}` | Set container resources for Hoppscotch (overrides resourcesPreset) | -| aio.podAnnotations | object | `{}` | Annotations to add to Hoppscotch pods | -| aio.podLabels | object | `{}` | Labels to add to Hoppscotch pods | -| aio.podSecurityContext | object | `{}` | Security context for Hoppscotch pods | -| aio.securityContext | object | `{}` | Security context for Hoppscotch containers | -| aio.updateStrategy.type | string | `"RollingUpdate"` | Deployment update strategy type (RollingUpdate or Recreate) | -| aio.pdb.create | bool | `false` | Create PodDisruptionBudget for Hoppscotch deployment | -| aio.pdb.minAvailable | string | `""` | Minimum number of available pods during disruptions | -| aio.pdb.maxUnavailable | string | `""` | Maximum number of unavailable pods during disruptions | -| aio.autoscaling.enabled | bool | `false` | Enable autoscaling for Hoppscotch deployment | -| aio.autoscaling.minReplicas | int | `1` | Minimum number of Hoppscotch replicas | -| aio.autoscaling.maxReplicas | int | `100` | Maximum number of Hoppscotch replicas | -| aio.autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU utilization percentage for autoscaling | -| aio.autoscaling.targetMemoryUtilizationPercentage | int | `80` | Target memory utilization percentage for autoscaling | -| aio.nodeSelector | object | `{}` | Node labels for Hoppscotch pods assignment | -| aio.tolerations | list | `[]` | Tolerations for Hoppscotch pods assignment | -| aio.affinity | object | `{}` | Affinity for Hoppscotch pods assignment | -| aio.topologySpreadConstraints | list | `[]` | Topology spread constraints for Hoppscotch pods assignment | -| aio.volumes | list | `[]` | Extra volumes to add to Hoppscotch deployment | -| aio.volumeMounts | list | `[]` | Extra volume mounts to add to Hoppscotch containers | -| aio.service.type | string | `"ClusterIP"` | Kubernetes service type | -| aio.service.ports.http | int | `80` | Service HTTP port | -| aio.service.ports.https | int | `443` | Service HTTPS port | -| aio.service.ports.frontend | int | `3000` | Frontend service HTTP port (when multiport access is enabled) | -| aio.service.ports.desktop | int | `3200` | Desktop service HTTP port (when multiport access is enabled) | -| aio.service.ports.backend | int | `3170` | Backend service HTTP port (when multiport access is enabled) | -| aio.service.ports.admin | int | `3100` | Admin service HTTP port (when multiport access is enabled) | -| aio.service.clusterIP | string | `""` | Static cluster IP address (optional) | -| aio.service.nodePorts.http | string | `""` | NodePort for HTTP (when service type is NodePort) | -| aio.service.nodePorts.https | string | `""` | NodePort for HTTPS (when service type is NodePort) | -| aio.service.nodePorts.frontend | string | `""` | NodePort for frontend (when service type is NodePort and multiport access is enabled) | -| aio.service.nodePorts.desktop | string | `""` | NodePort for desktop (when service type is NodePort and multiport access is enabled) | -| aio.service.nodePorts.backend | string | `""` | NodePort for backend (when service type is NodePort and multiport access is enabled) | -| aio.service.nodePorts.admin | string | `""` | NodePort for admin (when service type is NodePort and multiport access is enabled) | -| aio.service.loadBalancerIP | string | `""` | Load balancer IP address (when service type is LoadBalancer) | -| aio.service.loadBalancerSourceRanges | list | `[]` | Load balancer source IP ranges (when service type is LoadBalancer) | -| aio.service.externalTrafficPolicy | string | `"Cluster"` | External traffic policy (Cluster or Local) | -| aio.service.annotations | object | `{}` | Service annotations | -| aio.service.sessionAffinity | string | `"None"` | Session affinity (None or ClientIP) | -| aio.service.sessionAffinityConfig | object | `{}` | Session affinity configuration | -| aio.service.extraPorts | list | `[]` | Extra service ports | -| aio.networkPolicy.enabled | bool | `false` | Enable NetworkPolicy for Hoppscotch pods | -| aio.networkPolicy.allowExternal | bool | `true` | Allow external traffic to Hoppscotch pods | -| aio.networkPolicy.allowExternalEgress | bool | `true` | Allow external egress traffic from Hoppscotch pods | -| aio.networkPolicy.addExternalClientAccess | bool | `true` | Add external client access to NetworkPolicy | -| aio.networkPolicy.extraIngress | list | `[]` | Extra ingress rules for NetworkPolicy | -| aio.networkPolicy.extraEgress | list | `[]` | Extra egress rules for NetworkPolicy | -| aio.networkPolicy.ingressPodMatchLabels | object | `{}` | Pod selector labels for ingress rules | -| aio.networkPolicy.ingressNSMatchLabels | object | `{}` | Namespace selector labels for ingress rules | -| aio.networkPolicy.ingressNSPodMatchLabels | object | `{}` | Namespace pod selector labels for ingress rules | -| aio.ingress.enabled | bool | `false` | Enable ingress for Hoppscotch | -| aio.ingress.ingressClassName | string | `""` | Ingress class name | -| aio.ingress.hostname | string | `"hoppscotch.local"` | Ingress hostname | -| aio.ingress.path | string | `"/"` | Ingress path | -| aio.ingress.pathType | string | `"ImplementationSpecific"` | Ingress path type | -| aio.ingress.apiVersion | string | `""` | Ingress API version | -| aio.ingress.annotations | object | `{}` | Ingress annotations | -| aio.ingress.tls | bool | `false` | Enable TLS for ingress | -| aio.ingress.selfSigned | bool | `false` | Create self-signed TLS certificates | -| aio.ingress.extraHosts | list | `[]` | Extra hostnames for ingress | -| aio.ingress.extraPaths | list | `[]` | Extra paths for ingress | -| aio.ingress.extraTls | list | `[]` | Extra TLS configurations for ingress | -| aio.ingress.secrets | list | `[]` | TLS secrets for ingress | -| aio.ingress.extraRules | list | `[]` | Extra ingress rules | -| aio.persistence.enabled | bool | `false` | Enable persistent storage for Hoppscotch | -| aio.persistence.storageClass | string | `""` | Storage class for persistent volume | -| aio.persistence.accessModes | list | `["ReadWriteOnce"]` | Access modes for persistent volume | -| aio.persistence.size | string | `"8Gi"` | Size of persistent volume | -| aio.persistence.mountPath | string | `"/hoppscotch/data"` | Mount path for persistent volume | -| aio.persistence.subPath | string | `""` | Subpath within persistent volume | -| aio.persistence.annotations | object | `{}` | Annotations for persistent volume claim | -| aio.persistence.dataSource | object | `{}` | Data source for persistent volume | -| aio.persistence.existingClaim | string | `""` | Use existing persistent volume claim | -| aio.persistence.selector | object | `{}` | Selector for persistent volume | -| aio.metrics.enabled | bool | `false` | Enable metrics collection for Hoppscotch | -| aio.metrics.serviceMonitor.enabled | bool | `false` | Enable ServiceMonitor for Prometheus monitoring | -| aio.metrics.serviceMonitor.namespace | string | `""` | Namespace for ServiceMonitor (defaults to release namespace) | -| aio.metrics.serviceMonitor.annotations | object | `{}` | ServiceMonitor annotations | -| aio.metrics.serviceMonitor.labels | object | `{}` | ServiceMonitor labels | -| aio.metrics.serviceMonitor.jobLabel | string | `""` | ServiceMonitor job label | -| aio.metrics.serviceMonitor.honorLabels | bool | `false` | Honor labels from target | -| aio.metrics.serviceMonitor.interval | string | `""` | ServiceMonitor scrape interval | -| aio.metrics.serviceMonitor.scrapeTimeout | string | `""` | ServiceMonitor scrape timeout | -| aio.metrics.serviceMonitor.tlsConfig | object | `{}` | ServiceMonitor TLS configuration | -| aio.metrics.serviceMonitor.metricsRelabelings | list | `[]` | ServiceMonitor metrics relabelings | -| aio.metrics.serviceMonitor.relabelings | list | `[]` | ServiceMonitor relabelings | -| aio.metrics.serviceMonitor.selector | object | `{}` | ServiceMonitor selector | +| Key | Type | Default | Description | +| ------------------------------------------------- | ------ | -------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| aio.image.repository | string | `"hoppscotch/hoppscotch"` | Hoppscotch image repository | +| aio.image.pullPolicy | string | `"IfNotPresent"` | Hoppscotch image pull policy | +| aio.image.tag | string | `""` | Hoppscotch image tag | +| aio.replicaCount | int | `1` | Number of Hoppscotch replicas | +| aio.containerPorts.http | int | `80` | Hoppscotch HTTP container port | +| aio.containerPorts.https | int | `443` | Hoppscotch HTTPS container port | +| aio.containerPorts.frontend | int | `3000` | Hoppscotch frontend container port (for multiport access mode) | +| aio.containerPorts.desktop | int | `3200` | Hoppscotch desktop container port (for multiport access mode) | +| aio.containerPorts.backend | int | `3170` | Hoppscotch backend container port (for multiport access mode) | +| aio.containerPorts.admin | int | `3100` | Hoppscotch admin container port (for multiport access mode) | +| aio.readinessProbe.enabled | bool | `true` | Enable readiness probe | +| aio.readinessProbe.initialDelaySeconds | int | `0` | Initial delay seconds for readiness probe | +| aio.readinessProbe.periodSeconds | int | `10` | Period seconds for readiness probe | +| aio.readinessProbe.timeoutSeconds | int | `1` | Timeout seconds for readiness probe | +| aio.readinessProbe.failureThreshold | int | `3` | Failure threshold for readiness probe | +| aio.readinessProbe.successThreshold | int | `1` | Success threshold for readiness probe | +| aio.customLivenessProbe | object | `{}` | Custom liveness probe that overrides the default one | +| aio.customReadinessProbe | object | `{}` | Custom readiness probe that overrides the default one | +| aio.customStartupProbe | object | `{}` | Custom startup probe that overrides the default one | +| aio.extraEnvVars | list | `[]` | Array of extra environment variables to be added to Hoppscotch containers | +| aio.extraEnvVarsCM | string | `""` | Name of existing ConfigMap containing extra environment variables | +| aio.extraEnvVarsSecret | string | `""` | Name of existing Secret containing extra environment variables | +| aio.resourcesPreset | string | `"small"` | Set container resources according to one common preset (allowed values: nano, micro, small, medium, large, xlarge, 2xlarge) | +| aio.resources | object | `{}` | Set container resources for Hoppscotch (overrides resourcesPreset) | +| aio.podAnnotations | object | `{}` | Annotations to add to Hoppscotch pods | +| aio.podLabels | object | `{}` | Labels to add to Hoppscotch pods | +| aio.podSecurityContext | object | `{}` | Security context for Hoppscotch pods | +| aio.securityContext | object | `{}` | Security context for Hoppscotch containers | +| aio.updateStrategy.type | string | `"RollingUpdate"` | Deployment update strategy type (RollingUpdate or Recreate) | +| aio.pdb.create | bool | `false` | Create PodDisruptionBudget for Hoppscotch deployment | +| aio.pdb.minAvailable | string | `""` | Minimum number of available pods during disruptions | +| aio.pdb.maxUnavailable | string | `""` | Maximum number of unavailable pods during disruptions | +| aio.autoscaling.enabled | bool | `false` | Enable autoscaling for Hoppscotch deployment | +| aio.autoscaling.minReplicas | int | `1` | Minimum number of Hoppscotch replicas | +| aio.autoscaling.maxReplicas | int | `100` | Maximum number of Hoppscotch replicas | +| aio.autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU utilization percentage for autoscaling | +| aio.autoscaling.targetMemoryUtilizationPercentage | int | `80` | Target memory utilization percentage for autoscaling | +| aio.nodeSelector | object | `{}` | Node labels for Hoppscotch pods assignment | +| aio.tolerations | list | `[]` | Tolerations for Hoppscotch pods assignment | +| aio.affinity | object | `{}` | Affinity for Hoppscotch pods assignment | +| aio.topologySpreadConstraints | list | `[]` | Topology spread constraints for Hoppscotch pods assignment | +| aio.volumes | list | `[]` | Extra volumes to add to Hoppscotch deployment | +| aio.volumeMounts | list | `[]` | Extra volume mounts to add to Hoppscotch containers | +| aio.service.type | string | `"ClusterIP"` | Kubernetes service type | +| aio.service.ports.http | int | `80` | Service HTTP port | +| aio.service.ports.https | int | `443` | Service HTTPS port | +| aio.service.ports.frontend | int | `3000` | Frontend service HTTP port (when multiport access is enabled) | +| aio.service.ports.desktop | int | `3200` | Desktop service HTTP port (when multiport access is enabled) | +| aio.service.ports.backend | int | `3170` | Backend service HTTP port (when multiport access is enabled) | +| aio.service.ports.admin | int | `3100` | Admin service HTTP port (when multiport access is enabled) | +| aio.service.clusterIP | string | `""` | Static cluster IP address (optional) | +| aio.service.nodePorts.http | string | `""` | NodePort for HTTP (when service type is NodePort) | +| aio.service.nodePorts.https | string | `""` | NodePort for HTTPS (when service type is NodePort) | +| aio.service.nodePorts.frontend | string | `""` | NodePort for frontend (when service type is NodePort and multiport access is enabled) | +| aio.service.nodePorts.desktop | string | `""` | NodePort for desktop (when service type is NodePort and multiport access is enabled) | +| aio.service.nodePorts.backend | string | `""` | NodePort for backend (when service type is NodePort and multiport access is enabled) | +| aio.service.nodePorts.admin | string | `""` | NodePort for admin (when service type is NodePort and multiport access is enabled) | +| aio.service.loadBalancerIP | string | `""` | Load balancer IP address (when service type is LoadBalancer) | +| aio.service.loadBalancerSourceRanges | list | `[]` | Load balancer source IP ranges (when service type is LoadBalancer) | +| aio.service.externalTrafficPolicy | string | `"Cluster"` | External traffic policy (Cluster or Local) | +| aio.service.annotations | object | `{}` | Service annotations | +| aio.service.sessionAffinity | string | `"None"` | Session affinity (None or ClientIP) | +| aio.service.sessionAffinityConfig | object | `{}` | Session affinity configuration | +| aio.service.extraPorts | list | `[]` | Extra service ports | +| aio.networkPolicy.enabled | bool | `false` | Enable NetworkPolicy for Hoppscotch pods | +| aio.networkPolicy.allowExternal | bool | `true` | Allow external traffic to Hoppscotch pods | +| aio.networkPolicy.allowExternalEgress | bool | `true` | Allow external egress traffic from Hoppscotch pods | +| aio.networkPolicy.addExternalClientAccess | bool | `true` | Add external client access to NetworkPolicy | +| aio.networkPolicy.extraIngress | list | `[]` | Extra ingress rules for NetworkPolicy | +| aio.networkPolicy.extraEgress | list | `[]` | Extra egress rules for NetworkPolicy | +| aio.networkPolicy.ingressPodMatchLabels | object | `{}` | Pod selector labels for ingress rules | +| aio.networkPolicy.ingressNSMatchLabels | object | `{}` | Namespace selector labels for ingress rules | +| aio.networkPolicy.ingressNSPodMatchLabels | object | `{}` | Namespace pod selector labels for ingress rules | +| aio.ingress.enabled | bool | `false` | Enable ingress for Hoppscotch | +| aio.ingress.ingressClassName | string | `""` | Ingress class name | +| aio.ingress.hostname | string | `"hoppscotch.local"` | Ingress hostname | +| aio.ingress.path | string | `"/"` | Ingress path | +| aio.ingress.pathType | string | `"ImplementationSpecific"` | Ingress path type | +| aio.ingress.apiVersion | string | `""` | Ingress API version | +| aio.ingress.annotations | object | `{}` | Ingress annotations | +| aio.ingress.tls | bool | `false` | Enable TLS for ingress | +| aio.ingress.selfSigned | bool | `false` | Create self-signed TLS certificates | +| aio.ingress.extraHosts | list | `[]` | Extra hostnames for ingress | +| aio.ingress.extraPaths | list | `[]` | Extra paths for ingress | +| aio.ingress.extraTls | list | `[]` | Extra TLS configurations for ingress | +| aio.ingress.secrets | list | `[]` | TLS secrets for ingress | +| aio.ingress.extraRules | list | `[]` | Extra ingress rules | +| aio.persistence.enabled | bool | `false` | Enable persistent storage for Hoppscotch | +| aio.persistence.storageClass | string | `""` | Storage class for persistent volume | +| aio.persistence.accessModes | list | `["ReadWriteOnce"]` | Access modes for persistent volume | +| aio.persistence.size | string | `"8Gi"` | Size of persistent volume | +| aio.persistence.mountPath | string | `"/hoppscotch/data"` | Mount path for persistent volume | +| aio.persistence.subPath | string | `""` | Subpath within persistent volume | +| aio.persistence.annotations | object | `{}` | Annotations for persistent volume claim | +| aio.persistence.dataSource | object | `{}` | Data source for persistent volume | +| aio.persistence.existingClaim | string | `""` | Use existing persistent volume claim | +| aio.persistence.selector | object | `{}` | Selector for persistent volume | +| aio.metrics.enabled | bool | `false` | Enable metrics collection for Hoppscotch | +| aio.metrics.serviceMonitor.enabled | bool | `false` | Enable ServiceMonitor for Prometheus monitoring | +| aio.metrics.serviceMonitor.namespace | string | `""` | Namespace for ServiceMonitor (defaults to release namespace) | +| aio.metrics.serviceMonitor.annotations | object | `{}` | ServiceMonitor annotations | +| aio.metrics.serviceMonitor.labels | object | `{}` | ServiceMonitor labels | +| aio.metrics.serviceMonitor.jobLabel | string | `""` | ServiceMonitor job label | +| aio.metrics.serviceMonitor.honorLabels | bool | `false` | Honor labels from target | +| aio.metrics.serviceMonitor.interval | string | `""` | ServiceMonitor scrape interval | +| aio.metrics.serviceMonitor.scrapeTimeout | string | `""` | ServiceMonitor scrape timeout | +| aio.metrics.serviceMonitor.tlsConfig | object | `{}` | ServiceMonitor TLS configuration | +| aio.metrics.serviceMonitor.metricsRelabelings | list | `[]` | ServiceMonitor metrics relabelings | +| aio.metrics.serviceMonitor.relabelings | list | `[]` | ServiceMonitor relabelings | +| aio.metrics.serviceMonitor.selector | object | `{}` | ServiceMonitor selector | ### Hoppscotch Frontend Container Parameters -| Key | Type | Default | Description | -| ------------------------------------------------------ | ------ | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| frontend.image.repository | string | `"hoppscotch/hoppscotch-frontend"` | Hoppscotch image repository | -| frontend.image.pullPolicy | string | `"IfNotPresent"` | Hoppscotch image pull policy | -| frontend.image.tag | string | `""` | Hoppscotch image tag | -| frontend.replicaCount | int | `1` | Number of Hoppscotch replicas | -| frontend.containerPorts.http | int | `80` | Hoppscotch HTTP container port | -| frontend.containerPorts.https | int | `443` | Hoppscotch HTTPS container port | -| frontend.readinessProbe.enabled | bool | `true` | Enable readiness probe | -| frontend.readinessProbe.initialDelaySeconds | int | `0` | Initial delay seconds for readiness probe | -| frontend.readinessProbe.periodSeconds | int | `10` | Period seconds for readiness probe | -| frontend.readinessProbe.timeoutSeconds | int | `1` | Timeout seconds for readiness probe | -| frontend.readinessProbe.failureThreshold | int | `3` | Failure threshold for readiness probe | -| frontend.readinessProbe.successThreshold | int | `1` | Success threshold for readiness probe | -| frontend.customLivenessProbe | object | `{}` | Custom liveness probe that overrides the default one | -| frontend.customReadinessProbe | object | `{}` | Custom readiness probe that overrides the default one | -| frontend.customStartupProbe | object | `{}` | Custom startup probe that overrides the default one | -| frontend.extraEnvVars | list | `[]` | Array of extra environment variables to be added to Hoppscotch containers | -| frontend.extraEnvVarsCM | string | `""` | Name of existing ConfigMap containing extra environment variables | -| frontend.extraEnvVarsSecret | string | `""` | Name of existing Secret containing extra environment variables | -| frontend.resourcesPreset | string | `"nano"` | Set container resources according to one common preset (allowed values: nano, small, medium, large, xlarge, 2xlarge) | -| frontend.resources | object | `{}` | Set container resources for Hoppscotch (overrides resourcesPreset) | -| frontend.podAnnotations | object | `{}` | Annotations to add to Hoppscotch pods | -| frontend.podLabels | object | `{}` | Labels to add to Hoppscotch pods | -| frontend.podSecurityContext | object | `{}` | Security context for Hoppscotch pods | -| frontend.securityContext | object | `{}` | Security context for Hoppscotch containers | -| frontend.updateStrategy.type | string | `"RollingUpdate"` | Deployment update strategy type (RollingUpdate or Recreate) | -| frontend.pdb.create | bool | `false` | Create PodDisruptionBudget for Hoppscotch deployment | -| frontend.pdb.minAvailable | string | `""` | Minimum number of available pods during disruptions | -| frontend.pdb.maxUnavailable | string | `""` | Maximum number of unavailable pods during disruptions | -| frontend.autoscaling.enabled | bool | `false` | Enable autoscaling for Hoppscotch deployment | -| frontend.autoscaling.minReplicas | int | `1` | Minimum number of Hoppscotch replicas | -| frontend.autoscaling.maxReplicas | int | `100` | Maximum number of Hoppscotch replicas | -| frontend.autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU utilization percentage for autoscaling | -| frontend.autoscaling.targetMemoryUtilizationPercentage | int | `80` | Target memory utilization percentage for autoscaling | -| frontend.nodeSelector | object | `{}` | Node labels for Hoppscotch pods assignment | -| frontend.tolerations | list | `[]` | Tolerations for Hoppscotch pods assignment | -| frontend.affinity | object | `{}` | Affinity for Hoppscotch pods assignment | -| frontend.topologySpreadConstraints | list | `[]` | Topology spread constraints for Hoppscotch pods assignment | -| frontend.volumes | list | `[]` | Extra volumes to add to Hoppscotch deployment | -| frontend.volumeMounts | list | `[]` | Extra volume mounts to add to Hoppscotch containers | -| frontend.service.type | string | `"ClusterIP"` | Kubernetes service type | -| frontend.service.ports.http | int | `80` | Service HTTP port | -| frontend.service.ports.https | int | `443` | Service HTTPS port | -| frontend.service.clusterIP | string | `""` | Static cluster IP address (optional) | -| frontend.service.nodePorts.http | string | `""` | NodePort for HTTP (when service type is NodePort) | -| frontend.service.nodePorts.https | string | `""` | NodePort for HTTPS (when service type is NodePort) | -| frontend.service.loadBalancerIP | string | `""` | Load balancer IP address (when service type is LoadBalancer) | -| frontend.service.loadBalancerSourceRanges | list | `[]` | Load balancer source IP ranges (when service type is LoadBalancer) | -| frontend.service.externalTrafficPolicy | string | `"Cluster"` | External traffic policy (Cluster or Local) | -| frontend.service.annotations | object | `{}` | Service annotations | -| frontend.service.sessionAffinity | string | `"None"` | Session affinity (None or ClientIP) | -| frontend.service.sessionAffinityConfig | object | `{}` | Session affinity configuration | -| frontend.service.extraPorts | list | `[]` | Extra service ports | -| frontend.networkPolicy.enabled | bool | `false` | Enable NetworkPolicy for Hoppscotch pods | -| frontend.networkPolicy.allowExternal | bool | `true` | Allow external traffic to Hoppscotch pods | -| frontend.networkPolicy.allowExternalEgress | bool | `true` | Allow external egress traffic from Hoppscotch pods | -| frontend.networkPolicy.addExternalClientAccess | bool | `true` | Add external client access to NetworkPolicy | -| frontend.networkPolicy.extraIngress | list | `[]` | Extra ingress rules for NetworkPolicy | -| frontend.networkPolicy.extraEgress | list | `[]` | Extra egress rules for NetworkPolicy | -| frontend.networkPolicy.ingressPodMatchLabels | object | `{}` | Pod selector labels for ingress rules | -| frontend.networkPolicy.ingressNSMatchLabels | object | `{}` | Namespace selector labels for ingress rules | -| frontend.networkPolicy.ingressNSPodMatchLabels | object | `{}` | Namespace pod selector labels for ingress rules | -| frontend.ingress.enabled | bool | `false` | Enable ingress for Hoppscotch | -| frontend.ingress.ingressClassName | string | `""` | Ingress class name | -| frontend.ingress.hostname | string | `"hoppscotch-frontend.local"` | Ingress hostname | -| frontend.ingress.path | string | `"/"` | Ingress path | -| frontend.ingress.pathType | string | `"ImplementationSpecific"` | Ingress path type | -| frontend.ingress.apiVersion | string | `""` | Ingress API version | -| frontend.ingress.annotations | object | `{}` | Ingress annotations | -| frontend.ingress.tls | bool | `false` | Enable TLS for ingress | -| frontend.ingress.selfSigned | bool | `false` | Create self-signed TLS certificates | -| frontend.ingress.extraHosts | list | `[]` | Extra hostnames for ingress | -| frontend.ingress.extraPaths | list | `[]` | Extra paths for ingress | -| frontend.ingress.extraTls | list | `[]` | Extra TLS configurations for ingress | -| frontend.ingress.secrets | list | `[]` | TLS secrets for ingress | -| frontend.ingress.extraRules | list | `[]` | Extra ingress rules | -| frontend.persistence.enabled | bool | `false` | Enable persistent storage for Hoppscotch | -| frontend.persistence.storageClass | string | `""` | Storage class for persistent volume | -| frontend.persistence.accessModes | list | `["ReadWriteOnce"]` | Access modes for persistent volume | -| frontend.persistence.size | string | `"8Gi"` | Size of persistent volume | -| frontend.persistence.mountPath | string | `"/hoppscotch/data"` | Mount path for persistent volume | -| frontend.persistence.subPath | string | `""` | Subpath within persistent volume | -| frontend.persistence.annotations | object | `{}` | Annotations for persistent volume claim | -| frontend.persistence.dataSource | object | `{}` | Data source for persistent volume | -| frontend.persistence.existingClaim | string | `""` | Use existing persistent volume claim | -| frontend.persistence.selector | object | `{}` | Selector for persistent volume | -| frontend.metrics.enabled | bool | `false` | Enable metrics collection for Hoppscotch | -| frontend.metrics.serviceMonitor.enabled | bool | `false` | Enable ServiceMonitor for Prometheus monitoring | -| frontend.metrics.serviceMonitor.namespace | string | `""` | Namespace for ServiceMonitor (defaults to release namespace) | -| frontend.metrics.serviceMonitor.annotations | object | `{}` | ServiceMonitor annotations | -| frontend.metrics.serviceMonitor.labels | object | `{}` | ServiceMonitor labels | -| frontend.metrics.serviceMonitor.jobLabel | string | `""` | ServiceMonitor job label | -| frontend.metrics.serviceMonitor.honorLabels | bool | `false` | Honor labels from target | -| frontend.metrics.serviceMonitor.interval | string | `""` | ServiceMonitor scrape interval | -| frontend.metrics.serviceMonitor.scrapeTimeout | string | `""` | ServiceMonitor scrape timeout | -| frontend.metrics.serviceMonitor.tlsConfig | object | `{}` | ServiceMonitor TLS configuration | -| frontend.metrics.serviceMonitor.metricsRelabelings | list | `[]` | ServiceMonitor metrics relabelings | -| frontend.metrics.serviceMonitor.relabelings | list | `[]` | ServiceMonitor relabelings | -| frontend.metrics.serviceMonitor.selector | object | `{}` | ServiceMonitor selector | +| Key | Type | Default | Description | +| ------------------------------------------------------ | ------ | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| frontend.image.repository | string | `"hoppscotch/hoppscotch-frontend"` | Hoppscotch image repository | +| frontend.image.pullPolicy | string | `"IfNotPresent"` | Hoppscotch image pull policy | +| frontend.image.tag | string | `""` | Hoppscotch image tag | +| frontend.replicaCount | int | `1` | Number of Hoppscotch replicas | +| frontend.containerPorts.http | int | `80` | Hoppscotch HTTP container port | +| frontend.containerPorts.https | int | `443` | Hoppscotch HTTPS container port | +| frontend.readinessProbe.enabled | bool | `true` | Enable readiness probe | +| frontend.readinessProbe.initialDelaySeconds | int | `0` | Initial delay seconds for readiness probe | +| frontend.readinessProbe.periodSeconds | int | `10` | Period seconds for readiness probe | +| frontend.readinessProbe.timeoutSeconds | int | `1` | Timeout seconds for readiness probe | +| frontend.readinessProbe.failureThreshold | int | `3` | Failure threshold for readiness probe | +| frontend.readinessProbe.successThreshold | int | `1` | Success threshold for readiness probe | +| frontend.customLivenessProbe | object | `{}` | Custom liveness probe that overrides the default one | +| frontend.customReadinessProbe | object | `{}` | Custom readiness probe that overrides the default one | +| frontend.customStartupProbe | object | `{}` | Custom startup probe that overrides the default one | +| frontend.extraEnvVars | list | `[]` | Array of extra environment variables to be added to Hoppscotch containers | +| frontend.extraEnvVarsCM | string | `""` | Name of existing ConfigMap containing extra environment variables | +| frontend.extraEnvVarsSecret | string | `""` | Name of existing Secret containing extra environment variables | +| frontend.resourcesPreset | string | `"small"` | Set container resources according to one common preset (allowed values: nano, micro, small, medium, large, xlarge, 2xlarge) | +| frontend.resources | object | `{}` | Set container resources for Hoppscotch (overrides resourcesPreset) | +| frontend.podAnnotations | object | `{}` | Annotations to add to Hoppscotch pods | +| frontend.podLabels | object | `{}` | Labels to add to Hoppscotch pods | +| frontend.podSecurityContext | object | `{}` | Security context for Hoppscotch pods | +| frontend.securityContext | object | `{}` | Security context for Hoppscotch containers | +| frontend.updateStrategy.type | string | `"RollingUpdate"` | Deployment update strategy type (RollingUpdate or Recreate) | +| frontend.pdb.create | bool | `false` | Create PodDisruptionBudget for Hoppscotch deployment | +| frontend.pdb.minAvailable | string | `""` | Minimum number of available pods during disruptions | +| frontend.pdb.maxUnavailable | string | `""` | Maximum number of unavailable pods during disruptions | +| frontend.autoscaling.enabled | bool | `false` | Enable autoscaling for Hoppscotch deployment | +| frontend.autoscaling.minReplicas | int | `1` | Minimum number of Hoppscotch replicas | +| frontend.autoscaling.maxReplicas | int | `100` | Maximum number of Hoppscotch replicas | +| frontend.autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU utilization percentage for autoscaling | +| frontend.autoscaling.targetMemoryUtilizationPercentage | int | `80` | Target memory utilization percentage for autoscaling | +| frontend.nodeSelector | object | `{}` | Node labels for Hoppscotch pods assignment | +| frontend.tolerations | list | `[]` | Tolerations for Hoppscotch pods assignment | +| frontend.affinity | object | `{}` | Affinity for Hoppscotch pods assignment | +| frontend.topologySpreadConstraints | list | `[]` | Topology spread constraints for Hoppscotch pods assignment | +| frontend.volumes | list | `[]` | Extra volumes to add to Hoppscotch deployment | +| frontend.volumeMounts | list | `[]` | Extra volume mounts to add to Hoppscotch containers | +| frontend.service.type | string | `"ClusterIP"` | Kubernetes service type | +| frontend.service.ports.http | int | `80` | Service HTTP port | +| frontend.service.ports.https | int | `443` | Service HTTPS port | +| frontend.service.clusterIP | string | `""` | Static cluster IP address (optional) | +| frontend.service.nodePorts.http | string | `""` | NodePort for HTTP (when service type is NodePort) | +| frontend.service.nodePorts.https | string | `""` | NodePort for HTTPS (when service type is NodePort) | +| frontend.service.loadBalancerIP | string | `""` | Load balancer IP address (when service type is LoadBalancer) | +| frontend.service.loadBalancerSourceRanges | list | `[]` | Load balancer source IP ranges (when service type is LoadBalancer) | +| frontend.service.externalTrafficPolicy | string | `"Cluster"` | External traffic policy (Cluster or Local) | +| frontend.service.annotations | object | `{}` | Service annotations | +| frontend.service.sessionAffinity | string | `"None"` | Session affinity (None or ClientIP) | +| frontend.service.sessionAffinityConfig | object | `{}` | Session affinity configuration | +| frontend.service.extraPorts | list | `[]` | Extra service ports | +| frontend.networkPolicy.enabled | bool | `false` | Enable NetworkPolicy for Hoppscotch pods | +| frontend.networkPolicy.allowExternal | bool | `true` | Allow external traffic to Hoppscotch pods | +| frontend.networkPolicy.allowExternalEgress | bool | `true` | Allow external egress traffic from Hoppscotch pods | +| frontend.networkPolicy.addExternalClientAccess | bool | `true` | Add external client access to NetworkPolicy | +| frontend.networkPolicy.extraIngress | list | `[]` | Extra ingress rules for NetworkPolicy | +| frontend.networkPolicy.extraEgress | list | `[]` | Extra egress rules for NetworkPolicy | +| frontend.networkPolicy.ingressPodMatchLabels | object | `{}` | Pod selector labels for ingress rules | +| frontend.networkPolicy.ingressNSMatchLabels | object | `{}` | Namespace selector labels for ingress rules | +| frontend.networkPolicy.ingressNSPodMatchLabels | object | `{}` | Namespace pod selector labels for ingress rules | +| frontend.ingress.enabled | bool | `false` | Enable ingress for Hoppscotch | +| frontend.ingress.ingressClassName | string | `""` | Ingress class name | +| frontend.ingress.hostname | string | `"hoppscotch-frontend.local"` | Ingress hostname | +| frontend.ingress.path | string | `"/"` | Ingress path | +| frontend.ingress.pathType | string | `"ImplementationSpecific"` | Ingress path type | +| frontend.ingress.apiVersion | string | `""` | Ingress API version | +| frontend.ingress.annotations | object | `{}` | Ingress annotations | +| frontend.ingress.tls | bool | `false` | Enable TLS for ingress | +| frontend.ingress.selfSigned | bool | `false` | Create self-signed TLS certificates | +| frontend.ingress.extraHosts | list | `[]` | Extra hostnames for ingress | +| frontend.ingress.extraPaths | list | `[]` | Extra paths for ingress | +| frontend.ingress.extraTls | list | `[]` | Extra TLS configurations for ingress | +| frontend.ingress.secrets | list | `[]` | TLS secrets for ingress | +| frontend.ingress.extraRules | list | `[]` | Extra ingress rules | +| frontend.persistence.enabled | bool | `false` | Enable persistent storage for Hoppscotch | +| frontend.persistence.storageClass | string | `""` | Storage class for persistent volume | +| frontend.persistence.accessModes | list | `["ReadWriteOnce"]` | Access modes for persistent volume | +| frontend.persistence.size | string | `"8Gi"` | Size of persistent volume | +| frontend.persistence.mountPath | string | `"/hoppscotch/data"` | Mount path for persistent volume | +| frontend.persistence.subPath | string | `""` | Subpath within persistent volume | +| frontend.persistence.annotations | object | `{}` | Annotations for persistent volume claim | +| frontend.persistence.dataSource | object | `{}` | Data source for persistent volume | +| frontend.persistence.existingClaim | string | `""` | Use existing persistent volume claim | +| frontend.persistence.selector | object | `{}` | Selector for persistent volume | +| frontend.metrics.enabled | bool | `false` | Enable metrics collection for Hoppscotch | +| frontend.metrics.serviceMonitor.enabled | bool | `false` | Enable ServiceMonitor for Prometheus monitoring | +| frontend.metrics.serviceMonitor.namespace | string | `""` | Namespace for ServiceMonitor (defaults to release namespace) | +| frontend.metrics.serviceMonitor.annotations | object | `{}` | ServiceMonitor annotations | +| frontend.metrics.serviceMonitor.labels | object | `{}` | ServiceMonitor labels | +| frontend.metrics.serviceMonitor.jobLabel | string | `""` | ServiceMonitor job label | +| frontend.metrics.serviceMonitor.honorLabels | bool | `false` | Honor labels from target | +| frontend.metrics.serviceMonitor.interval | string | `""` | ServiceMonitor scrape interval | +| frontend.metrics.serviceMonitor.scrapeTimeout | string | `""` | ServiceMonitor scrape timeout | +| frontend.metrics.serviceMonitor.tlsConfig | object | `{}` | ServiceMonitor TLS configuration | +| frontend.metrics.serviceMonitor.metricsRelabelings | list | `[]` | ServiceMonitor metrics relabelings | +| frontend.metrics.serviceMonitor.relabelings | list | `[]` | ServiceMonitor relabelings | +| frontend.metrics.serviceMonitor.selector | object | `{}` | ServiceMonitor selector | ### Hoppscotch Backend Container Parameters -| Key | Type | Default | Description | -| ----------------------------------------------------- | ------ | --------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| backend.image.repository | string | `"hoppscotch/hoppscotch-backend"` | Hoppscotch image repository | -| backend.image.pullPolicy | string | `"IfNotPresent"` | Hoppscotch image pull policy | -| backend.image.tag | string | `""` | Hoppscotch image tag | -| backend.replicaCount | int | `1` | Number of Hoppscotch replicas | -| backend.containerPorts.http | int | `80` | Hoppscotch HTTP container port | -| backend.containerPorts.https | int | `443` | Hoppscotch HTTPS container port | -| backend.readinessProbe.enabled | bool | `true` | Enable readiness probe | -| backend.readinessProbe.initialDelaySeconds | int | `0` | Initial delay seconds for readiness probe | -| backend.readinessProbe.periodSeconds | int | `10` | Period seconds for readiness probe | -| backend.readinessProbe.timeoutSeconds | int | `1` | Timeout seconds for readiness probe | -| backend.readinessProbe.failureThreshold | int | `3` | Failure threshold for readiness probe | -| backend.readinessProbe.successThreshold | int | `1` | Success threshold for readiness probe | -| backend.customLivenessProbe | object | `{}` | Custom liveness probe that overrides the default one | -| backend.customReadinessProbe | object | `{}` | Custom readiness probe that overrides the default one | -| backend.customStartupProbe | object | `{}` | Custom startup probe that overrides the default one | -| backend.extraEnvVars | list | `[]` | Array of extra environment variables to be added to Hoppscotch containers | -| backend.extraEnvVarsCM | string | `""` | Name of existing ConfigMap containing extra environment variables | -| backend.extraEnvVarsSecret | string | `""` | Name of existing Secret containing extra environment variables | -| backend.resourcesPreset | string | `"nano"` | Set container resources according to one common preset (allowed values: nano, small, medium, large, xlarge, 2xlarge) | -| backend.resources | object | `{}` | Set container resources for Hoppscotch (overrides resourcesPreset) | -| backend.podAnnotations | object | `{}` | Annotations to add to Hoppscotch pods | -| backend.podLabels | object | `{}` | Labels to add to Hoppscotch pods | -| backend.podSecurityContext | object | `{}` | Security context for Hoppscotch pods | -| backend.securityContext | object | `{}` | Security context for Hoppscotch containers | -| backend.updateStrategy.type | string | `"RollingUpdate"` | Deployment update strategy type (RollingUpdate or Recreate) | -| backend.pdb.create | bool | `false` | Create PodDisruptionBudget for Hoppscotch deployment | -| backend.pdb.minAvailable | string | `""` | Minimum number of available pods during disruptions | -| backend.pdb.maxUnavailable | string | `""` | Maximum number of unavailable pods during disruptions | -| backend.autoscaling.enabled | bool | `false` | Enable autoscaling for Hoppscotch deployment | -| backend.autoscaling.minReplicas | int | `1` | Minimum number of Hoppscotch replicas | -| backend.autoscaling.maxReplicas | int | `100` | Maximum number of Hoppscotch replicas | -| backend.autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU utilization percentage for autoscaling | -| backend.autoscaling.targetMemoryUtilizationPercentage | int | `80` | Target memory utilization percentage for autoscaling | -| backend.nodeSelector | object | `{}` | Node labels for Hoppscotch pods assignment | -| backend.tolerations | list | `[]` | Tolerations for Hoppscotch pods assignment | -| backend.affinity | object | `{}` | Affinity for Hoppscotch pods assignment | -| backend.topologySpreadConstraints | list | `[]` | Topology spread constraints for Hoppscotch pods assignment | -| backend.volumes | list | `[]` | Extra volumes to add to Hoppscotch deployment | -| backend.volumeMounts | list | `[]` | Extra volume mounts to add to Hoppscotch containers | -| backend.service.type | string | `"ClusterIP"` | Kubernetes service type | -| backend.service.ports.http | int | `80` | Service HTTP port | -| backend.service.ports.https | int | `443` | Service HTTPS port | -| backend.service.clusterIP | string | `""` | Static cluster IP address (optional) | -| backend.service.nodePorts.http | string | `""` | NodePort for HTTP (when service type is NodePort) | -| backend.service.nodePorts.https | string | `""` | NodePort for HTTPS (when service type is NodePort) | -| backend.service.loadBalancerIP | string | `""` | Load balancer IP address (when service type is LoadBalancer) | -| backend.service.loadBalancerSourceRanges | list | `[]` | Load balancer source IP ranges (when service type is LoadBalancer) | -| backend.service.externalTrafficPolicy | string | `"Cluster"` | External traffic policy (Cluster or Local) | -| backend.service.annotations | object | `{}` | Service annotations | -| backend.service.sessionAffinity | string | `"None"` | Session affinity (None or ClientIP) | -| backend.service.sessionAffinityConfig | object | `{}` | Session affinity configuration | -| backend.service.extraPorts | list | `[]` | Extra service ports | -| backend.networkPolicy.enabled | bool | `false` | Enable NetworkPolicy for Hoppscotch pods | -| backend.networkPolicy.allowExternal | bool | `true` | Allow external traffic to Hoppscotch pods | -| backend.networkPolicy.allowExternalEgress | bool | `true` | Allow external egress traffic from Hoppscotch pods | -| backend.networkPolicy.addExternalClientAccess | bool | `true` | Add external client access to NetworkPolicy | -| backend.networkPolicy.extraIngress | list | `[]` | Extra ingress rules for NetworkPolicy | -| backend.networkPolicy.extraEgress | list | `[]` | Extra egress rules for NetworkPolicy | -| backend.networkPolicy.ingressPodMatchLabels | object | `{}` | Pod selector labels for ingress rules | -| backend.networkPolicy.ingressNSMatchLabels | object | `{}` | Namespace selector labels for ingress rules | -| backend.networkPolicy.ingressNSPodMatchLabels | object | `{}` | Namespace pod selector labels for ingress rules | -| backend.ingress.enabled | bool | `false` | Enable ingress for Hoppscotch | -| backend.ingress.ingressClassName | string | `""` | Ingress class name | -| backend.ingress.hostname | string | `"hoppscotch-frontend.local"` | Ingress hostname | -| backend.ingress.path | string | `"/"` | Ingress path | -| backend.ingress.pathType | string | `"ImplementationSpecific"` | Ingress path type | -| backend.ingress.apiVersion | string | `""` | Ingress API version | -| backend.ingress.annotations | object | `{}` | Ingress annotations | -| backend.ingress.tls | bool | `false` | Enable TLS for ingress | -| backend.ingress.selfSigned | bool | `false` | Create self-signed TLS certificates | -| backend.ingress.extraHosts | list | `[]` | Extra hostnames for ingress | -| backend.ingress.extraPaths | list | `[]` | Extra paths for ingress | -| backend.ingress.extraTls | list | `[]` | Extra TLS configurations for ingress | -| backend.ingress.secrets | list | `[]` | TLS secrets for ingress | -| backend.ingress.extraRules | list | `[]` | Extra ingress rules | -| backend.persistence.enabled | bool | `false` | Enable persistent storage for Hoppscotch | -| backend.persistence.storageClass | string | `""` | Storage class for persistent volume | -| backend.persistence.accessModes | list | `["ReadWriteOnce"]` | Access modes for persistent volume | -| backend.persistence.size | string | `"8Gi"` | Size of persistent volume | -| backend.persistence.mountPath | string | `"/hoppscotch/data"` | Mount path for persistent volume | -| backend.persistence.subPath | string | `""` | Subpath within persistent volume | -| backend.persistence.annotations | object | `{}` | Annotations for persistent volume claim | -| backend.persistence.dataSource | object | `{}` | Data source for persistent volume | -| backend.persistence.existingClaim | string | `""` | Use existing persistent volume claim | -| backend.persistence.selector | object | `{}` | Selector for persistent volume | -| backend.metrics.enabled | bool | `false` | Enable metrics collection for Hoppscotch | -| backend.metrics.serviceMonitor.enabled | bool | `false` | Enable ServiceMonitor for Prometheus monitoring | -| backend.metrics.serviceMonitor.namespace | string | `""` | Namespace for ServiceMonitor (defaults to release namespace) | -| backend.metrics.serviceMonitor.annotations | object | `{}` | ServiceMonitor annotations | -| backend.metrics.serviceMonitor.labels | object | `{}` | ServiceMonitor labels | -| backend.metrics.serviceMonitor.jobLabel | string | `""` | ServiceMonitor job label | -| backend.metrics.serviceMonitor.honorLabels | bool | `false` | Honor labels from target | -| backend.metrics.serviceMonitor.interval | string | `""` | ServiceMonitor scrape interval | -| backend.metrics.serviceMonitor.scrapeTimeout | string | `""` | ServiceMonitor scrape timeout | -| backend.metrics.serviceMonitor.tlsConfig | object | `{}` | ServiceMonitor TLS configuration | -| backend.metrics.serviceMonitor.metricsRelabelings | list | `[]` | ServiceMonitor metrics relabelings | -| backend.metrics.serviceMonitor.relabelings | list | `[]` | ServiceMonitor relabelings | -| backend.metrics.serviceMonitor.selector | object | `{}` | ServiceMonitor selector | +| Key | Type | Default | Description | +| ----------------------------------------------------- | ------ | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| backend.image.repository | string | `"hoppscotch/hoppscotch-backend"` | Hoppscotch image repository | +| backend.image.pullPolicy | string | `"IfNotPresent"` | Hoppscotch image pull policy | +| backend.image.tag | string | `""` | Hoppscotch image tag | +| backend.replicaCount | int | `1` | Number of Hoppscotch replicas | +| backend.containerPorts.http | int | `80` | Hoppscotch HTTP container port | +| backend.containerPorts.https | int | `443` | Hoppscotch HTTPS container port | +| backend.readinessProbe.enabled | bool | `true` | Enable readiness probe | +| backend.readinessProbe.initialDelaySeconds | int | `0` | Initial delay seconds for readiness probe | +| backend.readinessProbe.periodSeconds | int | `10` | Period seconds for readiness probe | +| backend.readinessProbe.timeoutSeconds | int | `1` | Timeout seconds for readiness probe | +| backend.readinessProbe.failureThreshold | int | `3` | Failure threshold for readiness probe | +| backend.readinessProbe.successThreshold | int | `1` | Success threshold for readiness probe | +| backend.customLivenessProbe | object | `{}` | Custom liveness probe that overrides the default one | +| backend.customReadinessProbe | object | `{}` | Custom readiness probe that overrides the default one | +| backend.customStartupProbe | object | `{}` | Custom startup probe that overrides the default one | +| backend.extraEnvVars | list | `[]` | Array of extra environment variables to be added to Hoppscotch containers | +| backend.extraEnvVarsCM | string | `""` | Name of existing ConfigMap containing extra environment variables | +| backend.extraEnvVarsSecret | string | `""` | Name of existing Secret containing extra environment variables | +| backend.resourcesPreset | string | `"small"` | Set container resources according to one common preset (allowed values: nano, micro, small, medium, large, xlarge, 2xlarge) | +| backend.resources | object | `{}` | Set container resources for Hoppscotch (overrides resourcesPreset) | +| backend.podAnnotations | object | `{}` | Annotations to add to Hoppscotch pods | +| backend.podLabels | object | `{}` | Labels to add to Hoppscotch pods | +| backend.podSecurityContext | object | `{}` | Security context for Hoppscotch pods | +| backend.securityContext | object | `{}` | Security context for Hoppscotch containers | +| backend.updateStrategy.type | string | `"RollingUpdate"` | Deployment update strategy type (RollingUpdate or Recreate) | +| backend.pdb.create | bool | `false` | Create PodDisruptionBudget for Hoppscotch deployment | +| backend.pdb.minAvailable | string | `""` | Minimum number of available pods during disruptions | +| backend.pdb.maxUnavailable | string | `""` | Maximum number of unavailable pods during disruptions | +| backend.autoscaling.enabled | bool | `false` | Enable autoscaling for Hoppscotch deployment | +| backend.autoscaling.minReplicas | int | `1` | Minimum number of Hoppscotch replicas | +| backend.autoscaling.maxReplicas | int | `100` | Maximum number of Hoppscotch replicas | +| backend.autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU utilization percentage for autoscaling | +| backend.autoscaling.targetMemoryUtilizationPercentage | int | `80` | Target memory utilization percentage for autoscaling | +| backend.nodeSelector | object | `{}` | Node labels for Hoppscotch pods assignment | +| backend.tolerations | list | `[]` | Tolerations for Hoppscotch pods assignment | +| backend.affinity | object | `{}` | Affinity for Hoppscotch pods assignment | +| backend.topologySpreadConstraints | list | `[]` | Topology spread constraints for Hoppscotch pods assignment | +| backend.volumes | list | `[]` | Extra volumes to add to Hoppscotch deployment | +| backend.volumeMounts | list | `[]` | Extra volume mounts to add to Hoppscotch containers | +| backend.service.type | string | `"ClusterIP"` | Kubernetes service type | +| backend.service.ports.http | int | `80` | Service HTTP port | +| backend.service.ports.https | int | `443` | Service HTTPS port | +| backend.service.clusterIP | string | `""` | Static cluster IP address (optional) | +| backend.service.nodePorts.http | string | `""` | NodePort for HTTP (when service type is NodePort) | +| backend.service.nodePorts.https | string | `""` | NodePort for HTTPS (when service type is NodePort) | +| backend.service.loadBalancerIP | string | `""` | Load balancer IP address (when service type is LoadBalancer) | +| backend.service.loadBalancerSourceRanges | list | `[]` | Load balancer source IP ranges (when service type is LoadBalancer) | +| backend.service.externalTrafficPolicy | string | `"Cluster"` | External traffic policy (Cluster or Local) | +| backend.service.annotations | object | `{}` | Service annotations | +| backend.service.sessionAffinity | string | `"None"` | Session affinity (None or ClientIP) | +| backend.service.sessionAffinityConfig | object | `{}` | Session affinity configuration | +| backend.service.extraPorts | list | `[]` | Extra service ports | +| backend.networkPolicy.enabled | bool | `false` | Enable NetworkPolicy for Hoppscotch pods | +| backend.networkPolicy.allowExternal | bool | `true` | Allow external traffic to Hoppscotch pods | +| backend.networkPolicy.allowExternalEgress | bool | `true` | Allow external egress traffic from Hoppscotch pods | +| backend.networkPolicy.addExternalClientAccess | bool | `true` | Add external client access to NetworkPolicy | +| backend.networkPolicy.extraIngress | list | `[]` | Extra ingress rules for NetworkPolicy | +| backend.networkPolicy.extraEgress | list | `[]` | Extra egress rules for NetworkPolicy | +| backend.networkPolicy.ingressPodMatchLabels | object | `{}` | Pod selector labels for ingress rules | +| backend.networkPolicy.ingressNSMatchLabels | object | `{}` | Namespace selector labels for ingress rules | +| backend.networkPolicy.ingressNSPodMatchLabels | object | `{}` | Namespace pod selector labels for ingress rules | +| backend.ingress.enabled | bool | `false` | Enable ingress for Hoppscotch | +| backend.ingress.ingressClassName | string | `""` | Ingress class name | +| backend.ingress.hostname | string | `"hoppscotch-frontend.local"` | Ingress hostname | +| backend.ingress.path | string | `"/"` | Ingress path | +| backend.ingress.pathType | string | `"ImplementationSpecific"` | Ingress path type | +| backend.ingress.apiVersion | string | `""` | Ingress API version | +| backend.ingress.annotations | object | `{}` | Ingress annotations | +| backend.ingress.tls | bool | `false` | Enable TLS for ingress | +| backend.ingress.selfSigned | bool | `false` | Create self-signed TLS certificates | +| backend.ingress.extraHosts | list | `[]` | Extra hostnames for ingress | +| backend.ingress.extraPaths | list | `[]` | Extra paths for ingress | +| backend.ingress.extraTls | list | `[]` | Extra TLS configurations for ingress | +| backend.ingress.secrets | list | `[]` | TLS secrets for ingress | +| backend.ingress.extraRules | list | `[]` | Extra ingress rules | +| backend.persistence.enabled | bool | `false` | Enable persistent storage for Hoppscotch | +| backend.persistence.storageClass | string | `""` | Storage class for persistent volume | +| backend.persistence.accessModes | list | `["ReadWriteOnce"]` | Access modes for persistent volume | +| backend.persistence.size | string | `"8Gi"` | Size of persistent volume | +| backend.persistence.mountPath | string | `"/hoppscotch/data"` | Mount path for persistent volume | +| backend.persistence.subPath | string | `""` | Subpath within persistent volume | +| backend.persistence.annotations | object | `{}` | Annotations for persistent volume claim | +| backend.persistence.dataSource | object | `{}` | Data source for persistent volume | +| backend.persistence.existingClaim | string | `""` | Use existing persistent volume claim | +| backend.persistence.selector | object | `{}` | Selector for persistent volume | +| backend.metrics.enabled | bool | `false` | Enable metrics collection for Hoppscotch | +| backend.metrics.serviceMonitor.enabled | bool | `false` | Enable ServiceMonitor for Prometheus monitoring | +| backend.metrics.serviceMonitor.namespace | string | `""` | Namespace for ServiceMonitor (defaults to release namespace) | +| backend.metrics.serviceMonitor.annotations | object | `{}` | ServiceMonitor annotations | +| backend.metrics.serviceMonitor.labels | object | `{}` | ServiceMonitor labels | +| backend.metrics.serviceMonitor.jobLabel | string | `""` | ServiceMonitor job label | +| backend.metrics.serviceMonitor.honorLabels | bool | `false` | Honor labels from target | +| backend.metrics.serviceMonitor.interval | string | `""` | ServiceMonitor scrape interval | +| backend.metrics.serviceMonitor.scrapeTimeout | string | `""` | ServiceMonitor scrape timeout | +| backend.metrics.serviceMonitor.tlsConfig | object | `{}` | ServiceMonitor TLS configuration | +| backend.metrics.serviceMonitor.metricsRelabelings | list | `[]` | ServiceMonitor metrics relabelings | +| backend.metrics.serviceMonitor.relabelings | list | `[]` | ServiceMonitor relabelings | +| backend.metrics.serviceMonitor.selector | object | `{}` | ServiceMonitor selector | ### Hoppscotch Admin Container Parameters -| Key | Type | Default | Description | -| --------------------------------------------------- | ------ | ------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| admin.image.repository | string | `"hoppscotch/hoppscotch-admin"` | Hoppscotch image repository | -| admin.image.pullPolicy | string | `"IfNotPresent"` | Hoppscotch image pull policy | -| admin.image.tag | string | `""` | Hoppscotch image tag | -| admin.replicaCount | int | `1` | Number of Hoppscotch replicas | -| admin.containerPorts.http | int | `80` | Hoppscotch HTTP container port | -| admin.containerPorts.https | int | `443` | Hoppscotch HTTPS container port | -| admin.readinessProbe.enabled | bool | `true` | Enable readiness probe | -| admin.readinessProbe.initialDelaySeconds | int | `0` | Initial delay seconds for readiness probe | -| admin.readinessProbe.periodSeconds | int | `10` | Period seconds for readiness probe | -| admin.readinessProbe.timeoutSeconds | int | `1` | Timeout seconds for readiness probe | -| admin.readinessProbe.failureThreshold | int | `3` | Failure threshold for readiness probe | -| admin.readinessProbe.successThreshold | int | `1` | Success threshold for readiness probe | -| admin.customLivenessProbe | object | `{}` | Custom liveness probe that overrides the default one | -| admin.customReadinessProbe | object | `{}` | Custom readiness probe that overrides the default one | -| admin.customStartupProbe | object | `{}` | Custom startup probe that overrides the default one | -| admin.extraEnvVars | list | `[]` | Array of extra environment variables to be added to Hoppscotch containers | -| admin.extraEnvVarsCM | string | `""` | Name of existing ConfigMap containing extra environment variables | -| admin.extraEnvVarsSecret | string | `""` | Name of existing Secret containing extra environment variables | -| admin.resourcesPreset | string | `"nano"` | Set container resources according to one common preset (allowed values: nano, small, medium, large, xlarge, 2xlarge) | -| admin.resources | object | `{}` | Set container resources for Hoppscotch (overrides resourcesPreset) | -| admin.podAnnotations | object | `{}` | Annotations to add to Hoppscotch pods | -| admin.podLabels | object | `{}` | Labels to add to Hoppscotch pods | -| admin.podSecurityContext | object | `{}` | Security context for Hoppscotch pods | -| admin.securityContext | object | `{}` | Security context for Hoppscotch containers | -| admin.updateStrategy.type | string | `"RollingUpdate"` | Deployment update strategy type (RollingUpdate or Recreate) | -| admin.pdb.create | bool | `false` | Create PodDisruptionBudget for Hoppscotch deployment | -| admin.pdb.minAvailable | string | `""` | Minimum number of available pods during disruptions | -| admin.pdb.maxUnavailable | string | `""` | Maximum number of unavailable pods during disruptions | -| admin.autoscaling.enabled | bool | `false` | Enable autoscaling for Hoppscotch deployment | -| admin.autoscaling.minReplicas | int | `1` | Minimum number of Hoppscotch replicas | -| admin.autoscaling.maxReplicas | int | `100` | Maximum number of Hoppscotch replicas | -| admin.autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU utilization percentage for autoscaling | -| admin.autoscaling.targetMemoryUtilizationPercentage | int | `80` | Target memory utilization percentage for autoscaling | -| admin.nodeSelector | object | `{}` | Node labels for Hoppscotch pods assignment | -| admin.tolerations | list | `[]` | Tolerations for Hoppscotch pods assignment | -| admin.affinity | object | `{}` | Affinity for Hoppscotch pods assignment | -| admin.topologySpreadConstraints | list | `[]` | Topology spread constraints for Hoppscotch pods assignment | -| admin.volumes | list | `[]` | Extra volumes to add to Hoppscotch deployment | -| admin.volumeMounts | list | `[]` | Extra volume mounts to add to Hoppscotch containers | -| admin.service.type | string | `"ClusterIP"` | Kubernetes service type | -| admin.service.ports.http | int | `80` | Service HTTP port | -| admin.service.ports.https | int | `443` | Service HTTPS port | -| admin.service.clusterIP | string | `""` | Static cluster IP address (optional) | -| admin.service.nodePorts.http | string | `""` | NodePort for HTTP (when service type is NodePort) | -| admin.service.nodePorts.https | string | `""` | NodePort for HTTPS (when service type is NodePort) | -| admin.service.loadBalancerIP | string | `""` | Load balancer IP address (when service type is LoadBalancer) | -| admin.service.loadBalancerSourceRanges | list | `[]` | Load balancer source IP ranges (when service type is LoadBalancer) | -| admin.service.externalTrafficPolicy | string | `"Cluster"` | External traffic policy (Cluster or Local) | -| admin.service.annotations | object | `{}` | Service annotations | -| admin.service.sessionAffinity | string | `"None"` | Session affinity (None or ClientIP) | -| admin.service.sessionAffinityConfig | object | `{}` | Session affinity configuration | -| admin.service.extraPorts | list | `[]` | Extra service ports | -| admin.networkPolicy.enabled | bool | `false` | Enable NetworkPolicy for Hoppscotch pods | -| admin.networkPolicy.allowExternal | bool | `true` | Allow external traffic to Hoppscotch pods | -| admin.networkPolicy.allowExternalEgress | bool | `true` | Allow external egress traffic from Hoppscotch pods | -| admin.networkPolicy.addExternalClientAccess | bool | `true` | Add external client access to NetworkPolicy | -| admin.networkPolicy.extraIngress | list | `[]` | Extra ingress rules for NetworkPolicy | -| admin.networkPolicy.extraEgress | list | `[]` | Extra egress rules for NetworkPolicy | -| admin.networkPolicy.ingressPodMatchLabels | object | `{}` | Pod selector labels for ingress rules | -| admin.networkPolicy.ingressNSMatchLabels | object | `{}` | Namespace selector labels for ingress rules | -| admin.networkPolicy.ingressNSPodMatchLabels | object | `{}` | Namespace pod selector labels for ingress rules | -| admin.ingress.enabled | bool | `false` | Enable ingress for Hoppscotch | -| admin.ingress.ingressClassName | string | `""` | Ingress class name | -| admin.ingress.hostname | string | `"hoppscotch-admin.local"` | Ingress hostname | -| admin.ingress.path | string | `"/"` | Ingress path | -| admin.ingress.pathType | string | `"ImplementationSpecific"` | Ingress path type | -| admin.ingress.apiVersion | string | `""` | Ingress API version | -| admin.ingress.annotations | object | `{}` | Ingress annotations | -| admin.ingress.tls | bool | `false` | Enable TLS for ingress | -| admin.ingress.selfSigned | bool | `false` | Create self-signed TLS certificates | -| admin.ingress.extraHosts | list | `[]` | Extra hostnames for ingress | -| admin.ingress.extraPaths | list | `[]` | Extra paths for ingress | -| admin.ingress.extraTls | list | `[]` | Extra TLS configurations for ingress | -| admin.ingress.secrets | list | `[]` | TLS secrets for ingress | -| admin.ingress.extraRules | list | `[]` | Extra ingress rules | -| admin.persistence.enabled | bool | `false` | Enable persistent storage for Hoppscotch | -| admin.persistence.storageClass | string | `""` | Storage class for persistent volume | -| admin.persistence.accessModes | list | `["ReadWriteOnce"]` | Access modes for persistent volume | -| admin.persistence.size | string | `"8Gi"` | Size of persistent volume | -| admin.persistence.mountPath | string | `"/hoppscotch/data"` | Mount path for persistent volume | -| admin.persistence.subPath | string | `""` | Subpath within persistent volume | -| admin.persistence.annotations | object | `{}` | Annotations for persistent volume claim | -| admin.persistence.dataSource | object | `{}` | Data source for persistent volume | -| admin.persistence.existingClaim | string | `""` | Use existing persistent volume claim | -| admin.persistence.selector | object | `{}` | Selector for persistent volume | -| admin.metrics.enabled | bool | `false` | Enable metrics collection for Hoppscotch | -| admin.metrics.serviceMonitor.enabled | bool | `false` | Enable ServiceMonitor for Prometheus monitoring | -| admin.metrics.serviceMonitor.namespace | string | `""` | Namespace for ServiceMonitor (defaults to release namespace) | -| admin.metrics.serviceMonitor.annotations | object | `{}` | ServiceMonitor annotations | -| admin.metrics.serviceMonitor.labels | object | `{}` | ServiceMonitor labels | -| admin.metrics.serviceMonitor.jobLabel | string | `""` | ServiceMonitor job label | -| admin.metrics.serviceMonitor.honorLabels | bool | `false` | Honor labels from target | -| admin.metrics.serviceMonitor.interval | string | `""` | ServiceMonitor scrape interval | -| admin.metrics.serviceMonitor.scrapeTimeout | string | `""` | ServiceMonitor scrape timeout | -| admin.metrics.serviceMonitor.tlsConfig | object | `{}` | ServiceMonitor TLS configuration | -| admin.metrics.serviceMonitor.metricsRelabelings | list | `[]` | ServiceMonitor metrics relabelings | -| admin.metrics.serviceMonitor.relabelings | list | `[]` | ServiceMonitor relabelings | -| admin.metrics.serviceMonitor.selector | object | `{}` | ServiceMonitor selector | +| Key | Type | Default | Description | +| --------------------------------------------------- | ------ | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| admin.image.repository | string | `"hoppscotch/hoppscotch-admin"` | Hoppscotch image repository | +| admin.image.pullPolicy | string | `"IfNotPresent"` | Hoppscotch image pull policy | +| admin.image.tag | string | `""` | Hoppscotch image tag | +| admin.replicaCount | int | `1` | Number of Hoppscotch replicas | +| admin.containerPorts.http | int | `80` | Hoppscotch HTTP container port | +| admin.containerPorts.https | int | `443` | Hoppscotch HTTPS container port | +| admin.readinessProbe.enabled | bool | `true` | Enable readiness probe | +| admin.readinessProbe.initialDelaySeconds | int | `0` | Initial delay seconds for readiness probe | +| admin.readinessProbe.periodSeconds | int | `10` | Period seconds for readiness probe | +| admin.readinessProbe.timeoutSeconds | int | `1` | Timeout seconds for readiness probe | +| admin.readinessProbe.failureThreshold | int | `3` | Failure threshold for readiness probe | +| admin.readinessProbe.successThreshold | int | `1` | Success threshold for readiness probe | +| admin.customLivenessProbe | object | `{}` | Custom liveness probe that overrides the default one | +| admin.customReadinessProbe | object | `{}` | Custom readiness probe that overrides the default one | +| admin.customStartupProbe | object | `{}` | Custom startup probe that overrides the default one | +| admin.extraEnvVars | list | `[]` | Array of extra environment variables to be added to Hoppscotch containers | +| admin.extraEnvVarsCM | string | `""` | Name of existing ConfigMap containing extra environment variables | +| admin.extraEnvVarsSecret | string | `""` | Name of existing Secret containing extra environment variables | +| admin.resourcesPreset | string | `"small"` | Set container resources according to one common preset (allowed values: nano, micro, small, medium, large, xlarge, 2xlarge) | +| admin.resources | object | `{}` | Set container resources for Hoppscotch (overrides resourcesPreset) | +| admin.podAnnotations | object | `{}` | Annotations to add to Hoppscotch pods | +| admin.podLabels | object | `{}` | Labels to add to Hoppscotch pods | +| admin.podSecurityContext | object | `{}` | Security context for Hoppscotch pods | +| admin.securityContext | object | `{}` | Security context for Hoppscotch containers | +| admin.updateStrategy.type | string | `"RollingUpdate"` | Deployment update strategy type (RollingUpdate or Recreate) | +| admin.pdb.create | bool | `false` | Create PodDisruptionBudget for Hoppscotch deployment | +| admin.pdb.minAvailable | string | `""` | Minimum number of available pods during disruptions | +| admin.pdb.maxUnavailable | string | `""` | Maximum number of unavailable pods during disruptions | +| admin.autoscaling.enabled | bool | `false` | Enable autoscaling for Hoppscotch deployment | +| admin.autoscaling.minReplicas | int | `1` | Minimum number of Hoppscotch replicas | +| admin.autoscaling.maxReplicas | int | `100` | Maximum number of Hoppscotch replicas | +| admin.autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU utilization percentage for autoscaling | +| admin.autoscaling.targetMemoryUtilizationPercentage | int | `80` | Target memory utilization percentage for autoscaling | +| admin.nodeSelector | object | `{}` | Node labels for Hoppscotch pods assignment | +| admin.tolerations | list | `[]` | Tolerations for Hoppscotch pods assignment | +| admin.affinity | object | `{}` | Affinity for Hoppscotch pods assignment | +| admin.topologySpreadConstraints | list | `[]` | Topology spread constraints for Hoppscotch pods assignment | +| admin.volumes | list | `[]` | Extra volumes to add to Hoppscotch deployment | +| admin.volumeMounts | list | `[]` | Extra volume mounts to add to Hoppscotch containers | +| admin.service.type | string | `"ClusterIP"` | Kubernetes service type | +| admin.service.ports.http | int | `80` | Service HTTP port | +| admin.service.ports.https | int | `443` | Service HTTPS port | +| admin.service.clusterIP | string | `""` | Static cluster IP address (optional) | +| admin.service.nodePorts.http | string | `""` | NodePort for HTTP (when service type is NodePort) | +| admin.service.nodePorts.https | string | `""` | NodePort for HTTPS (when service type is NodePort) | +| admin.service.loadBalancerIP | string | `""` | Load balancer IP address (when service type is LoadBalancer) | +| admin.service.loadBalancerSourceRanges | list | `[]` | Load balancer source IP ranges (when service type is LoadBalancer) | +| admin.service.externalTrafficPolicy | string | `"Cluster"` | External traffic policy (Cluster or Local) | +| admin.service.annotations | object | `{}` | Service annotations | +| admin.service.sessionAffinity | string | `"None"` | Session affinity (None or ClientIP) | +| admin.service.sessionAffinityConfig | object | `{}` | Session affinity configuration | +| admin.service.extraPorts | list | `[]` | Extra service ports | +| admin.networkPolicy.enabled | bool | `false` | Enable NetworkPolicy for Hoppscotch pods | +| admin.networkPolicy.allowExternal | bool | `true` | Allow external traffic to Hoppscotch pods | +| admin.networkPolicy.allowExternalEgress | bool | `true` | Allow external egress traffic from Hoppscotch pods | +| admin.networkPolicy.addExternalClientAccess | bool | `true` | Add external client access to NetworkPolicy | +| admin.networkPolicy.extraIngress | list | `[]` | Extra ingress rules for NetworkPolicy | +| admin.networkPolicy.extraEgress | list | `[]` | Extra egress rules for NetworkPolicy | +| admin.networkPolicy.ingressPodMatchLabels | object | `{}` | Pod selector labels for ingress rules | +| admin.networkPolicy.ingressNSMatchLabels | object | `{}` | Namespace selector labels for ingress rules | +| admin.networkPolicy.ingressNSPodMatchLabels | object | `{}` | Namespace pod selector labels for ingress rules | +| admin.ingress.enabled | bool | `false` | Enable ingress for Hoppscotch | +| admin.ingress.ingressClassName | string | `""` | Ingress class name | +| admin.ingress.hostname | string | `"hoppscotch-admin.local"` | Ingress hostname | +| admin.ingress.path | string | `"/"` | Ingress path | +| admin.ingress.pathType | string | `"ImplementationSpecific"` | Ingress path type | +| admin.ingress.apiVersion | string | `""` | Ingress API version | +| admin.ingress.annotations | object | `{}` | Ingress annotations | +| admin.ingress.tls | bool | `false` | Enable TLS for ingress | +| admin.ingress.selfSigned | bool | `false` | Create self-signed TLS certificates | +| admin.ingress.extraHosts | list | `[]` | Extra hostnames for ingress | +| admin.ingress.extraPaths | list | `[]` | Extra paths for ingress | +| admin.ingress.extraTls | list | `[]` | Extra TLS configurations for ingress | +| admin.ingress.secrets | list | `[]` | TLS secrets for ingress | +| admin.ingress.extraRules | list | `[]` | Extra ingress rules | +| admin.persistence.enabled | bool | `false` | Enable persistent storage for Hoppscotch | +| admin.persistence.storageClass | string | `""` | Storage class for persistent volume | +| admin.persistence.accessModes | list | `["ReadWriteOnce"]` | Access modes for persistent volume | +| admin.persistence.size | string | `"8Gi"` | Size of persistent volume | +| admin.persistence.mountPath | string | `"/hoppscotch/data"` | Mount path for persistent volume | +| admin.persistence.subPath | string | `""` | Subpath within persistent volume | +| admin.persistence.annotations | object | `{}` | Annotations for persistent volume claim | +| admin.persistence.dataSource | object | `{}` | Data source for persistent volume | +| admin.persistence.existingClaim | string | `""` | Use existing persistent volume claim | +| admin.persistence.selector | object | `{}` | Selector for persistent volume | +| admin.metrics.enabled | bool | `false` | Enable metrics collection for Hoppscotch | +| admin.metrics.serviceMonitor.enabled | bool | `false` | Enable ServiceMonitor for Prometheus monitoring | +| admin.metrics.serviceMonitor.namespace | string | `""` | Namespace for ServiceMonitor (defaults to release namespace) | +| admin.metrics.serviceMonitor.annotations | object | `{}` | ServiceMonitor annotations | +| admin.metrics.serviceMonitor.labels | object | `{}` | ServiceMonitor labels | +| admin.metrics.serviceMonitor.jobLabel | string | `""` | ServiceMonitor job label | +| admin.metrics.serviceMonitor.honorLabels | bool | `false` | Honor labels from target | +| admin.metrics.serviceMonitor.interval | string | `""` | ServiceMonitor scrape interval | +| admin.metrics.serviceMonitor.scrapeTimeout | string | `""` | ServiceMonitor scrape timeout | +| admin.metrics.serviceMonitor.tlsConfig | object | `{}` | ServiceMonitor TLS configuration | +| admin.metrics.serviceMonitor.metricsRelabelings | list | `[]` | ServiceMonitor metrics relabelings | +| admin.metrics.serviceMonitor.relabelings | list | `[]` | ServiceMonitor relabelings | +| admin.metrics.serviceMonitor.selector | object | `{}` | ServiceMonitor selector | ### Hoppscotch Migrations Container Parameters -| Key | Type | Default | Description | -| ------------------------------------ | ------ | -------- | -------------------------------------------------------------------------------------------------------------------- | -| migrations.enabled | bool | `true` | Enable database migrations job | -| migrations.extraEnvVars | list | `[]` | Array of extra environment variables to be added to Hoppscotch containers | -| migrations.extraEnvVarsCM | string | `""` | Name of existing ConfigMap containing extra environment variables | -| migrations.extraEnvVarsSecret | string | `""` | Name of existing Secret containing extra environment variables | -| migrations.resourcesPreset | string | `"nano"` | Set container resources according to one common preset (allowed values: nano, small, medium, large, xlarge, 2xlarge) | -| migrations.resources | object | `{}` | Set container resources for Hoppscotch (overrides resourcesPreset) | -| migrations.nodeSelector | object | `{}` | Node labels for Hoppscotch pods assignment | -| migrations.tolerations | list | `[]` | Tolerations for Hoppscotch pods assignment | -| migrations.affinity | object | `{}` | Affinity for Hoppscotch pods assignment | -| migrations.topologySpreadConstraints | list | `[]` | Topology spread constraints for Hoppscotch pods assignment | +| Key | Type | Default | Description | +| ------------------------------------ | ------ | --------- | --------------------------------------------------------------------------------------------------------------------------- | +| migrations.enabled | bool | `true` | Enable database migrations job | +| migrations.extraEnvVars | list | `[]` | Array of extra environment variables to be added to Hoppscotch containers | +| migrations.extraEnvVarsCM | string | `""` | Name of existing ConfigMap containing extra environment variables | +| migrations.extraEnvVarsSecret | string | `""` | Name of existing Secret containing extra environment variables | +| migrations.resourcesPreset | string | `"small"` | Set container resources according to one common preset (allowed values: nano, micro, small, medium, large, xlarge, 2xlarge) | +| migrations.resources | object | `{}` | Set container resources for Hoppscotch (overrides resourcesPreset) | +| migrations.nodeSelector | object | `{}` | Node labels for Hoppscotch pods assignment | +| migrations.tolerations | list | `[]` | Tolerations for Hoppscotch pods assignment | +| migrations.affinity | object | `{}` | Affinity for Hoppscotch pods assignment | +| migrations.topologySpreadConstraints | list | `[]` | Topology spread constraints for Hoppscotch pods assignment | ### Default Init Containers Parameters @@ -962,7 +962,7 @@ unique for each release. This allows the job to be run multiple times without co | postgresql.auth.existingSecret | string | `""` | Existing secret containing PostgreSQL credentials | | postgresql.auth.secretKeys.userPasswordKey | string | `""` | Key in existing secret containing username | | postgresql.architecture | string | `"standalone"` | PostgreSQL architecture (standalone or replication) | -| postgresql.primary.resourcesPreset | string | `"nano"` | PostgreSQL primary resource preset | +| postgresql.primary.resourcesPreset | string | `"small"` | PostgreSQL primary resource preset | | postgresql.primary.resources | object | `{}` | PostgreSQL primary resource limits/requests | | postgresql.volumePermissions.image.repository | string | `"bitnamilegacy/os-shell"` | Volume Permissions image repository | | postgresql.metrics.image.repository | string | `"bitnamilegacy/postgres-exporter"` | PostgreSQL Prometheus Exporter image repository | @@ -987,7 +987,7 @@ unique for each release. This allows the job to be run multiple times without co | redis.auth.existingSecret | string | `""` | Existing secret containing Redis credentials | | redis.auth.existingSecretPasswordKey | string | `""` | Key in existing secret containing password | | redis.architecture | string | `"standalone"` | Redis architecture (standalone or replication) | -| redis.master.resourcesPreset | string | `"nano"` | Redis master resource preset | +| redis.master.resourcesPreset | string | `"small"` | Redis master resource preset | | redis.master.resources | object | `{}` | Redis master resource limits/requests | | redis.sentinel.image.repository | string | `"bitnamilegacy/redis-sentinel"` | Redis Sentinel image repository | | redis.metrics.image.repository | string | `"bitnamilegacy/redis-exporter"` | Redis Exporter image repository | @@ -1011,7 +1011,7 @@ unique for each release. This allows the job to be run multiple times without co | clickhouse.auth.password | string | `""` | ClickHouse password | | clickhouse.auth.existingSecret | string | `""` | Existing secret containing ClickHouse credentials | | clickhouse.auth.existingSecretKey | string | `""` | Key in existing secret containing password | -| clickhouse.resourcesPreset | string | `"nano"` | ClickHouse resource preset | +| clickhouse.resourcesPreset | string | `"small"` | ClickHouse resource preset | | clickhouse.resources | object | `{}` | ClickHouse resource limits/requests | | clickhouse.keeper.image.repository | string | `"bitnamilegacy/clickhouse-keeper"` | ClickHouse Keeper image repository | | externalClickhouse.host | string | `""` | External ClickHouse host | diff --git a/charts/hoppscotch/tests/resources_test.yaml b/charts/hoppscotch/tests/resources_test.yaml index bf601ff..793c3bf 100644 --- a/charts/hoppscotch/tests/resources_test.yaml +++ b/charts/hoppscotch/tests/resources_test.yaml @@ -4,21 +4,21 @@ templates: - config/configmap.yaml - config/secret.yaml tests: - - it: should apply nano resource preset by default + - it: should apply small resource preset by default template: aio/deployment.yaml asserts: - equal: path: spec.template.spec.containers[0].resources.limits.cpu - value: "150m" + value: "500m" - equal: path: spec.template.spec.containers[0].resources.limits.memory - value: "192Mi" + value: "512Mi" - equal: path: spec.template.spec.containers[0].resources.requests.cpu - value: "100m" + value: "250m" - equal: path: spec.template.spec.containers[0].resources.requests.memory - value: "128Mi" + value: "256Mi" - it: should apply medium resource preset when specified template: aio/deployment.yaml diff --git a/charts/hoppscotch/values.yaml b/charts/hoppscotch/values.yaml index aa3ada6..149d0a0 100644 --- a/charts/hoppscotch/values.yaml +++ b/charts/hoppscotch/values.yaml @@ -395,9 +395,9 @@ aio: # @section -- Hoppscotch AIO Container Parameters extraEnvVarsSecret: "" - # -- Set container resources according to one common preset (allowed values: nano, small, medium, large, xlarge, 2xlarge) + # -- Set container resources according to one common preset (allowed values: nano, micro, small, medium, large, xlarge, 2xlarge) # @section -- Hoppscotch AIO Container Parameters - resourcesPreset: "nano" + resourcesPreset: small # -- Set container resources for Hoppscotch (overrides resourcesPreset) # @section -- Hoppscotch AIO Container Parameters resources: {} @@ -756,9 +756,9 @@ frontend: # @section -- Hoppscotch Frontend Container Parameters extraEnvVarsSecret: "" - # -- Set container resources according to one common preset (allowed values: nano, small, medium, large, xlarge, 2xlarge) + # -- Set container resources according to one common preset (allowed values: nano, micro, small, medium, large, xlarge, 2xlarge) # @section -- Hoppscotch Frontend Container Parameters - resourcesPreset: "nano" + resourcesPreset: small # -- Set container resources for Hoppscotch (overrides resourcesPreset) # @section -- Hoppscotch Frontend Container Parameters resources: {} @@ -1093,9 +1093,9 @@ backend: # @section -- Hoppscotch Backend Container Parameters extraEnvVarsSecret: "" - # -- Set container resources according to one common preset (allowed values: nano, small, medium, large, xlarge, 2xlarge) + # -- Set container resources according to one common preset (allowed values: nano, micro, small, medium, large, xlarge, 2xlarge) # @section -- Hoppscotch Backend Container Parameters - resourcesPreset: "nano" + resourcesPreset: small # -- Set container resources for Hoppscotch (overrides resourcesPreset) # @section -- Hoppscotch Backend Container Parameters resources: {} @@ -1430,9 +1430,9 @@ admin: # @section -- Hoppscotch Admin Container Parameters extraEnvVarsSecret: "" - # -- Set container resources according to one common preset (allowed values: nano, small, medium, large, xlarge, 2xlarge) + # -- Set container resources according to one common preset (allowed values: nano, micro, small, medium, large, xlarge, 2xlarge) # @section -- Hoppscotch Admin Container Parameters - resourcesPreset: "nano" + resourcesPreset: small # -- Set container resources for Hoppscotch (overrides resourcesPreset) # @section -- Hoppscotch Admin Container Parameters resources: {} @@ -1716,9 +1716,9 @@ migrations: # @section -- Hoppscotch Migrations Container Parameters extraEnvVarsSecret: "" - # -- Set container resources according to one common preset (allowed values: nano, small, medium, large, xlarge, 2xlarge) + # -- Set container resources according to one common preset (allowed values: nano, micro, small, medium, large, xlarge, 2xlarge) # @section -- Hoppscotch Migrations Container Parameters - resourcesPreset: "nano" + resourcesPreset: small # -- Set container resources for Hoppscotch (overrides resourcesPreset) # @section -- Hoppscotch Migrations Container Parameters resources: {} @@ -1843,7 +1843,7 @@ postgresql: primary: # -- PostgreSQL primary resource preset # @section -- Database Parameters - resourcesPreset: "nano" + resourcesPreset: small # -- PostgreSQL primary resource limits/requests # @section -- Database Parameters resources: {} @@ -1916,7 +1916,7 @@ redis: master: # -- Redis master resource preset # @section -- Redis Parameters - resourcesPreset: "nano" + resourcesPreset: small # -- Redis master resource limits/requests # @section -- Redis Parameters resources: {} @@ -1994,7 +1994,7 @@ clickhouse: existingSecretKey: "" # -- ClickHouse resource preset # @section -- ClickHouse Parameters - resourcesPreset: "nano" + resourcesPreset: small # -- ClickHouse resource limits/requests # @section -- ClickHouse Parameters resources: {} From 4b60630d0ddf37223d18b24a92b28676effdcaa5 Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Mon, 5 Jan 2026 18:07:40 -0500 Subject: [PATCH 18/19] ci: bump chart testing action to v2.8.0 --- .github/workflows/lint-test.yaml | 2 +- AGENTS.md | 41 ++++++++++++++++++++++++-------- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 57e1b9b..32119f9 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -20,7 +20,7 @@ jobs: 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 diff --git a/AGENTS.md b/AGENTS.md index b8f679f..2c80a6f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -3,20 +3,40 @@ 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 `_.tpl` files +- Use subdirectories to organize templates by either container or resource group (e.g., `templates//` or + `templates//`) + +### 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 -- Use `make fmt` and `make fmt-fix` to check and fix file formatting issues -- Use `make fmt-` and `make fmt--fix` to check and fix file formatting issues for a specific file +- Run `make fmt` and `make fmt-fix` to check and fix file formatting issues +- Run `make fmt-` and `make fmt--fix` to check and fix file formatting issues for a specific file type -- Use `make lint` to check for linting issues -- Use `make lint-` to check for linting issues for a specific file type -- Use `make test` to run unit, integration, and end-to-end tests -- Use `make test-` to run specific test types -- Use `TEST_UNIT_FILES= make test-unit` to run specific unit tests +- Run `make lint` to check for linting issues +- Run `make lint-` 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-` to run specific test types +- Run `TEST_UNIT_FILES= make test-unit` to run specific unit tests ## Code style and conventions @@ -29,7 +49,7 @@ lightweight, web-based API development suite. Follow the guidelines below when w ### Unit testing - Use [helm unittest](https://github.com/helm-unittest/helm-unittest) for unit tests -- Add unit tests to `/charts//tests` for major, minor, and patch changes +- 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. @@ -39,15 +59,16 @@ lightweight, web-based API development suite. Follow the guidelines below when w ### Integration testing - Use [helm chart tests](https://helm.sh/docs/topics/chart_tests/) for integration tests -- Add integration tests to `/charts//templates/tests` to check readiness probes for each container +- 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 to `/charts//ci` for major changes +- 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 From 850c62f417fdb8c20e4bbe1d8bbdfa6784810720 Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Mon, 19 Jan 2026 11:20:00 -0500 Subject: [PATCH 19/19] docs(hoppscotch): update README install chart instructions with full stack example --- .yamlignore | 2 - .yamllint.yaml | 6 +-- charts/hoppscotch/README.md | 68 ++++++++++++++++++------------ charts/hoppscotch/README.md.gotmpl | 58 ++++++++++++++++--------- charts/hoppscotch/values.yaml | 4 +- 5 files changed, 85 insertions(+), 53 deletions(-) delete mode 100644 .yamlignore diff --git a/.yamlignore b/.yamlignore deleted file mode 100644 index d2e0c42..0000000 --- a/.yamlignore +++ /dev/null @@ -1,2 +0,0 @@ - charts/*/templates/ - charts/*/values.yaml diff --git a/.yamllint.yaml b/.yamllint.yaml index 2bb73a8..ad19958 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -1,7 +1,7 @@ extends: default -ignore-from-file: - - .gitignore - - .yamlignore +ignore: | + charts/*/templates/* + charts/*/values.yaml rules: comments: min-spaces-from-content: 1 diff --git a/charts/hoppscotch/README.md b/charts/hoppscotch/README.md index 02e3376..4956f09 100644 --- a/charts/hoppscotch/README.md +++ b/charts/hoppscotch/README.md @@ -1,7 +1,7 @@ # Hoppscotch Helm Chart -![Version: 0.2.5](https://img.shields.io/badge/Version-0.2.5-informational?style=flat-square) -![AppVersion: 2025.12.0](https://img.shields.io/badge/AppVersion-2025.12.0-informational?style=flat-square) +![Version: 0.2.6](https://img.shields.io/badge/Version-0.2.6-informational?style=flat-square) +![AppVersion: 2025.12.1](https://img.shields.io/badge/AppVersion-2025.12.1-informational?style=flat-square) Hoppscotch is a lightweight, web-based API development suite. It was built from the ground up with ease of use and accessibility in mind providing all the functionality needed for developers with minimalist, unobtrusive UI. @@ -9,7 +9,8 @@ accessibility in mind providing all the functionality needed for developers with ## TL;DR ```bash -helm install hoppscotch http://hoppscotch.github.io/helm-charts/hoppscotch +helm repo add hoppscotch https://hoppscotch.github.io/helm-charts +helm install hoppscotch hoppscotch/hoppscotch ``` ## Introduction @@ -28,18 +29,37 @@ This chart bootstraps a [Hoppscotch](https://github.com/hoppscotch/hoppscotch) d To install the chart with the release name `hoppscotch`: ```bash +# Add the Hoppscotch Helm repository helm repo add hoppscotch https://hoppscotch.github.io/helm-charts -helm install hoppscotch hoppscotch/hoppscotch + +# Install the Hoppscotch chart +helm install hoppscotch hoppscotch/hoppscotch \ +--namespace hoppscotch \ +--create-namespace \ +--set aio.ingress.enabled=true \ +--set aio.ingress.ingressClassName=nginx \ +--set aio.ingress.hostname=hoppscotch.local \ +--set postgresql.enabled=true \ +--set postgresql.auth.username=hoppscotch \ +--set postgresql.auth.password=hoppscotch \ +--set postgresql.auth.database=hoppscotch ``` -## Deployment Modes +**Note**: Replace `nginx` and `hoppscotch.local` with the ingress controller class and hostname of your choice. + +See [Configuration and Installation Details](#configuration-and-installation-details) and [Parameters](#parameters) for +more information on configuration options. + +## Configuration and Installation Details + +### Deployment Modes Hoppscotch supports two deployment modes: - **All-In-One** Using the All-In-One container which includes all services in a single container - **Distributed** Using individual containers for each service -### Using All-in-One Container +#### Using All-in-One Container To deploy Hoppscotch using the AIO container, set the `deploymentMode` to `aio` in your values file: @@ -52,7 +72,7 @@ The AIO container supports two access modes: - **Subpath Access**: Services are accessible via subpaths on a single port (80) - **Multiport Access**: Each service is accessible on its own port -#### Subpath Access +##### Subpath Access When using AIO with subpath access, services can be accessed on port 80 from the following subpaths: @@ -72,7 +92,7 @@ hoppscotch: enableSubpathBasedAccess: true ``` -#### Multiport Access +##### Multiport Access When using AIO with multiport access, services can be accessed on the following ports: @@ -92,7 +112,7 @@ hoppscotch: enableSubpathBasedAccess: false ``` -### Using Individual Containers +#### Using Individual Containers To deploy Hoppscotch using individual containers for each service, set the `deploymentMode` to `distributed` in your values file: @@ -112,7 +132,7 @@ Services can be accessed on the following ports: Note: Only multiport access is supported in distributed mode. -## Enterprise Edition +### Enterprise Edition Hoppscotch offers an Enterprise Edition with additional features and support. To enable Enterprise Edition, you must set your enterprise license key and configure containers to use the enterprise images: @@ -142,7 +162,7 @@ admin: repository: hoppscotch/hoppscotch-admin-enterprise ``` -## Auto-Generating Config URLs +### Auto-Generating Config URLs The chart automatically sets configuration URLs for the frontend, backend, and admin services based on the deployment mode and ingress configuration. @@ -193,9 +213,9 @@ aio: See below the specific environment variables that are auto-generated. -### AIO Auto-Generated Config URLs +#### AIO Auto-Generated Config URLs -#### AIO Frontend +##### AIO Frontend | Key | Value | | ----------------------- | --------------------------------------------------------------------- | @@ -206,7 +226,7 @@ See below the specific environment variables that are auto-generated. | VITE_BASE_URL | `https://${aio.ingress.hostname}/${aio.ingress.path}` | | VITE_SHORTCODE_BASE_URL | `https://${aio.ingress.hostname}/${aio.ingress.path}` | -#### AIO Backend +##### AIO Backend @@ -222,9 +242,9 @@ See below the specific environment variables that are auto-generated. -### Distributed Auto-Generated Config URLs +#### Distributed Auto-Generated Config URLs -#### Distributed Frontend +##### Distributed Frontend | Key | Value | | ----------------------- | --------------------------------------------------------------------- | @@ -235,7 +255,7 @@ See below the specific environment variables that are auto-generated. | VITE_BASE_URL | `https://${backend.ingress.hostname}/${backend.ingress.path}` | | VITE_SHORTCODE_BASE_URL | `https://${backend.ingress.hostname}/${backend.ingress.path}` | -#### Distributed Backend +##### Distributed Backend @@ -251,7 +271,7 @@ See below the specific environment variables that are auto-generated. -## Auto-Generating Secrets +### Auto-Generating Secrets The chart automatically generates secrets if not provided. These auto-generated secrets will be persisted and reused on subsequent upgrades. @@ -266,7 +286,7 @@ hoppscotch: dataEncryptionKey: "" # Random 32-character alphanumeric string used if not provided ``` -## Overriding Config Values +### Overriding Config Values You can override config values using an existing secret, extra env vars, extra configmap, or extra secret. The order of precedence of these methods is as follows (from highest to lowest): @@ -323,7 +343,7 @@ existingSecret: my-existing-secret Note: The existing secret must contain all required keys. See [templates/config/secret.yaml](templates/config/secret.yaml) for more info. -## Waiting for Database Readiness +### Waiting for Database Readiness Hoppscotch pods that connect to the database will wait for the database to be ready before starting. This is accomplished by using the `wait-for-db` and `wait-for-migrations` default init containers. @@ -350,7 +370,7 @@ defaultInitContainers: waitForMigrations: false ``` -## Running Database Migrations +### Running Database Migrations Database migrations are run automatically after installs and upgrades. The chart includes a migrations job that runs the following command: @@ -1021,10 +1041,4 @@ unique for each release. This allows the job to be run multiple times without co | externalClickhouse.existingSecret | string | `""` | Existing secret containing external ClickHouse credentials | | externalClickhouse.existingSecretPasswordKey | string | `""` | Key in existing secret containing password | -### Other Values - -| Key | Type | Default | Description | -| ----------------------------- | ------ | ------- | ----------- | -| hoppscotch.backend.clickhouse | object | `{}` | | - diff --git a/charts/hoppscotch/README.md.gotmpl b/charts/hoppscotch/README.md.gotmpl index ee98ef0..61118b9 100644 --- a/charts/hoppscotch/README.md.gotmpl +++ b/charts/hoppscotch/README.md.gotmpl @@ -9,7 +9,8 @@ ## TL;DR ```bash -helm install hoppscotch http://hoppscotch.github.io/helm-charts/hoppscotch +helm repo add hoppscotch https://hoppscotch.github.io/helm-charts +helm install hoppscotch hoppscotch/hoppscotch ``` ## Introduction @@ -28,18 +29,37 @@ This chart bootstraps a [Hoppscotch](https://github.com/hoppscotch/hoppscotch) d To install the chart with the release name `hoppscotch`: ```bash +# Add the Hoppscotch Helm repository helm repo add hoppscotch https://hoppscotch.github.io/helm-charts -helm install hoppscotch hoppscotch/hoppscotch + +# Install the Hoppscotch chart +helm install hoppscotch hoppscotch/hoppscotch \ +--namespace hoppscotch \ +--create-namespace \ +--set aio.ingress.enabled=true \ +--set aio.ingress.ingressClassName=nginx \ +--set aio.ingress.hostname=hoppscotch.local \ +--set postgresql.enabled=true \ +--set postgresql.auth.username=hoppscotch \ +--set postgresql.auth.password=hoppscotch \ +--set postgresql.auth.database=hoppscotch ``` -## Deployment Modes +**Note**: Replace `nginx` and `hoppscotch.local` with the ingress controller class and hostname of your choice. + +See [Configuration and Installation Details](#configuration-and-installation-details) and [Parameters](#parameters) for +more information on configuration options. + +## Configuration and Installation Details + +### Deployment Modes Hoppscotch supports two deployment modes: - **All-In-One** Using the All-In-One container which includes all services in a single container - **Distributed** Using individual containers for each service -### Using All-in-One Container +#### Using All-in-One Container To deploy Hoppscotch using the AIO container, set the `deploymentMode` to `aio` in your values file: @@ -52,7 +72,7 @@ The AIO container supports two access modes: - **Subpath Access**: Services are accessible via subpaths on a single port (80) - **Multiport Access**: Each service is accessible on its own port -#### Subpath Access +##### Subpath Access When using AIO with subpath access, services can be accessed on port 80 from the following subpaths: @@ -72,7 +92,7 @@ hoppscotch: enableSubpathBasedAccess: true ``` -#### Multiport Access +##### Multiport Access When using AIO with multiport access, services can be accessed on the following ports: @@ -92,7 +112,7 @@ hoppscotch: enableSubpathBasedAccess: false ``` -### Using Individual Containers +#### Using Individual Containers To deploy Hoppscotch using individual containers for each service, set the `deploymentMode` to `distributed` in your values file: @@ -112,7 +132,7 @@ Services can be accessed on the following ports: Note: Only multiport access is supported in distributed mode. -## Enterprise Edition +### Enterprise Edition Hoppscotch offers an Enterprise Edition with additional features and support. To enable Enterprise Edition, you must set your enterprise license key and configure containers to use the enterprise images: @@ -142,7 +162,7 @@ admin: repository: hoppscotch/hoppscotch-admin-enterprise ``` -## Auto-Generating Config URLs +### Auto-Generating Config URLs The chart automatically sets configuration URLs for the frontend, backend, and admin services based on the deployment mode and ingress configuration. @@ -193,9 +213,9 @@ aio: See below the specific environment variables that are auto-generated. -### AIO Auto-Generated Config URLs +#### AIO Auto-Generated Config URLs -#### AIO Frontend +##### AIO Frontend | Key | Value | | ----------------------- | --------------------------------------------------------------------- | @@ -206,7 +226,7 @@ See below the specific environment variables that are auto-generated. | VITE_BASE_URL | `https://${aio.ingress.hostname}/${aio.ingress.path}` | | VITE_SHORTCODE_BASE_URL | `https://${aio.ingress.hostname}/${aio.ingress.path}` | -#### AIO Backend +##### AIO Backend @@ -222,9 +242,9 @@ See below the specific environment variables that are auto-generated. -### Distributed Auto-Generated Config URLs +#### Distributed Auto-Generated Config URLs -#### Distributed Frontend +##### Distributed Frontend | Key | Value | | ----------------------- | --------------------------------------------------------------------- | @@ -235,7 +255,7 @@ See below the specific environment variables that are auto-generated. | VITE_BASE_URL | `https://${backend.ingress.hostname}/${backend.ingress.path}` | | VITE_SHORTCODE_BASE_URL | `https://${backend.ingress.hostname}/${backend.ingress.path}` | -#### Distributed Backend +##### Distributed Backend @@ -251,7 +271,7 @@ See below the specific environment variables that are auto-generated. -## Auto-Generating Secrets +### Auto-Generating Secrets The chart automatically generates secrets if not provided. These auto-generated secrets will be persisted and reused on subsequent upgrades. @@ -266,7 +286,7 @@ hoppscotch: dataEncryptionKey: "" # Random 32-character alphanumeric string used if not provided ``` -## Overriding Config Values +### Overriding Config Values You can override config values using an existing secret, extra env vars, extra configmap, or extra secret. The order of precedence of these methods is as follows (from highest to lowest): @@ -322,7 +342,7 @@ existingSecret: my-existing-secret Note: The existing secret must contain all required keys. See [templates/config/secret.yaml](templates/config/secret.yaml) for more info. -## Waiting for Database Readiness +### Waiting for Database Readiness Hoppscotch pods that connect to the database will wait for the database to be ready before starting. This is accomplished by using the `wait-for-db` and `wait-for-migrations` default init containers. @@ -349,7 +369,7 @@ defaultInitContainers: waitForMigrations: false ``` -## Running Database Migrations +### Running Database Migrations Database migrations are run automatically after installs and upgrades. The chart includes a migrations job that runs the following command: diff --git a/charts/hoppscotch/values.yaml b/charts/hoppscotch/values.yaml index 149d0a0..302d74c 100644 --- a/charts/hoppscotch/values.yaml +++ b/charts/hoppscotch/values.yaml @@ -305,9 +305,9 @@ hoppscotch: # @section -- Hoppscotch Application Parameters allowAuditLogs: false + # @ignored clickhouse: - # @ignored -- Enable audit logs collection to ClickHouse. Enterprise Edition required. Deprecated: use - # `hoppscotch.backend.allowAuditLogs` instead. + # -- Enable audit logs collection to ClickHouse. Enterprise Edition required. Deprecated: use `hoppscotch.backend.allowAuditLogs` instead. # @section -- Hoppscotch Application Parameters allowAuditLogs: false