Skip to content

Commit e8552d0

Browse files
authored
feat: support skip_schema_validation (#33)
Add support for the skip_schema_validation parameter.
1 parent a465d49 commit e8552d0

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

go/shim/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ func getConfig(handle C.helm_sdkpy_handle) (*configState, error) {
441441
// Install action
442442

443443
//export helm_sdkpy_install
444-
func helm_sdkpy_install(handle C.helm_sdkpy_handle, release_name *C.char, chart_path *C.char, values_json *C.char, version *C.char, create_namespace C.int, wait C.int, timeout_seconds C.int, result_json **C.char) C.int {
444+
func helm_sdkpy_install(handle C.helm_sdkpy_handle, release_name *C.char, chart_path *C.char, values_json *C.char, version *C.char, create_namespace C.int, wait C.int, timeout_seconds C.int, skip_schema_validation C.int, result_json **C.char) C.int {
445445
state, err := getConfig(handle)
446446
if err != nil {
447447
return setError(err)
@@ -469,6 +469,11 @@ func helm_sdkpy_install(handle C.helm_sdkpy_handle, release_name *C.char, chart_
469469
// Disable OpenAPI validation as well
470470
client.DisableOpenAPIValidation = true
471471

472+
// Skip JSON schema validation if requested (useful for charts with buggy schemas)
473+
if skip_schema_validation != 0 {
474+
client.SkipSchemaValidation = true
475+
}
476+
472477
// Set version if provided
473478
if chartVersion != "" {
474479
client.Version = chartVersion

helm_sdkpy/_ffi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@
3434
void helm_sdkpy_config_destroy(helm_sdkpy_handle handle);
3535
3636
// Install action
37-
int helm_sdkpy_install(helm_sdkpy_handle handle, const char *release_name, const char *chart_path, const char *values_json, const char *version, int create_namespace, int wait, int timeout_seconds, char **result_json);
37+
int helm_sdkpy_install(helm_sdkpy_handle handle, const char *release_name, const char *chart_path, const char *values_json, const char *version, int create_namespace, int wait, int timeout_seconds, int skip_schema_validation, char **result_json);
3838
3939
// Upgrade action
4040
int helm_sdkpy_upgrade(helm_sdkpy_handle handle, const char *release_name, const char *chart_path, const char *values_json, const char *version, char **result_json);
4141
4242
// Uninstall action
43-
int helm_sdkpy_uninstall(helm_sdkpy_handle handle, const char *release_name, int wait, int timeout_seconds, char **result_json);
43+
int helm_sdkpy_uninstall(helm_sdkpy_handle handle, const char *release_name, int wait, int timeout_seconds, int skip_schema_validation, char **result_json);
4444
4545
// List action
4646
int helm_sdkpy_list(helm_sdkpy_handle handle, int all, char **result_json);

helm_sdkpy/actions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ async def run(
192192
create_namespace: bool = False,
193193
wait: bool = True,
194194
timeout: int = 300,
195+
skip_schema_validation: bool = False,
195196
) -> dict[str, Any]:
196197
"""Install a chart asynchronously.
197198
@@ -206,6 +207,8 @@ async def run(
206207
create_namespace: Create the release namespace if not present
207208
wait: Wait for all resources to be ready (default: True)
208209
timeout: Timeout in seconds for wait (default: 300)
210+
skip_schema_validation: Skip JSON schema validation for chart values (default: False).
211+
Useful for charts with strict/buggy schemas (e.g., Istio gateway chart).
209212
210213
Returns:
211214
Dictionary containing release information
@@ -235,6 +238,7 @@ def _install():
235238
1 if create_namespace else 0,
236239
1 if wait else 0,
237240
timeout,
241+
1 if skip_schema_validation else 0,
238242
result_json,
239243
)
240244

0 commit comments

Comments
 (0)