Skip to content

Commit fd1038a

Browse files
authored
Add enable dns flag (#544)
* Add enable dns flag * Revert go.mod and go.sum changes
1 parent 8c83afb commit fd1038a

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ Flags:
9393
--disable-openapi-validation disables rendered templates validation against the Kubernetes OpenAPI Schema
9494
--disable-validation disables rendered templates validation against the Kubernetes cluster you are currently pointing to. This is the same validation performed on an install
9595
--dry-run disables cluster access and show diff as if it was install. Implies --install, --reset-values, and --disable-validation
96+
--enable-dns enable DNS lookups when rendering templates
9697
-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
9798
-h, --help help for diff
9899
--include-tests enable the diffing of the helm test hooks
@@ -188,6 +189,7 @@ Flags:
188189
--disable-openapi-validation disables rendered templates validation against the Kubernetes OpenAPI Schema
189190
--disable-validation disables rendered templates validation against the Kubernetes cluster you are currently pointing to. This is the same validation performed on an install
190191
--dry-run disables cluster access and show diff as if it was install. Implies --install, --reset-values, and --disable-validation
192+
--enable-dns enable DNS lookups when rendering templates
191193
-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
192194
-h, --help help for upgrade
193195
--include-tests enable the diffing of the helm test hooks

cmd/helm3.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ func (d *diffCmd) template(isUpgrade bool) ([]byte, error) {
191191
flags = append(flags, "--disable-openapi-validation")
192192
}
193193

194+
if d.enableDNS {
195+
flags = append(flags, "--enable-dns")
196+
}
197+
194198
var (
195199
subcmd string
196200
filter func([]byte) []byte

cmd/upgrade.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ type diffCmd struct {
4040
disableOpenAPIValidation bool
4141
dryRunMode string
4242
dryRunModeSpecified bool
43+
enableDNS bool
4344
namespace string // namespace to assume the release to be installed into. Defaults to the current kube config namespace.
4445
valueFiles valueFiles
4546
values []string
@@ -286,6 +287,7 @@ func newChartCommand() *cobra.Command {
286287
f.BoolVar(&diff.devel, "devel", false, "use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored.")
287288
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")
288289
f.BoolVar(&diff.disableOpenAPIValidation, "disable-openapi-validation", false, "disables rendered templates validation against the Kubernetes OpenAPI Schema")
290+
f.BoolVar(&diff.enableDNS, "enable-dns", false, "enable DNS lookups when rendering templates")
289291
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")
290292
f.StringArrayVar(&diff.postRendererArgs, "post-renderer-args", []string{}, "an argument to the post-renderer (can specify multiple)")
291293
f.BoolVar(&diff.insecureSkipTLSVerify, "insecure-skip-tls-verify", false, "skip tls certificate checks for the chart download")

0 commit comments

Comments
 (0)