Skip to content
Closed
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
158 changes: 157 additions & 1 deletion modules/service/deployment/0.1/facets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,32 @@ spec:
values: ["ExecCheck"]
description: Commands for readiness check
x-ui-override-disable: true
readiness_failure_threshold:
type: integer
title: Readiness Failure Threshold
default: 10
minimum: 1
maximum: 100
x-ui-placeholder: "Enter readiness failure threshold"
x-ui-error-message: "Value doesn't match pattern, accepted values are
from 1-100"
x-ui-visible-if:
field: spec.runtime.health_checks.readiness_check_type
values: ["PortCheck", "HttpCheck", "ExecCheck"]
description: Number of consecutive failures before marking unhealthy
readiness_success_threshold:
type: integer
title: Readiness Success Threshold
default: 1
minimum: 1
maximum: 100
x-ui-placeholder: "Enter readiness success threshold"
x-ui-error-message: "Value doesn't match pattern, accepted values are
from 1-100"
x-ui-visible-if:
field: spec.runtime.health_checks.readiness_check_type
values: ["PortCheck", "HttpCheck", "ExecCheck"]
description: Number of consecutive successes before marking healthy
liveness_check_type:
type: string
title: Liveness Check Type
Expand Down Expand Up @@ -402,13 +428,39 @@ spec:
liveness_exec_command:
type: array
title: Liveness Exec Command
x-ui-placeholder: "Add each command argument as a new entry"
x-ui-placeholder: "Add each command argument as a new entry"
x-ui-error-message: "Enter each command/argument in a separate line"
x-ui-visible-if:
field: "spec.runtime.health_checks.liveness_check_type"
values: ["ExecCheck"]
description: Commands for liveness
x-ui-override-disable: true
liveness_failure_threshold:
type: integer
title: Liveness Failure Threshold
default: 10
minimum: 1
maximum: 100
x-ui-placeholder: "Enter liveness failure threshold"
x-ui-error-message: "Value doesn't match pattern, accepted values are
from 1-100"
x-ui-visible-if:
field: "spec.runtime.health_checks.liveness_check_type"
values: ["PortCheck", "HttpCheck", "ExecCheck"]
description: Number of consecutive failures before marking unhealthy
liveness_success_threshold:
type: integer
title: Liveness Success Threshold
default: 1
minimum: 1
maximum: 100
x-ui-placeholder: "Enter liveness success threshold"
x-ui-error-message: "Value doesn't match pattern, accepted values are
from 1-100"
x-ui-visible-if:
field: "spec.runtime.health_checks.liveness_check_type"
values: ["PortCheck", "HttpCheck", "ExecCheck"]
description: Number of consecutive successes before marking healthy
Comment on lines +451 to +463

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

liveness_success_threshold and startup_success_threshold must always be 1 — exposing them as editable fields will cause Kubernetes API rejections.

The Kubernetes API enforces that successThreshold defaults to 1 and must be 1 for liveness and startup probes. Setting it to any other value causes the Kubernetes API server to reject the pod spec entirely, breaking the deployment.

With maximum: 100, a user who increments either field above 1 in the UI will get an undeployable manifest. The same applies to the parallel sidecar fields at Lines 1773–1785 (liveness_success_threshold) and 1868–1880 (startup_success_threshold).

The cleanest fix is to remove all four fields (they carry no actionable information for the user). If a visible-but-locked sentinel is preferred, cap maximum at 1.

🐛 Proposed fix — remove the fields (recommended)
-            liveness_success_threshold:
-              type: integer
-              title: Liveness Success Threshold
-              default: 1
-              minimum: 1
-              maximum: 100
-              x-ui-placeholder: "Enter liveness success threshold"
-              x-ui-error-message: "Value doesn't match pattern, accepted values are
-                from 1-100"
-              x-ui-visible-if:
-                field: "spec.runtime.health_checks.liveness_check_type"
-                values: ["PortCheck", "HttpCheck", "ExecCheck"]
-              description: Number of consecutive successes before marking healthy
-            startup_success_threshold:
-              type: integer
-              title: Startup Success Threshold
-              default: 1
-              minimum: 1
-              maximum: 100
-              x-ui-placeholder: "Enter startup success threshold"
-              x-ui-error-message: "Value doesn't match pattern, accepted values are
-                from 1-100"
-              x-ui-visible-if:
-                field: spec.runtime.health_checks.startup_check_type
-                values: ["PortCheck", "HttpCheck", "ExecCheck"]
-              description: Number of consecutive successes before marking healthy

Apply the same removal to the sidecar counterparts at Lines 1773–1785 and 1868–1880.

Also applies to: 566-578

🤖 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 `@modules/service/deployment/0.1/facets.yaml` around lines 451 - 463, The
liveness_success_threshold and startup_success_threshold properties are unsafe
because Kubernetes requires successThreshold == 1 for liveness and startup
probes; remove the editable fields named liveness_success_threshold and
startup_success_threshold from the main probe definitions and from the parallel
sidecar probe definitions (the four occurrences), or if you must keep a visible
sentinel instead, set their default and maximum to 1 and remove any UI controls
that allow changing them (refer to the fields named liveness_success_threshold
and startup_success_threshold in both the primary probe blocks and the sidecar
blocks).

