Skip to content

Commit 46fa344

Browse files
committed
fix(helm): accept boolean and integer applicationConfig values
The schema previously typed each enumerated APPSMITH_* key as string, rejecting natural YAML like APPSMITH_DISABLE_TELEMETRY: true or APPSMITH_MAIL_PORT: 587. Helm and the Kubernetes API stringify scalar values when rendering env vars, so this rejection was purely a schema artifact, not a runtime requirement. Hide the enumerated keys from the schema (keep them in values.yaml as in-file documentation) and broaden additionalProperties to accept any scalar type [string, boolean, integer, number]. Adds a unittest case covering the user-reported scenario.
1 parent 4a88eba commit 46fa344

3 files changed

Lines changed: 53 additions & 99 deletions

File tree

deploy/helm/tests/values_schema_test.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,19 @@ tests:
8181
asserts:
8282
- notFailedTemplate: {}
8383

84+
- name: accepts boolean and integer applicationConfig values
85+
# Users naturally write `true` rather than `"true"` in YAML; Helm/K8s
86+
# stringify scalars when rendering env vars, so the schema must accept
87+
# all scalar types here.
88+
set:
89+
applicationConfig:
90+
APPSMITH_DISABLE_TELEMETRY: true
91+
APPSMITH_SIGNUP_DISABLED: false
92+
APPSMITH_DISABLE_MONITORING: 1
93+
APPSMITH_MAIL_PORT: 587
94+
asserts:
95+
- notFailedTemplate: {}
96+
8497
- name: accepts arbitrary redis pass-through keys
8598
set:
8699
redis:

deploy/helm/values.schema.json

