Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions charts/hoppscotch/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Hoppscotch Helm Chart

![Version: 0.5.0](https://img.shields.io/badge/Version-0.5.0-informational?style=flat-square)
![AppVersion: 2026.6.1](https://img.shields.io/badge/AppVersion-2026.6.1-informational?style=flat-square)
![Version: 0.5.2](https://img.shields.io/badge/Version-0.5.2-informational?style=flat-square)
![AppVersion: 2026.7.0](https://img.shields.io/badge/AppVersion-2026.7.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.
Expand Down Expand Up @@ -1351,19 +1351,23 @@ The TLS secret covers the wildcard host `*.mock.example.com`.

### 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.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 |
| 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.waitForDatabase.resourcesPreset | string | `"nano"` | Set container resources according to one common preset (allowed values: nano, micro, small, medium, large, xlarge, 2xlarge) |
| defaultInitContainers.waitForDatabase.resources | object | `{}` | Set container resources for the wait-for-database init container (overrides resourcesPreset) |
| 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 |
| defaultInitContainers.waitForMigrations.resourcesPreset | string | `"small"` | Set container resources according to one common preset (allowed values: nano, micro, small, medium, large, xlarge, 2xlarge) |
| defaultInitContainers.waitForMigrations.resources | object | `{}` | Set container resources for the wait-for-migrations init container (overrides resourcesPreset) |

### Mock Server Parameters

Expand Down
10 changes: 10 additions & 0 deletions charts/hoppscotch/templates/_default_init_containers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ Default init container that waits for the database to be ready.
- name: wait-for-db
image: {{ include "hoppscotch.images.image" (dict "component" .Values.defaultInitContainers.waitForDatabase "context" .) }}
imagePullPolicy: {{ .Values.defaultInitContainers.waitForDatabase.image.pullPolicy }}
{{- $resources := include "hoppscotch.resources" (dict "preset" .Values.defaultInitContainers.waitForDatabase.resourcesPreset "resources" .Values.defaultInitContainers.waitForDatabase.resources) }}
{{- if $resources }}
resources:
{{- $resources | nindent 4 }}
{{- end }}
command:
- /bin/sh
args:
Expand Down Expand Up @@ -34,6 +39,11 @@ Default init container that waits for the database migrations to be complete.
- name: wait-for-migrations
image: {{ include "hoppscotch.backend.image" . }}
imagePullPolicy: {{ include "hoppscotch.backend.imagePullPolicy" . }}
{{- $resources := include "hoppscotch.resources" (dict "preset" .Values.defaultInitContainers.waitForMigrations.resourcesPreset "resources" .Values.defaultInitContainers.waitForMigrations.resources) }}
{{- if $resources }}
resources:
{{- $resources | nindent 4 }}
{{- end }}
command:
- /bin/sh
args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,46 @@ tests:
- secretRef:
name: env-vars-secret
any: true

- it: should set default resources from the nano preset
template: aio/deployment.yaml
set:
deploymentMode: aio
defaultInitContainers:
waitForDatabase:
enabled: true
asserts:
- equal:
path: spec.template.spec.initContainers[0].name
value: wait-for-db
- equal:
path: spec.template.spec.initContainers[0].resources.requests.cpu
value: 100m
- equal:
path: spec.template.spec.initContainers[0].resources.limits.memory
value: 192Mi

- it: should override init container resources when explicitly set
template: aio/deployment.yaml
set:
deploymentMode: aio
defaultInitContainers:
waitForDatabase:
enabled: true
resources:
requests:
cpu: 25m
memory: 32Mi
limits:
cpu: 50m
memory: 64Mi
asserts:
- equal:
path: spec.template.spec.initContainers[0].name
value: wait-for-db
- equal:
path: spec.template.spec.initContainers[0].resources.requests.cpu
value: 25m
- equal:
path: spec.template.spec.initContainers[0].resources.limits.memory
value: 64Mi
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,50 @@ tests:
- secretRef:
name: env-vars-secret
any: true

- it: should set default resources from the small preset
template: aio/deployment.yaml
set:
deploymentMode: aio
defaultInitContainers:
waitForDatabase:
enabled: false
waitForMigrations:
enabled: true
asserts:
- equal:
path: spec.template.spec.initContainers[0].name
value: wait-for-migrations
- equal:
path: spec.template.spec.initContainers[0].resources.requests.cpu
value: 250m
- equal:
path: spec.template.spec.initContainers[0].resources.limits.memory
value: 512Mi

- it: should override init container resources when explicitly set
template: aio/deployment.yaml
set:
deploymentMode: aio
defaultInitContainers:
waitForDatabase:
enabled: false
waitForMigrations:
enabled: true
resources:
requests:
cpu: 25m
memory: 32Mi
limits:
cpu: 50m
memory: 64Mi
asserts:
- equal:
path: spec.template.spec.initContainers[0].name
value: wait-for-migrations
- equal:
path: spec.template.spec.initContainers[0].resources.requests.cpu
value: 25m
- equal:
path: spec.template.spec.initContainers[0].resources.limits.memory
value: 64Mi
14 changes: 14 additions & 0 deletions charts/hoppscotch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1893,6 +1893,13 @@ defaultInitContainers:
# @section -- Default Init Containers Parameters
extraEnvVarsSecret: ""

# -- Set container resources according to one common preset (allowed values: nano, micro, small, medium, large, xlarge, 2xlarge)
# @section -- Default Init Containers Parameters
resourcesPreset: nano
# -- Set container resources for the wait-for-database init container (overrides resourcesPreset)
# @section -- Default Init Containers Parameters
resources: {}

waitForMigrations:
# -- Enable init container that waits for migrations to complete
# @section -- Default Init Containers Parameters
Expand All @@ -1908,6 +1915,13 @@ defaultInitContainers:
# @section -- Default Init Containers Parameters
extraEnvVarsSecret: ""

# -- Set container resources according to one common preset (allowed values: nano, micro, small, medium, large, xlarge, 2xlarge)
# @section -- Default Init Containers Parameters
resourcesPreset: small
# -- Set container resources for the wait-for-migrations init container (overrides resourcesPreset)
# @section -- Default Init Containers Parameters
resources: {}

# @section -- Mock Server Parameters

mockServer:
Expand Down
Loading