Skip to content
Open
52 changes: 7 additions & 45 deletions helm-repo/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apiVersion: v1
entries:
phase:
- apiVersion: v2
created: "2025-09-27T18:45:20.618693+05:30"
created: "2025-11-15T15:37:02.493652+05:30"
description: A Helm chart for deploying the Phase Secrets Manager
digest: cdd437fc2cce88e078da782dd69b18eb2ddc22fe380df1ca72c767f550cecd6d
digest: 962f1d473b222c05fc8ade650b0f54bb2dddff8da335564f02bdf503ed2dee58
home: https://github.com/phasehq/kubernetes-secrets-operator
icon: https://phase.dev/apple-touch-icon.png
keywords:
Expand All @@ -18,50 +18,12 @@ entries:
- https://github.com/phasehq/console
type: application
urls:
- https://helm.phase.dev/phase-0.4.2.tgz
version: 0.4.2
- apiVersion: v2
created: "2025-09-27T18:45:20.618273+05:30"
description: A Helm chart for deploying the Phase Secrets Manager
digest: 45321c29e26c00c8c052cc5cfeeca7b383caa0958fa97415ed81e3d2817c011b
home: https://github.com/phasehq/kubernetes-secrets-operator
icon: https://phase.dev/apple-touch-icon.png
keywords:
- phase
- deployment
maintainers:
- email: [email protected]
name: Nimish
name: phase
sources:
- https://github.com/phasehq/console
type: application
urls:
- https://helm.phase.dev/phase-0.4.1.tgz
version: 0.4.1
- apiVersion: v2
created: "2025-09-24T20:12:36.640449+05:30"
description: A Helm chart for deploying the Phase Secrets Manager
digest: e7c0c633fe75fef2c20c4499e740cf6c940e0437c0b30101e09930f58d54a8a9
home: https://github.com/phasehq/kubernetes-secrets-operator
icon: https://phase.dev/apple-touch-icon.png
keywords:
- phase
- deployment
maintainers:
- email: [email protected]
name: Nimish
name: phase
sources:
- https://github.com/phasehq/console
type: application
urls:
- phase-0.4.0.tgz
version: 0.4.0
- phase-0.5.0.tgz
version: 0.5.0
phase-kubernetes-operator:
- apiVersion: v2
appVersion: 1.3.0
created: "2025-09-27T18:45:20.619088+05:30"
created: "2025-11-15T15:37:02.494035+05:30"
description: A Helm chart for deploying the Phase Kubernetes Operator
digest: ac562ccaea71b4ae9bdefeeef9b3660f092b998d673ca96f7f557d05aff93895
home: https://github.com/phasehq/kubernetes-secrets-operator
Expand All @@ -79,6 +41,6 @@ entries:
- https://github.com/phasehq/kubernetes-secrets-operator
type: application
urls:
- https://helm.phase.dev/phase-kubernetes-operator-1.3.0.tgz
- phase-kubernetes-operator-1.3.0.tgz
version: 1.3.0
generated: "2025-09-27T18:45:20.617165+05:30"
generated: "2025-11-15T15:37:02.492839+05:30"
Binary file removed helm-repo/phase-0.4.2.tgz
Binary file not shown.
Binary file added helm-repo/phase-0.5.0.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion phase-console/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: phase
icon: https://phase.dev/apple-touch-icon.png
description: A Helm chart for deploying the Phase Secrets Manager
type: application
version: 0.4.2
version: 0.5.0
keywords:
- phase
- deployment
Expand Down
2 changes: 1 addition & 1 deletion phase-console/templates/configmap.yaml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually do not understand why do we have this as a pre-install hook?
was there any reason for this design?

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: {{ include "phase.fullname" . }}-config
labels:
{{- include "phase.labels" . | nindent 4 }}
{{- if or .Values.global.external.enabled .Values.database.external .Values.redis.external }}
{{- if .Values.database.external }}
annotations:
"helm.sh/hook": "pre-install,pre-upgrade"
"helm.sh/hook-weight": "0"
Expand Down
4 changes: 2 additions & 2 deletions phase-console/templates/deployment-postgres.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if or (not .Values.global.external) (not .Values.database.external) }}
{{- if not .Values.database.external }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -81,7 +81,7 @@ spec:
{{- end }}

---
{{- if and (not .Values.global.external.enabled) .Values.database.persistence.enabled }}
{{- if and (not .Values.database.external) .Values.database.persistence.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
Expand Down
2 changes: 1 addition & 1 deletion phase-console/templates/deployment-redis.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if or (not .Values.global.external) (not .Values.redis.external) }}
{{- if not .Values.redis.external }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
9 changes: 7 additions & 2 deletions phase-console/templates/job-migrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ metadata:
{{- include "phase.labels" . | nindent 4 }}
job-name: {{ include "phase.fullname" . }}-migrations
annotations:
# Migrations are run after all other resources (including PostgreSQL and Redis) are created and ready
{{- if or .Values.global.external.enabled .Values.database.external .Values.redis.external }}
# Migrations hook behavior:
# - If `database.external = true`, the database is managed outside this chart and is
# expected to exist already, so we run migrations as a *pre-install* hook and fail fast
# before rolling out the rest of the stack.
# - If `database.external = false`, this chart creates the Postgres Deployment/PVC and
# must wait for them to be ready, so we run migrations as a *post-install* hook.
{{- if .Values.database.external }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Migration Hook Timing Needs Redis Awareness

The migrations job runs as a pre-install hook when database.external is true, but it has an init container that waits for Redis. When Redis is internal (redis.external = false) and the database is external (database.external = true), the migrations job runs before the Redis deployment is created, causing the wait-for-redis init container to fail. The hook timing should depend on both database.external and redis.external being true.

Fix in Cursor Fix in Web

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the job migration depend on both the database and Redis being available ?
If we go with this logic we are checking only the status of database isn't it? Like lets say a user is using RDS but want to run redis inside kubernetes cluster - in that case, this condition will pass but migration job since it's pre-install probably will cause issues due to how helm works.
I suggest we rather do :

    {{- if and .Values.database.external .Values.redis.external }}
    "helm.sh/hook": "pre-install,pre-upgrade"
    {{- else }}
    "helm.sh/hook": "post-install,post-upgrade"
    {{- end }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional suggestion from simulation.

  • The migrations Job uses a pre-install hook when database.external = true

  • Pre-install hooks execute before any regular resources are created

  • The Job has a wait-for-redis init container that requires Redis to be available

  • Internal Redis Deployment is a regular resource, not created until after hooks complete

  • Init container waits indefinitely for Redis that doesn't exist yet

  • Migration Job fails, blocking entire Helm installation

  • Root cause: Hook timing logic only checks database.external, ignoring redis.external

"helm.sh/hook": "pre-install,pre-upgrade"
{{- else }}
"helm.sh/hook": "post-install,post-upgrade"
Expand Down
16 changes: 15 additions & 1 deletion phase-console/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,21 @@ global:
backend:
repository: phasehq/backend
external:
enabled: false # Set to true to use external managed services
enabled: false # DEPRECATED: no longer used by the chart; use `database.external` and `redis.external` instead.
# Examples:
# External service patterns (internal vs external Postgres/Redis):
# - Both Postgres & Redis inside the cluster:
# database.external = false
# redis.external = false
# - Both Postgres & Redis outside the cluster:
# database.external = true
# redis.external = true
# - External Postgres only (Redis inside cluster):
# database.external = true
# redis.external = false
# - External Redis only (Postgres inside cluster):
# database.external = false
# redis.external = true

sso:
providers: "google,github,gitlab"
Expand Down
Loading