Lines changed: 7 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -17,105 +17,15 @@
1717
"type": "object"
1818
},
1919
"applicationConfig": {
20-
"description": "Map of APPSMITH_* environment variables passed to the application container. Common keys are documented below. See https://docs.appsmith.com/getting-started/setup/environment-variables for the full list. Arbitrary additional string-valued keys are accepted.",
20+
"description": "Map of APPSMITH_* environment variables passed to the application container. Helm and the Kubernetes API stringify scalar values when rendering env vars, so writing booleans (true/false) or integers (1/0) is fine — the schema accepts any scalar. See https://docs.appsmith.com/getting-started/setup/environment-variables for the full list of recognized keys. The keys enumerated here are common starting points and are not exhaustive.",
2121
"type": "object",
22-
"properties": {
23-
"APPSMITH_CLIENT_LOG_LEVEL": {
24-
"type": "string"
25-
},
26-
"APPSMITH_CUSTOM_DOMAIN": {
27-
"type": "string"
28-
},
29-
"APPSMITH_DB_URL": {
30-
"type": "string"
31-
},
32-
"APPSMITH_DISABLE_IFRAME_WIDGET_SANDBOX": {
33-
"type": "string"
34-
},
35-
"APPSMITH_DISABLE_TELEMETRY": {
36-
"type": "string"
37-
},
38-
"APPSMITH_ENCRYPTION_PASSWORD": {
39-
"type": "string"
40-
},
41-
"APPSMITH_ENCRYPTION_SALT": {
42-
"type": "string"
43-
},
44-
"APPSMITH_FORM_LOGIN_DISABLED": {
45-
"type": "string"
46-
},
47-
"APPSMITH_KEYCLOAK_DB_DRIVER": {
48-
"type": "string"
49-
},
50-
"APPSMITH_KEYCLOAK_DB_PASSWORD": {
51-
"type": "string"
52-
},
53-
"APPSMITH_KEYCLOAK_DB_URL": {
54-
"type": "string"
55-
},
56-
"APPSMITH_KEYCLOAK_DB_USERNAME": {
57-
"type": "string"
58-
},
59-
"APPSMITH_LICENSE_KEY": {
60-
"type": "string"
61-
},
62-
"APPSMITH_MAIL_ENABLED": {
63-
"type": "string"
64-
},
65-
"APPSMITH_MAIL_FROM": {
66-
"type": "string"
67-
},
68-
"APPSMITH_MAIL_HOST": {
69-
"type": "string"
70-
},
71-
"APPSMITH_MAIL_PASSWORD": {
72-
"type": "string"
73-
},
74-
"APPSMITH_MAIL_PORT": {
75-
"type": "string"
76-
},
77-
"APPSMITH_MAIL_SMTP_AUTH": {
78-
"type": "string"
79-
},
80-
"APPSMITH_MAIL_SMTP_TLS_ENABLED": {
81-
"type": "string"
82-
},
83-
"APPSMITH_MAIL_USERNAME": {
84-
"type": "string"
85-
},
86-
"APPSMITH_OAUTH2_GITHUB_CLIENT_ID": {
87-
"type": "string"
88-
},
89-
"APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET": {
90-
"type": "string"
91-
},
92-
"APPSMITH_OAUTH2_GOOGLE_CLIENT_ID": {
93-
"type": "string"
94-
},
95-
"APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET": {
96-
"type": "string"
97-
},
98-
"APPSMITH_RECAPTCHA_ENABLED": {
99-
"type": "string"
100-
},
101-
"APPSMITH_RECAPTCHA_SECRET_KEY": {
102-
"type": "string"
103-
},
104-
"APPSMITH_RECAPTCHA_SITE_KEY": {
105-
"type": "string"
106-
},
107-
"APPSMITH_REDIS_URL": {
108-
"type": "string"
109-
},
110-
"APPSMITH_REPLY_TO": {
111-
"type": "string"
112-
},
113-
"APPSMITH_SIGNUP_DISABLED": {
114-
"type": "string"
115-
}
116-
},
11722
"additionalProperties": {
118-
"type": "string"
23+
"type": [
24+
"string",
25+
"boolean",
26+
"integer",
27+
"number"
28+
]
11929
}
12030
},
12131
"autoscaling": {

deploy/helm/values.yaml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,36 +705,67 @@ autoupdate:
705705
# @schema description: Name of an existing Secret to mount as APPSMITH_* environment variables. When empty, the chart creates one from applicationConfig.
706706
secretName: ""
707707

708-
# @schema description: Map of APPSMITH_* environment variables passed to the application container. Common keys are documented below. See https://docs.appsmith.com/getting-started/setup/environment-variables for the full list. Arbitrary additional string-valued keys are accepted.
709-
applicationConfig: # @schema additionalProperties: {type: string}
708+
# @schema description: Map of APPSMITH_* environment variables passed to the application container. Helm and the Kubernetes API stringify scalar values when rendering env vars, so writing booleans (true/false) or integers (1/0) is fine — the schema accepts any scalar. See https://docs.appsmith.com/getting-started/setup/environment-variables for the full list of recognized keys. The keys enumerated here are common starting points and are not exhaustive.
709+
applicationConfig: # @schema additionalProperties: {type: [string, boolean, integer, number]}
710+
# @schema hidden: true
710711
APPSMITH_OAUTH2_GOOGLE_CLIENT_ID: ""
712+
# @schema hidden: true
711713
APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET: ""
714+
# @schema hidden: true
712715
APPSMITH_OAUTH2_GITHUB_CLIENT_ID: ""
716+
# @schema hidden: true
713717
APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET: ""
718+
# @schema hidden: true
714719
APPSMITH_FORM_LOGIN_DISABLED: ""
720+
# @schema hidden: true
715721
APPSMITH_SIGNUP_DISABLED: ""
722+
# @schema hidden: true
716723
APPSMITH_CLIENT_LOG_LEVEL: ""
724+
# @schema hidden: true
717725
APPSMITH_MAIL_ENABLED: ""
726+
# @schema hidden: true
718727
APPSMITH_MAIL_HOST: ""
728+
# @schema hidden: true
719729
APPSMITH_MAIL_PORT: ""
730+
# @schema hidden: true
720731
APPSMITH_MAIL_USERNAME: ""
732+
# @schema hidden: true
721733
APPSMITH_MAIL_PASSWORD: ""
734+
# @schema hidden: true
722735
APPSMITH_MAIL_FROM: ""
736+
# @schema hidden: true
723737
APPSMITH_REPLY_TO: ""
738+
# @schema hidden: true
724739
APPSMITH_MAIL_SMTP_AUTH: ""
740+
# @schema hidden: true
725741
APPSMITH_MAIL_SMTP_TLS_ENABLED: ""
742+
# @schema hidden: true
726743
APPSMITH_DISABLE_TELEMETRY: ""
744+
# @schema hidden: true
727745
APPSMITH_RECAPTCHA_SITE_KEY: ""
746+
# @schema hidden: true
728747
APPSMITH_RECAPTCHA_SECRET_KEY: ""
748+
# @schema hidden: true
729749
APPSMITH_RECAPTCHA_ENABLED: ""
750+
# @schema hidden: true
730751
APPSMITH_DB_URL: ""
752+
# @schema hidden: true
731753
APPSMITH_REDIS_URL: ""
754+
# @schema hidden: true
732755
APPSMITH_ENCRYPTION_PASSWORD: ""
756+
# @schema hidden: true
733757
APPSMITH_ENCRYPTION_SALT: ""
758+
# @schema hidden: true
734759
APPSMITH_CUSTOM_DOMAIN: ""
760+
# @schema hidden: true
735761
APPSMITH_DISABLE_IFRAME_WIDGET_SANDBOX: "false"
762+
# @schema hidden: true
736763
APPSMITH_LICENSE_KEY: ""
764+
# @schema hidden: true
737765
APPSMITH_KEYCLOAK_DB_DRIVER: ""
766+
# @schema hidden: true
738767
APPSMITH_KEYCLOAK_DB_USERNAME: ""
768+
# @schema hidden: true
739769
APPSMITH_KEYCLOAK_DB_PASSWORD: ""
770+
# @schema hidden: true
740771
APPSMITH_KEYCLOAK_DB_URL: ""

0 commit comments

Comments
 (0)