From 8e17393b99ab009417981b0d989a6685dc38ffc0 Mon Sep 17 00:00:00 2001 From: Dimosthenis Schizas Date: Tue, 28 Apr 2026 18:48:23 +0300 Subject: [PATCH 1/3] fix(schema): accept numeric cpu requests --- tests/statefulset_test.yaml | 13 ++++++++++ values.schema.json | 47 +++++++++++++++++++++---------------- values.yaml | 20 ++++++++++++++++ 3 files changed, 60 insertions(+), 20 deletions(-) diff --git a/tests/statefulset_test.yaml b/tests/statefulset_test.yaml index 3f86650..84ce54b 100644 --- a/tests/statefulset_test.yaml +++ b/tests/statefulset_test.yaml @@ -168,6 +168,19 @@ tests: limits: cpu: "1000m" memory: "4Gi" + - it: should accept numeric cpu requests + set: + resources: + requests: + cpu: 2 + memory: "2Gi" + limits: + memory: "4Gi" + asserts: + - notFailedTemplate: {} + - equal: + path: .spec.template.spec.containers[0].resources.requests.cpu + value: 2 - it: should be possible to add nodeSelector set: nodeSelector: diff --git a/values.schema.json b/values.schema.json index 62caa3f..6387599 100644 --- a/values.schema.json +++ b/values.schema.json @@ -32,10 +32,10 @@ "gateway": { "properties": { "enabled": { - "default": "false", + "default": false, "description": "Enable or disable Gateway API for the application", - "required": [], - "title": "enabled" + "title": "enabled", + "type": "boolean" }, "hosts": { "description": "List of hostnames the Gateway will route traffic for", @@ -153,10 +153,10 @@ "title": "className" }, "enabled": { - "default": "false", + "default": false, "description": "Enable or disable Ingress for the application", - "required": [], - "title": "enabled" + "title": "enabled", + "type": "boolean" }, "hosts": { "description": "List of hostnames the Ingress will route traffic for", @@ -294,10 +294,10 @@ "serviceMonitor": { "properties": { "enabled": { - "default": "false", + "default": false, "description": "Enable ServiceMonitor for Prometheus scraping", - "required": [], - "title": "enabled" + "title": "enabled", + "type": "boolean" }, "interval": { "default": "30s", @@ -487,14 +487,21 @@ "requests": { "properties": { "cpu": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ], "default": "2000m", - "title": "cpu", - "type": "string" + "description": " anyOf: - type: string - type: number @schema", + "required": [], + "title": "cpu" } }, - "required": [ - "cpu" - ], + "required": [], "title": "requests", "type": "object" } @@ -509,10 +516,10 @@ "externalSecret": { "properties": { "enabled": { - "default": "false", + "default": false, "description": "Enable or disable ExternalSecret creation (requires external-secrets operator)", - "required": [], - "title": "enabled" + "title": "enabled", + "type": "boolean" }, "extractKey": { "default": "", @@ -619,10 +626,10 @@ "title": "annotations" }, "automountServiceAccountToken": { - "default": "false", + "default": false, "description": "Whether to automount the ServiceAccount token", - "required": [], - "title": "automountServiceAccountToken" + "title": "automountServiceAccountToken", + "type": "boolean" }, "create": { "default": true, diff --git a/values.yaml b/values.yaml index d249767..c165372 100644 --- a/values.yaml +++ b/values.yaml @@ -65,6 +65,9 @@ service: port: 8108 ingress: + # @schema + # type: boolean + # @schema # -- Enable or disable Ingress for the application enabled: false # -- The name of the Ingress class to use (e.g., nginx) @@ -77,6 +80,9 @@ ingress: prefix: "/" gateway: + # @schema + # type: boolean + # @schema # -- Enable or disable Gateway API for the application enabled: false # -- List of hostnames the Gateway will route traffic for @@ -124,6 +130,11 @@ gateway: # set by default to avoid throttling during indexing and Raft catch-up. resources: requests: + # @schema + # anyOf: + # - type: string + # - type: number + # @schema cpu: 2000m livenessProbe: @@ -269,6 +280,9 @@ secrets: # -- Whether the secretRef in envFrom is optional (pods start even if secret is missing) optional: true externalSecret: + # @schema + # type: boolean + # @schema # -- Enable or disable ExternalSecret creation (requires external-secrets operator) enabled: false # -- The name of the ClusterSecretStore or SecretStore to use @@ -363,6 +377,9 @@ serviceAccount: name: "" # -- Annotations to add to the ServiceAccount (e.g., for IRSA) annotations: {} + # @schema + # type: boolean + # @schema # -- Whether to automount the ServiceAccount token automountServiceAccountToken: false @@ -389,6 +406,9 @@ metrics: # -- Resource requests and limits for the metrics sidecar resources: {} serviceMonitor: + # @schema + # type: boolean + # @schema # -- Enable ServiceMonitor for Prometheus scraping enabled: false # -- Scrape interval From c2059915c8388de7834424ece80a21b71f25ad04 Mon Sep 17 00:00:00 2001 From: Dimosthenis Schizas Date: Tue, 28 Apr 2026 19:02:43 +0300 Subject: [PATCH 2/3] fix(schema): type integer runtime settings --- values.schema.json | 85 ++++++++++++++++++++++++++-------------------- values.yaml | 52 ++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 36 deletions(-) diff --git a/values.schema.json b/values.schema.json index 6387599..9f2b505 100644 --- a/values.schema.json +++ b/values.schema.json @@ -180,10 +180,11 @@ "livenessProbe": { "properties": { "failureThreshold": { - "default": "6", + "default": 6, "description": "Number of failed liveness checks before restarting the container", - "required": [], - "title": "failureThreshold" + "minimum": 1, + "title": "failureThreshold", + "type": "integer" }, "httpGet": { "properties": { @@ -206,10 +207,11 @@ "type": "object" }, "periodSeconds": { - "default": "20", + "default": 20, "description": "Period (in seconds) to perform the liveness check", - "required": [], - "title": "periodSeconds" + "minimum": 1, + "title": "periodSeconds", + "type": "integer" }, "tcpSocket": { "properties": { @@ -227,6 +229,8 @@ }, "timeoutSeconds": { "default": 3, + "description": " type: integer minimum: 1 @schema", + "minimum": 1, "title": "timeoutSeconds", "type": "integer" }, @@ -239,8 +243,7 @@ }, "required": [ "httpGet", - "tcpSocket", - "timeoutSeconds" + "tcpSocket" ], "title": "livenessProbe", "type": "object" @@ -378,16 +381,18 @@ "podSecurityContext": { "properties": { "fsGroup": { - "default": "2000", + "default": 2000, "description": "Group ID for the filesystem of the Typesense container", - "required": [], - "title": "fsGroup" + "minimum": 0, + "title": "fsGroup", + "type": "integer" }, "runAsGroup": { - "default": "3000", + "default": 3000, "description": "Group ID for running the Typesense process", - "required": [], - "title": "runAsGroup" + "minimum": 0, + "title": "runAsGroup", + "type": "integer" }, "runAsNonRoot": { "default": "true", @@ -396,10 +401,11 @@ "title": "runAsNonRoot" }, "runAsUser": { - "default": "10000", + "default": 10000, "description": "User ID for running the Typesense process", - "required": [], - "title": "runAsUser" + "minimum": 0, + "title": "runAsUser", + "type": "integer" } }, "required": [], @@ -409,10 +415,11 @@ "readinessProbe": { "properties": { "failureThreshold": { - "default": "12", + "default": 12, "description": "Number of failed readiness checks before marking the pod as unready", - "required": [], - "title": "failureThreshold" + "minimum": 1, + "title": "failureThreshold", + "type": "integer" }, "httpGet": { "properties": { @@ -435,10 +442,11 @@ "type": "object" }, "periodSeconds": { - "default": "10", + "default": 10, "description": "Period (in seconds) to perform the readiness check", - "required": [], - "title": "periodSeconds" + "minimum": 1, + "title": "periodSeconds", + "type": "integer" }, "tcpSocket": { "properties": { @@ -456,6 +464,8 @@ }, "timeoutSeconds": { "default": 3, + "description": " type: integer minimum: 1 @schema", + "minimum": 1, "title": "timeoutSeconds", "type": "integer" }, @@ -468,8 +478,7 @@ }, "required": [ "httpGet", - "tcpSocket", - "timeoutSeconds" + "tcpSocket" ], "title": "readinessProbe", "type": "object" @@ -651,10 +660,11 @@ "startupProbe": { "properties": { "failureThreshold": { - "default": "60", + "default": 60, "description": "Number of failed startup checks before marking the container as unhealthy", - "required": [], - "title": "failureThreshold" + "minimum": 1, + "title": "failureThreshold", + "type": "integer" }, "httpGet": { "properties": { @@ -677,10 +687,11 @@ "type": "object" }, "periodSeconds": { - "default": "10", + "default": 10, "description": "Period (in seconds) to perform the startup check", - "required": [], - "title": "periodSeconds" + "minimum": 1, + "title": "periodSeconds", + "type": "integer" }, "tcpSocket": { "properties": { @@ -698,6 +709,8 @@ }, "timeoutSeconds": { "default": 3, + "description": " type: integer minimum: 1 @schema", + "minimum": 1, "title": "timeoutSeconds", "type": "integer" }, @@ -710,8 +723,7 @@ }, "required": [ "httpGet", - "tcpSocket", - "timeoutSeconds" + "tcpSocket" ], "title": "startupProbe", "type": "object" @@ -736,10 +748,11 @@ "type": "object" }, "terminationGracePeriodSeconds": { - "default": "300", + "default": 300, "description": "Termination grace period in seconds. Typesense recommends 300s to allow graceful shutdown.", - "required": [], - "title": "terminationGracePeriodSeconds" + "minimum": 0, + "title": "terminationGracePeriodSeconds", + "type": "integer" }, "tolerations": { "description": "Tolerations for pod scheduling", diff --git a/values.yaml b/values.yaml index c165372..dc23ed4 100644 --- a/values.yaml +++ b/values.yaml @@ -25,6 +25,10 @@ nameOverride: "" # -- Override the full name of the release (optional) fullnameOverride: "" +# @schema +# type: integer +# minimum: 0 +# @schema # -- Termination grace period in seconds. Typesense recommends 300s to allow graceful shutdown. terminationGracePeriodSeconds: 300 @@ -34,10 +38,22 @@ podAnnotations: {} podLabels: {} podSecurityContext: + # @schema + # type: integer + # minimum: 0 + # @schema # -- Group ID for the filesystem of the Typesense container fsGroup: 2000 + # @schema + # type: integer + # minimum: 0 + # @schema # -- User ID for running the Typesense process runAsUser: 10000 + # @schema + # type: integer + # minimum: 0 + # @schema # -- Group ID for running the Typesense process runAsGroup: 3000 # -- Ensure the container does not run as root @@ -150,10 +166,22 @@ livenessProbe: port: http tcpSocket: port: http + # @schema + # type: integer + # minimum: 1 + # @schema # -- Number of failed liveness checks before restarting the container failureThreshold: 6 + # @schema + # type: integer + # minimum: 1 + # @schema # -- Period (in seconds) to perform the liveness check periodSeconds: 20 + # @schema + # type: integer + # minimum: 1 + # @schema timeoutSeconds: 3 startupProbe: @@ -164,10 +192,22 @@ startupProbe: port: http tcpSocket: port: http + # @schema + # type: integer + # minimum: 1 + # @schema # -- Number of failed startup checks before marking the container as unhealthy failureThreshold: 60 + # @schema + # type: integer + # minimum: 1 + # @schema # -- Period (in seconds) to perform the startup check periodSeconds: 10 + # @schema + # type: integer + # minimum: 1 + # @schema timeoutSeconds: 3 readinessProbe: @@ -178,10 +218,22 @@ readinessProbe: port: http tcpSocket: port: http + # @schema + # type: integer + # minimum: 1 + # @schema # -- Period (in seconds) to perform the readiness check periodSeconds: 10 + # @schema + # type: integer + # minimum: 1 + # @schema # -- Number of failed readiness checks before marking the pod as unready failureThreshold: 12 + # @schema + # type: integer + # minimum: 1 + # @schema timeoutSeconds: 3 # -- Node selector to schedule pods on specific nodes (optional) From c3a0c0b9854e2eda075a4c5088510a715cab0dc9 Mon Sep 17 00:00:00 2001 From: Dimosthenis Schizas Date: Tue, 28 Apr 2026 19:30:18 +0300 Subject: [PATCH 3/3] chore(schema): document probe timeout fields --- values.schema.json | 6 +++--- values.yaml | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/values.schema.json b/values.schema.json index 9f2b505..3ae82f0 100644 --- a/values.schema.json +++ b/values.schema.json @@ -229,7 +229,7 @@ }, "timeoutSeconds": { "default": 3, - "description": " type: integer minimum: 1 @schema", + "description": " type: integer minimum: 1 description: Timeout in seconds for the liveness check @schema", "minimum": 1, "title": "timeoutSeconds", "type": "integer" @@ -464,7 +464,7 @@ }, "timeoutSeconds": { "default": 3, - "description": " type: integer minimum: 1 @schema", + "description": " type: integer minimum: 1 description: Timeout in seconds for the readiness check @schema", "minimum": 1, "title": "timeoutSeconds", "type": "integer" @@ -709,7 +709,7 @@ }, "timeoutSeconds": { "default": 3, - "description": " type: integer minimum: 1 @schema", + "description": " type: integer minimum: 1 description: Timeout in seconds for the startup check @schema", "minimum": 1, "title": "timeoutSeconds", "type": "integer" diff --git a/values.yaml b/values.yaml index dc23ed4..eb8ecf8 100644 --- a/values.yaml +++ b/values.yaml @@ -181,6 +181,7 @@ livenessProbe: # @schema # type: integer # minimum: 1 + # description: Timeout in seconds for the liveness check # @schema timeoutSeconds: 3 @@ -207,6 +208,7 @@ startupProbe: # @schema # type: integer # minimum: 1 + # description: Timeout in seconds for the startup check # @schema timeoutSeconds: 3 @@ -233,6 +235,7 @@ readinessProbe: # @schema # type: integer # minimum: 1 + # description: Timeout in seconds for the readiness check # @schema timeoutSeconds: 3