Skip to content
Open
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
2 changes: 2 additions & 0 deletions charts/plane-ce/templates/workloads/admin.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-admin
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
containers:
- name: {{ .Release.Name }}-admin
Expand Down
2 changes: 2 additions & 0 deletions charts/plane-ce/templates/workloads/api.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-api
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
containers:
- name: {{ .Release.Name }}-api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-beat-worker
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
containers:
- name: {{ .Release.Name }}-beat-worker
Expand Down
2 changes: 2 additions & 0 deletions charts/plane-ce/templates/workloads/live.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-live
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
containers:
- name: {{ .Release.Name }}-live
Expand Down
4 changes: 3 additions & 1 deletion charts/plane-ce/templates/workloads/migrator.job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: batch/v1
kind: Job
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-api-migrate-{{ .Release.Revision }}
name: {{ .Release.Name }}-api-migrate-{{ if $.Values.gitops.enabled }}{{ .Values.planeVersion | replace "." "-" | replace "+" "-" | lower }}{{ else }}{{ .Release.Revision }}{{ end }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Broaden planeVersion sanitization for the Job name. replace "." "-" | replace "+" "-" | lower still leaves other DNS-1123-invalid characters, so an underscore or space in planeVersion would make the rendered Job name invalid. Normalize the remaining non [a-z0-9-] characters or constrain the accepted version format.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 6-6: syntax error: expected , but found ''

(syntax)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/plane-ce/templates/workloads/migrator.job.yaml` at line 6, The
migrator Job name sanitization only handles dots, pluses, and casing, so
`planeVersion` values with other invalid DNS-1123 characters can still render an
invalid name. Update the name generation in the migrator job template to
normalize all remaining non-[a-z0-9-] characters or otherwise restrict
`planeVersion` to a safe format, using the existing
`planeVersion`/`.Release.Name` branch as the place to fix it.

{{- include "plane.labelsAndAnnotations" (dict "context" $ "values" .Values.api) }}
spec:
backoffLimit: 3
Expand All @@ -13,7 +13,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-api-migrate
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
containers:
- name: {{ .Release.Name }}-api-migrate
Expand Down
2 changes: 1 addition & 1 deletion charts/plane-ce/templates/workloads/minio.stateful.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ apiVersion: batch/v1
kind: Job
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-minio-bucket-{{ .Release.Revision }}
name: {{ .Release.Name }}-minio-bucket-{{ if $.Values.gitops.enabled }}{{ .Values.planeVersion | replace "." "-" | replace "+" "-" | lower }}{{ else }}{{ .Release.Revision }}{{ end }}
{{- include "plane.labelsAndAnnotations" (dict "context" $ "values" .Values.minio) }}
spec:
backoffLimit: 6
Expand Down
2 changes: 2 additions & 0 deletions charts/plane-ce/templates/workloads/space.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-space
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
containers:
- name: {{ .Release.Name }}-space
Expand Down
2 changes: 2 additions & 0 deletions charts/plane-ce/templates/workloads/web.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-web
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
containers:
- name: {{ .Release.Name }}-web
Expand Down
2 changes: 2 additions & 0 deletions charts/plane-ce/templates/workloads/worker.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-worker
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
containers:
- name: {{ .Release.Name }}-worker
Expand Down
8 changes: 8 additions & 0 deletions charts/plane-ce/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
planeVersion: v1.2.0

# GitOps mode: render deterministically for declarative tools (Argo CD / Flux). When true,
# the per-render `timestamp` rollout annotation is omitted and migration Job names are keyed
# to `planeVersion` instead of `.Release.Revision`, so repeated renders of an unchanged
# release are byte-identical (no perpetual drift, no immutable-Job patch errors). Default
# false preserves the existing imperative `helm upgrade` behavior exactly.
gitops:
enabled: false

dockerRegistry:
enabled: false
host: "index.docker.io/v1/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-admin
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.admin }}
{{- include "plane.podSecurityContext" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-api
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.api }}
{{- include "plane.podSecurityContext" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-automation-consumer
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.automation_consumer }}
{{- include "plane.podSecurityContext" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-beat-worker
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.beatworker }}
{{- include "plane.podSecurityContext" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-email-app
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.email_service }}
containers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-iframely
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.iframely }}
{{- include "plane.podSecurityContext" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-live
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.live }}
{{- include "plane.podSecurityContext" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: batch/v1
kind: Job
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-api-migrate-{{ now | date "20060102-150405" }}
name: {{ .Release.Name }}-api-migrate-{{ if $.Values.gitops.enabled }}{{ .Values.planeVersion | replace "." "-" | replace "+" "-" | lower }}{{ else }}{{ now | date "20060102-150405" }}{{ end }}
{{- include "plane.labelsAndAnnotations" (dict "context" $ "values" .Values.services.api) }}
spec:
backoffLimit: 3
Expand All @@ -13,7 +13,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-api-migrate
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.api }}
{{- include "plane.podSecurityContext" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ apiVersion: batch/v1
kind: Job
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-minio-bucket-{{ now | date "20060102-150405" }}
name: {{ .Release.Name }}-minio-bucket-{{ if $.Values.gitops.enabled }}{{ .Values.planeVersion | replace "." "-" | replace "+" "-" | lower }}{{ else }}{{ now | date "20060102-150405" }}{{ end }}
{{- include "plane.labelsAndAnnotations" (dict "context" $ "values" .Values.services.minio) }}
spec:
backoffLimit: 6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-monitor
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.monitor }}
{{- include "plane.podSecurityContext" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-outbox-poller
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.outbox_poller }}
{{- include "plane.podSecurityContext" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-pi-api
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.pi }}
{{- include "plane.podSecurityContext" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-pi-beat
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.pi_beat_worker }}
{{- include "plane.podSecurityContext" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: batch/v1
kind: Job
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-pi-api-migrate-{{ now | date "20060102-150405" }}
name: {{ .Release.Name }}-pi-api-migrate-{{ if $.Values.gitops.enabled }}{{ .Values.planeVersion | replace "." "-" | replace "+" "-" | lower }}{{ else }}{{ now | date "20060102-150405" }}{{ end }}
labels:
{{- include "plane.commonLabels" $ | nindent 4 }}
spec:
Expand All @@ -15,7 +15,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-pi-api-migrate
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.pi }}
{{- include "plane.podSecurityContext" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-pi-worker
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.pi_worker }}
{{- include "plane.podSecurityContext" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-runner
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.runner }}
{{- include "plane.podSecurityContext" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-silo
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.silo }}
{{- include "plane.podSecurityContext" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-space
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.space }}
{{- include "plane.podSecurityContext" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-web
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.web }}
{{- include "plane.podSecurityContext" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ spec:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-worker
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
{{- include "plane.podScheduling" .Values.services.worker }}
{{- include "plane.podSecurityContext" . }}
Expand Down
8 changes: 8 additions & 0 deletions charts/plane-enterprise/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
planeVersion: v2.6.3

# GitOps mode: render deterministically for declarative tools (Argo CD / Flux). When true,
# the per-render `timestamp` rollout annotation is omitted and migration Job names are keyed
# to `planeVersion` instead of a wall-clock timestamp, so repeated renders of an unchanged
# release are byte-identical (no perpetual drift, no immutable-Job patch errors). Default
# false preserves the existing imperative `helm upgrade` behavior exactly.
gitops:
enabled: false

dockerRegistry:
enabled: false
registry: 'index.docker.io/v1/'
Expand Down