diff --git a/README.md b/README.md index 3bb3c18b..e865839b 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ Flags: --disable-openapi-validation disables rendered templates validation against the Kubernetes OpenAPI Schema --disable-validation disables rendered templates validation against the Kubernetes cluster you are currently pointing to. This is the same validation performed on an install --dry-run disables cluster access and show diff as if it was install. Implies --install, --reset-values, and --disable-validation + --enable-dns enable DNS lookups when rendering templates -D, --find-renames float32 Enable rename detection if set to any value greater than 0. If specified, the value denotes the maximum fraction of changed content as lines added + removed compared to total lines in a diff for considering it a rename. Only objects of the same Kind are attempted to be matched -h, --help help for diff --include-tests enable the diffing of the helm test hooks @@ -188,6 +189,7 @@ Flags: --disable-openapi-validation disables rendered templates validation against the Kubernetes OpenAPI Schema --disable-validation disables rendered templates validation against the Kubernetes cluster you are currently pointing to. This is the same validation performed on an install --dry-run disables cluster access and show diff as if it was install. Implies --install, --reset-values, and --disable-validation + --enable-dns enable DNS lookups when rendering templates -D, --find-renames float32 Enable rename detection if set to any value greater than 0. If specified, the value denotes the maximum fraction of changed content as lines added + removed compared to total lines in a diff for considering it a rename. Only objects of the same Kind are attempted to be matched -h, --help help for upgrade --include-tests enable the diffing of the helm test hooks diff --git a/cmd/helm3.go b/cmd/helm3.go index cb3e8c1d..c860dab4 100644 --- a/cmd/helm3.go +++ b/cmd/helm3.go @@ -191,6 +191,10 @@ func (d *diffCmd) template(isUpgrade bool) ([]byte, error) { flags = append(flags, "--disable-openapi-validation") } + if d.enableDNS { + flags = append(flags, "--enable-dns") + } + var ( subcmd string filter func([]byte) []byte diff --git a/cmd/upgrade.go b/cmd/upgrade.go index 0f8bfb8d..1c32979a 100644 --- a/cmd/upgrade.go +++ b/cmd/upgrade.go @@ -40,6 +40,7 @@ type diffCmd struct { disableOpenAPIValidation bool dryRunMode string dryRunModeSpecified bool + enableDNS bool namespace string // namespace to assume the release to be installed into. Defaults to the current kube config namespace. valueFiles valueFiles values []string @@ -286,6 +287,7 @@ func newChartCommand() *cobra.Command { f.BoolVar(&diff.devel, "devel", false, "use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored.") f.BoolVar(&diff.disableValidation, "disable-validation", false, "disables rendered templates validation against the Kubernetes cluster you are currently pointing to. This is the same validation performed on an install") f.BoolVar(&diff.disableOpenAPIValidation, "disable-openapi-validation", false, "disables rendered templates validation against the Kubernetes OpenAPI Schema") + f.BoolVar(&diff.enableDNS, "enable-dns", false, "enable DNS lookups when rendering templates") f.StringVar(&diff.postRenderer, "post-renderer", "", "the path to an executable to be used for post rendering. If it exists in $PATH, the binary will be used, otherwise it will try to look for the executable at the given path") f.StringArrayVar(&diff.postRendererArgs, "post-renderer-args", []string{}, "an argument to the post-renderer (can specify multiple)") f.BoolVar(&diff.insecureSkipTLSVerify, "insecure-skip-tls-verify", false, "skip tls certificate checks for the chart download")