feat: add skip json schema validation during the install /upgrade of a Chart
This pull request introduces a new --skip-schema-validation flag across various commands and configurations to improve flexibility in schema validation handling. The changes span multiple files and functions to ensure comprehensive integration of this new option.
New Flag Integration:
-
cmd/apply.go,cmd/sync.go,cmd/template.go: Added--skip-schema-validationflag to the respective commands. [1] [2] [3]
Configuration and Option Updates:
-
pkg/config/apply.go,pkg/config/diff.go,pkg/config/sync.go,pkg/config/template.go: AddedSkipSchemaValidationfield to the options structs and implemented corresponding methods. [1] [2] [3] [4] -
pkg/app/config.go: UpdatedApplyConfigProviderandDiffConfigProviderinterfaces to includeSkipSchemaValidationmethod. [1] [2]
Functional Enhancements:
-
pkg/app/app.go: IntegratedSkipSchemaValidationinto the apply and diff functions. [1] [2] -
pkg/state/helmx.go: Added method to append--skip-schema-validationflag to helm commands. -
pkg/state/state.go: Updated Helm and Release specifications to includeSkipSchemaValidationand integrated it into the flag generation for upgrade and diff commands. [1] [2] [3] [4] [5] [6]
Test and Mock Updates:
-
pkg/app/app_test.go,pkg/app/diff_test.go: AddedSkipSchemaValidationto config structs and implemented corresponding methods in mocks. [1] [2] [3] [4] [5] [6] [7] -
pkg/exectest/helm.go,pkg/helmexec/exec.go: Added mock methods for handlingSkipSchemaValidation. [1] [2] [3]
@yxxhero ``` temp_test.go:38: unexpected result: want (-), got (+): string( - "foo-values-d566bffd8", + "foo-values-5db58595d7", ) === RUN TestGenerateID/different_bytes_content temp_test.go:44: unexpected result: want (-), got (+): string( - "foo-values-65b557f8c5", + "foo-values-78d88d86dd", ) === RUN TestGenerateID/different_map_content temp_test.go:51: unexpected result: want (-), got (+): string( - "foo-values-74d5cd8cc7", + "foo-values-f9c8967cd", ) === RUN TestGenerateID/different_chart temp_test.go:58: unexpected result: want (-), got (+): string( - "foo-values-85db6bbb4c", + "foo-values-cdfb97444", ) === RUN TestGenerateID/different_name temp_test.go:64: unexpected result: want (-), got (+): string( - "bar-values-85cf974b7", + "bar-values-749bc4c6d4", ) === RUN TestGenerateID/specific_ns temp_test.go:70: unexpected result: want (-), got (+): string( - "myns-foo-values-574676fbb9", + "myns-foo-values-7b74fbd6d6", ) --- FAIL: TestGenerateID (0.00s) --- FAIL: TestGenerateID/baseline (0.00s) --- FAIL: TestGenerateID/different_bytes_content (0.00s) --- FAIL: TestGenerateID/different_map_content (0.00s) --- FAIL: TestGenerateID/different_chart (0.00s) --- FAIL: TestGenerateID/different_name (0.00s) --- FAIL: TestGenerateID/specific_ns (0.00s)
@zhaque44 update the values.
@zhaque44 https://github.com/databus23/helm-diff/pull/676
Works only for diff and upgrade commands but not for template.
Works only for
diffandupgradecommands but not fortemplate.
@zhaque44