Skip to content

Commit 9b481b1

Browse files
dmosessonDaniel Mosesson (soandos)
and
Daniel Mosesson (soandos)
authoredDec 3, 2024··
feat: Adding skipSchemaValidation flag (#20771) (#20831)
* Adding skipSchemaValidation flag Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com> * Adding specific test for skip schema validation Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com> * Fix merge conflict Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com> * Fixing index.yaml to support helm 3.16 Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com> --------- Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com> Co-authored-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com>
1 parent 9587ec9 commit 9b481b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1548
-778
lines changed
 

‎assets/swagger.json

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎cmd/util/app.go

+8
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ type AppOptions struct {
5050
helmVersion string
5151
helmPassCredentials bool
5252
helmSkipCrds bool
53+
helmSkipSchemaValidation bool
5354
helmSkipTests bool
5455
helmNamespace string
5556
helmKubeVersion string
@@ -126,6 +127,7 @@ func AddAppFlags(command *cobra.Command, opts *AppOptions) {
126127
command.Flags().StringArrayVar(&opts.helmSetStrings, "helm-set-string", []string{}, "Helm set STRING values on the command line (can be repeated to set several values: --helm-set-string key1=val1 --helm-set-string key2=val2)")
127128
command.Flags().StringArrayVar(&opts.helmSetFiles, "helm-set-file", []string{}, "Helm set values from respective files specified via the command line (can be repeated to set several values: --helm-set-file key1=path1 --helm-set-file key2=path2)")
128129
command.Flags().BoolVar(&opts.helmSkipCrds, "helm-skip-crds", false, "Skip helm crd installation step")
130+
command.Flags().BoolVar(&opts.helmSkipSchemaValidation, "helm-skip-schema-validation", false, "Skip helm schema validation step")
129131
command.Flags().BoolVar(&opts.helmSkipTests, "helm-skip-tests", false, "Skip helm test manifests installation step")
130132
command.Flags().StringVar(&opts.helmNamespace, "helm-namespace", "", "Helm namespace to use when running helm template. If not set, use app.spec.destination.namespace")
131133
command.Flags().StringVar(&opts.helmKubeVersion, "helm-kube-version", "", "Helm kube-version to use when running helm template. If not set, use the kube version from the destination cluster")
@@ -377,6 +379,7 @@ type helmOpts struct {
377379
helmSetFiles []string
378380
passCredentials bool
379381
skipCrds bool
382+
skipSchemaValidation bool
380383
skipTests bool
381384
namespace string
382385
kubeVersion string
@@ -411,6 +414,9 @@ func setHelmOpt(src *argoappv1.ApplicationSource, opts helmOpts) {
411414
if opts.skipCrds {
412415
src.Helm.SkipCrds = opts.skipCrds
413416
}
417+
if opts.skipSchemaValidation {
418+
src.Helm.SkipSchemaValidation = opts.skipSchemaValidation
419+
}
414420
if opts.skipTests {
415421
src.Helm.SkipTests = opts.skipTests
416422
}
@@ -681,6 +687,8 @@ func ConstructSource(source *argoappv1.ApplicationSource, appOpts AppOptions, fl
681687
setHelmOpt(source, helmOpts{helmSetFiles: appOpts.helmSetFiles})
682688
case "helm-skip-crds":
683689
setHelmOpt(source, helmOpts{skipCrds: appOpts.helmSkipCrds})
690+
case "helm-skip-schema-validation":
691+
setHelmOpt(source, helmOpts{skipSchemaValidation: appOpts.helmSkipSchemaValidation})
684692
case "helm-skip-tests":
685693
setHelmOpt(source, helmOpts{skipTests: appOpts.helmSkipTests})
686694
case "helm-namespace":

0 commit comments

Comments
 (0)
Please sign in to comment.