startup_check_type:
type: string
title: Startup Check Type
Expand Down Expand Up @@ -498,6 +550,32 @@ spec:
values: ["ExecCheck"]
description: Commands for startup check
x-ui-override-disable: true
startup_failure_threshold:
type: integer
title: Startup Failure Threshold
default: 10
minimum: 1
maximum: 100
x-ui-placeholder: "Enter startup failure threshold"
x-ui-error-message: "Value doesn't match pattern, accepted values are
from 1-100"
x-ui-visible-if:
field: spec.runtime.health_checks.startup_check_type
values: ["PortCheck", "HttpCheck", "ExecCheck"]
description: Number of consecutive failures before marking unhealthy
startup_success_threshold:
type: integer
title: Startup Success Threshold
default: 1
minimum: 1
maximum: 100
x-ui-placeholder: "Enter startup success threshold"
x-ui-error-message: "Value doesn't match pattern, accepted values are
from 1-100"
x-ui-visible-if:
field: spec.runtime.health_checks.startup_check_type
values: ["PortCheck", "HttpCheck", "ExecCheck"]
description: Number of consecutive successes before marking healthy
autoscaling:
type: object
title: Autoscaling
Expand Down Expand Up @@ -1584,6 +1662,32 @@ spec:
values: ["ExecCheck"]
description: Commands for readiness check
x-ui-override-disable: true
readiness_failure_threshold:
type: integer
title: Readiness Failure Threshold
default: 10
minimum: 1
maximum: 100
x-ui-placeholder: "Enter readiness failure threshold"
x-ui-error-message: "Value doesn't match pattern, accepted values
are from 1-100"
x-ui-visible-if:
field: spec.sidecars.{{this}}.runtime.health_checks.readiness_check_type
values: ["PortCheck", "HttpCheck", "ExecCheck"]
description: Number of consecutive failures before marking unhealthy
readiness_success_threshold:
type: integer
title: Readiness Success Threshold
default: 1
minimum: 1
maximum: 100
x-ui-placeholder: "Enter readiness success threshold"
x-ui-error-message: "Value doesn't match pattern, accepted values
are from 1-100"
x-ui-visible-if:
field: spec.sidecars.{{this}}.runtime.health_checks.readiness_check_type
values: ["PortCheck", "HttpCheck", "ExecCheck"]
description: Number of consecutive successes before marking healthy
liveness_check_type:
type: string
title: Liveness Check Type
Expand Down Expand Up @@ -1653,6 +1757,32 @@ spec:
values: ["ExecCheck"]
description: Commands for liveness
x-ui-override-disable: true
liveness_failure_threshold:
type: integer
title: Liveness Failure Threshold
default: 10
minimum: 1
maximum: 100
x-ui-placeholder: "Enter liveness failure threshold"
x-ui-error-message: "Value doesn't match pattern, accepted values
are from 1-100"
x-ui-visible-if:
field: "spec.sidecars.{{this}}.runtime.health_checks.liveness_check_type"
values: ["PortCheck", "HttpCheck", "ExecCheck"]
description: Number of consecutive failures before marking unhealthy
liveness_success_threshold:
type: integer
title: Liveness Success Threshold
default: 1
minimum: 1
maximum: 100
x-ui-placeholder: "Enter liveness success threshold"
x-ui-error-message: "Value doesn't match pattern, accepted values
are from 1-100"
x-ui-visible-if:
field: "spec.sidecars.{{this}}.runtime.health_checks.liveness_check_type"
values: ["PortCheck", "HttpCheck", "ExecCheck"]
description: Number of consecutive successes before marking healthy
startup_check_type:
type: string
title: Startup Check Type
Expand Down Expand Up @@ -1722,6 +1852,32 @@ spec:
values: ["ExecCheck"]
description: Commands for startup check
x-ui-override-disable: true
startup_failure_threshold:
type: integer
title: Startup Failure Threshold
default: 10
minimum: 1
maximum: 100
x-ui-placeholder: "Enter startup failure threshold"
x-ui-error-message: "Value doesn't match pattern, accepted values
are from 1-100"
x-ui-visible-if:
field: spec.sidecars.{{this}}.runtime.health_checks.startup_check_type
values: ["PortCheck", "HttpCheck", "ExecCheck"]
description: Number of consecutive failures before marking unhealthy
startup_success_threshold:
type: integer
title: Startup Success Threshold
default: 1
minimum: 1
maximum: 100
x-ui-placeholder: "Enter startup success threshold"
x-ui-error-message: "Value doesn't match pattern, accepted values
are from 1-100"
x-ui-visible-if:
field: spec.sidecars.{{this}}.runtime.health_checks.startup_check_type
values: ["PortCheck", "HttpCheck", "ExecCheck"]
description: Number of consecutive successes before marking healthy
port:
type: string
title: Health Check Port
Expand Down
Loading
Loading