From 9d24ff8d2d675aaba050e32041cfbf6337be62fb Mon Sep 17 00:00:00 2001 From: jamesbeedy Date: Sat, 7 Feb 2026 05:25:24 +0000 Subject: [PATCH] feat: support skip_schema_validation Add support for the skip_schema_validation parameter. --- go/shim/main.go | 7 ++++++- helm_sdkpy/_ffi.py | 4 ++-- helm_sdkpy/actions.py | 4 ++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/go/shim/main.go b/go/shim/main.go index 707101d..9c33462 100644 --- a/go/shim/main.go +++ b/go/shim/main.go @@ -441,7 +441,7 @@ func getConfig(handle C.helm_sdkpy_handle) (*configState, error) { // Install action //export helm_sdkpy_install -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 { +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 { state, err := getConfig(handle) if err != nil { return setError(err) @@ -469,6 +469,11 @@ func helm_sdkpy_install(handle C.helm_sdkpy_handle, release_name *C.char, chart_ // Disable OpenAPI validation as well client.DisableOpenAPIValidation = true + // Skip JSON schema validation if requested (useful for charts with buggy schemas) + if skip_schema_validation != 0 { + client.SkipSchemaValidation = true + } + // Set version if provided if chartVersion != "" { client.Version = chartVersion diff --git a/helm_sdkpy/_ffi.py b/helm_sdkpy/_ffi.py index 2b8bbef..55d942b 100644 --- a/helm_sdkpy/_ffi.py +++ b/helm_sdkpy/_ffi.py @@ -34,13 +34,13 @@ void helm_sdkpy_config_destroy(helm_sdkpy_handle handle); // Install action - 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); + 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); // Upgrade action 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); // Uninstall action - int helm_sdkpy_uninstall(helm_sdkpy_handle handle, const char *release_name, int wait, int timeout_seconds, char **result_json); + int helm_sdkpy_uninstall(helm_sdkpy_handle handle, const char *release_name, int wait, int timeout_seconds, int skip_schema_validation, char **result_json); // List action int helm_sdkpy_list(helm_sdkpy_handle handle, int all, char **result_json); diff --git a/helm_sdkpy/actions.py b/helm_sdkpy/actions.py index a65ba3d..12adc8d 100644 --- a/helm_sdkpy/actions.py +++ b/helm_sdkpy/actions.py @@ -192,6 +192,7 @@ async def run( create_namespace: bool = False, wait: bool = True, timeout: int = 300, + skip_schema_validation: bool = False, ) -> dict[str, Any]: """Install a chart asynchronously. @@ -206,6 +207,8 @@ async def run( create_namespace: Create the release namespace if not present wait: Wait for all resources to be ready (default: True) timeout: Timeout in seconds for wait (default: 300) + skip_schema_validation: Skip JSON schema validation for chart values (default: False). + Useful for charts with strict/buggy schemas (e.g., Istio gateway chart). Returns: Dictionary containing release information @@ -235,6 +238,7 @@ def _install(): 1 if create_namespace else 0, 1 if wait else 0, timeout, + 1 if skip_schema_validation else 0, result_json, )