Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
28d5f54
Squashed 'pkg/helm/' content from commit f03cc04ca
ilya-lesikov Mar 24, 2026
07f2dfc
Merge commit '28d5f541b451a05b362ec8c8dee9556d34eeefc8' as 'pkg/helm'
ilya-lesikov Mar 24, 2026
961ca04
feat!: new major release 2.0
ilya-lesikov Mar 27, 2026
ebc52bf
chore: sync with main
dmmordvi Mar 31, 2026
8348f9b
refactor: remove unnecessary flags and featgates
dmmordvi Apr 1, 2026
c089430
refactor: remove unnecessary ChartDirPath
dmmordvi Apr 2, 2026
3ef6dc9
refactor: update dependency handling to support multiple operations
dmmordvi Apr 2, 2026
be2f6f8
refactor: remove deprecated dependency annotation `<name>.dependency.…
dmmordvi Apr 3, 2026
3406519
deps: replace andremueller/cobra fork with werf/3p-cobra rebased on v…
alexey-igrychev Apr 6, 2026
074d350
feat: new release history
dmmordvi Apr 7, 2026
56c19f1
refactor: rename release history --max to --revisions-limit and chang…
dmmordvi Apr 7, 2026
1a42481
feat: expose plan artifact in actions api (#586)
drey Apr 8, 2026
4c37982
Merge branch 'main' into 2
dmmordvi Apr 9, 2026
2ee2d05
chore: remove renaming step `main -> helm` from helm sync task
dmmordvi Apr 9, 2026
e2da8b7
Merge branch 'main' into 2
dmmordvi Apr 21, 2026
1e1068f
fix: use v3 util for Chart.yaml load
dmmordvi Apr 21, 2026
7a758a4
fix: clientFactory=nil breaks werf tests
dmmordvi Apr 22, 2026
e9ec2eb
doc: add plan artifact feature description (#597)
drey Apr 23, 2026
8a3cba3
chore: fix typo in the README.md (#598)
drey Apr 23, 2026
d1b6297
feat: forbid resource recreation if helm.sh/resource-policy set
drey Apr 24, 2026
3ebc015
chore: helm test cleanup and linter fixes (#609)
dmmordvi Apr 28, 2026
3e7ff15
refactor: change Version to APIVersion in ReleaseReportV3 (#607)
dmmordvi Apr 28, 2026
2159f96
feat: bump default local kube version for rendering to 1.36.0
ilya-lesikov Apr 29, 2026
55bc462
fix: simpler sorting for resources
ilya-lesikov Apr 29, 2026
3651474
fix: don't hard-fail on unsupported env vars
ilya-lesikov Apr 29, 2026
3a2264e
fix: remove support for all legacy HELM_* env vars (#611)
ilya-lesikov Apr 29, 2026
64ef060
fix: --set/set-file/set-string flags incorrectly split on commas
ilya-lesikov May 5, 2026
7f6b863
refactor: join Hooks and Resources as ResourceSpecs (#612)
dmmordvi May 5, 2026
4b380c7
refactor: use `encoding/json` for marshaling and unmarshaling (#613)
dmmordvi May 7, 2026
d0b1f53
feat: add DockerConfig flag (#605)
dmmordvi May 12, 2026
73d4a88
feat: improve runtime annotations and labels handling (#615)
drey May 13, 2026
a8c983f
feat: fail on invalid annotations or labels (#614)
drey May 13, 2026
ec40944
feat: allow to disable values schema validation (#616)
drey May 13, 2026
46e98e9
fix: pass NoPodLogs to kubedog (#621)
drey May 15, 2026
4a0b1e8
feat: set default delete propagation policy to backgound (#623)
drey May 18, 2026
581acf9
feat: support external dependencies for deploy-dependency and delete-…
dmmordvi May 18, 2026
438a1e2
fix: add SetupColorLevel function for enhanced logging color configur…
dmmordvi May 18, 2026
18ad551
feat: use transformers and patchers on rollback (#624)
drey May 25, 2026
8528a0a
feat: remove deprecated external dependencies annotations (#625)
dmmordvi May 26, 2026
adf8a42
feat: case insensitive group/version/kind for `deploy/delete-dependen…
dmmordvi May 26, 2026
74d3ea4
fix: correct fork:helm:sync task
drey May 27, 2026
ea85faf
feat: upgrade to helm v4.2.0 (#627)
drey Jun 4, 2026
ae98e04
feat: native Chart v3 and Release v2 support
drey Jun 10, 2026
8f935db
refactor: refactor chart v3 and release v2 support
ilya-lesikov Jun 16, 2026
ec0af5b
feat: move repo commands from root to chart repo (#640)
dmmordvi Jun 17, 2026
c22d5fd
docs: enhance README with external dependency handling details for an…
dmmordvi Jun 17, 2026
89f4783
chore: add method to update release storage labels
ilya-lesikov Jul 8, 2026
4acd290
chore: reformat
ilya-lesikov Jul 8, 2026
e2780d5
Merge branch 'main' into 2
dmmordvi Jul 9, 2026
d414ee7
fix: resolve issues after conflicts
dmmordvi Jul 9, 2026
ee64bf7
chore: bump kubedog
dmmordvi Jul 9, 2026
9241ea8
feat: add --diff-patches and patches.yaml support
ilya-lesikov Jul 10, 2026
deda7bc
chore: fix tests
ilya-lesikov Jul 14, 2026
5c9ccec
chore: remove leaked test files
ilya-lesikov Jul 14, 2026
8f85359
fix: cleanup TODOs for major (#663)
ilya-lesikov Jul 21, 2026
fec1159
fix: register go-client auth plugins (#670)
drey Jul 27, 2026
0d2b4e0
feat: port --lookup-resources and --no-create-namespace from main (#671)
alexey-igrychev Jul 28, 2026
f6ce79b
feat: embed kubeconform validation schemas into the binary (#673)
drey Jul 31, 2026
2a29517
fix: repair ai lookup tests after helm fork api changes (#676)
drey Jul 31, 2026
cb96a15
feat: embed deno binary into release binaries behind embeddeno tag
dmmordvi Jul 30, 2026
bee47f9
refactor: pass embedded Deno by context through TypeScriptOptions
dmmordvi Jul 31, 2026
615df53
feat: enhance Deno embedding process and sync platform lists
dmmordvi Jul 31, 2026
62d593f
fix: harden deno embedding per review findings
dmmordvi Jul 31, 2026
ee84ed7
fix: format taskfile
dmmordvi Jul 31, 2026
3abafee
fix: remove unsupported os/arch from getDownloadLink
dmmordvi Jul 31, 2026
9b5af8d
fix: restore DENO_EMBED_ROOT for werf
dmmordvi Jul 31, 2026
4c91c3a
fix: pin deno digests in the repository instead of fetching them
dmmordvi Jul 31, 2026
bd6de22
refactor: move embed-deno to scripts and drop the redundant sha option
dmmordvi Jul 31, 2026
0ed2a27
refactor: clear comments
dmmordvi Aug 1, 2026
55abe9f
chore: add comment about unsupported platform
dmmordvi Aug 1, 2026
fa56ffe
refactor: use restify instead of http for denolock client
dmmordvi Aug 1, 2026
0b9d576
chore: bump deno version and update deno lock
dmmordvi Aug 1, 2026
45823a4
chore: add check_deno_lock_upstream job to CI workflow
dmmordvi Aug 1, 2026
8b91b6d
docs: update deno lock version in README.md
dmmordvi Aug 1, 2026
79ce86a
fix: ignore helm.sh(werf.io)/resource-policy: keep from cluster
ilya-lesikov Aug 4, 2026
e9bbd6e
feat: clean null fields in rendered manifests by default for better c…
ilya-lesikov Aug 4, 2026
1c5d25e
fix: injected service values might break values.schema.json
ilya-lesikov Aug 4, 2026
9d04918
fix: optimize validation args
drey Aug 5, 2026
26aa17e
Merge branch 'main' into 2
ilya-lesikov Aug 6, 2026
b4771c6
fix: exclude external dependencies from readiness forcing
ilya-lesikov Aug 6, 2026
5647588
feat: add case-insensitive-condition-tracking feature gate
ilya-lesikov Aug 6, 2026
ec98995
fix(helm): serialize action configuration initialization (#686)
alexey-igrychev Aug 7, 2026
9d7f0cb
Merge remote-tracking branch 'origin/2' into 2
ilya-lesikov Aug 7, 2026
91104e4
chore: format
ilya-lesikov Aug 7, 2026
f5a2103
chore: bump kubedog
ilya-lesikov Aug 7, 2026
6f46733
fix: prevent concurrent Helm configuration races (#688)
alexey-igrychev Aug 7, 2026
0585a1f
feat: always track resource conditions case-insensitively
ilya-lesikov Aug 7, 2026
72d7f3d
chore: bump kubedog
ilya-lesikov Aug 9, 2026
0609686
fix: prevent progress printer race (#690)
alexey-igrychev Aug 10, 2026
8ed2393
chore: add AGENTS.md symlink for claude (#694)
dmmordvi Aug 20, 2026
191171c
feat: add `renderPatches` support for --patches/patches.yaml (#696)
dmmordvi Aug 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/workflows/test_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- 'go.mod'
- 'go.sum'
- 'cmd/nelm/**'
- 'internal/**'
- 'pkg/**'
- 'scripts/**'
lint:
Expand Down
7 changes: 3 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All rules in this document are requirements — not suggestions. ALWAYS follow them.

Nelm is a Go-based Kubernetes deployment tool, which deploys Helm charts, is compatible with Helm releases, and is an alternative to Helm. Nelm is built on top of a Helm fork ([werf/3p-helm](https://github.com/werf/3p-helm)) and is also used as the deployment engine of [werf](https://github.com/werf/werf).
Nelm is a Go-based Kubernetes deployment tool, which deploys Helm charts, is compatible with Helm releases, and is an alternative to Helm. Nelm is built on top of a Helm fork and is also used as the deployment engine of [werf](https://github.com/werf/werf).

## Highest-priority rule (MANDATORY)

Expand Down Expand Up @@ -75,7 +75,7 @@ ALWAYS use these `task` commands. NEVER use raw `go build`, `go test`, `go fmt`,
- ALWAYS place tests alongside source files, not in a separate directory.
- Test helpers go in `helpers_test.go` (or `helpers_ai_test.go` for AI-written helpers).
- Test fixtures go in `testdata/` subdirectory next to the tests.
- Shared test helpers are in `internal/test/`.
- Shared test helpers are in `pkg/test/`.

## PR review guidelines (MANDATORY)

Expand All @@ -85,7 +85,6 @@ ALWAYS use these `task` commands. NEVER use raw `go build`, `go test`, `go fmt`,

## Related repositories

- [werf/3p-helm](https://github.com/werf/3p-helm) — Helm fork. Provides chart loading, rendering, and release primitives. Changes to Helm internals go here, not in nelm.
- [werf/kubedog](https://github.com/werf/kubedog) — Kubernetes resource tracking library. Used by `internal/track/`.
- [werf/kubedog](https://github.com/werf/kubedog) — Kubernetes resource tracking library. Used by `pkg/track/`.
- [werf/common-go](https://github.com/werf/common-go) — Shared Go libraries (secrets, CLI utilities, locking).
- [werf/werf](https://github.com/werf/werf) — CI/CD tool that uses nelm as its deployment engine.
26 changes: 17 additions & 9 deletions Taskfile.dist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ tasks:
internal: true
run: once
cmds:
- golangci-lint run {{if eq .fix "true"}}--fix{{end}} --build-tags="{{.tags}}" {{.CLI_ARGS}} {{.paths | default "$(find pkg/ -mindepth 1 -maxdepth 1 -type d ! -name helm -printf './%p/... ' 2>/dev/null || find pkg/ -mindepth 1 -maxdepth 1 -type d ! -name helm | xargs -I{} echo './{}/...') ./cmd/..."}}
- golangci-lint run {{if eq .fix "true"}}--fix{{end}} --build-tags="{{.tags}}" {{.CLI_ARGS}} {{.paths | default "$(find pkg/ -mindepth 1 -maxdepth 1 -type d ! -name helm -printf './%p/... ') ./cmd/..."}}
vars:
paths: "{{.paths}}"

Expand Down Expand Up @@ -237,7 +237,7 @@ tasks:
- task: test:ginkgo
vars:
paths: '{{.paths | default "./pkg ./cmd"}}'
skipPackage: "pkg/helm{{if .skipPackage}},{{.skipPackage}}{{end}}"
skipPackage: "{{.skipPackage}}"
parallel: "{{.parallel}}"

verify:binaries:dist:all:
Expand Down Expand Up @@ -500,13 +500,21 @@ tasks:
git fetch "{{.forkTempRemote}}" prepared
git checkout -B "{{.forkSyncBranch}}" FETCH_HEAD --no-track

stripped=0
while IFS= read -r sync_path; do
if ! git -c core.quotePath=false ls-tree --name-only "${original_ref}" -- "{{.forkPrefix}}/${sync_path}" | grep -q .; then
git rm -rf -- "$sync_path"
stripped=$((stripped + 1))
fi
done < <(git ls-tree --name-only HEAD)
prev_split=$(git log --grep="git-subtree-dir: {{.forkPrefix}}" --format="%b" "${original_ref}" | grep -m1 "^git-subtree-split:" | cut -d' ' -f2)
if [ -z "$prev_split" ]; then
echo "WARNING: no previous subtree split found for {{.forkPrefix}}, skipping file stripping"
else
stripped=0
while IFS= read -r sync_path; do
if ! git -c core.quotePath=false ls-tree "${original_ref}" -- "{{.forkPrefix}}/${sync_path}" | grep -q .; then
if git -c core.quotePath=false ls-tree "$prev_split" -- "$sync_path" | grep -q .; then
git rm -rf -- "$sync_path"
stripped=$((stripped + 1))
fi
fi
done < <(git -c core.quotePath=false ls-tree -r --name-only HEAD)
echo "Stripped $stripped files that were removed from our fork"
fi

if ! git diff --cached --quiet; then
git commit -m "sync: strip paths not kept in {{.forkPrefix}}"
Expand Down
7 changes: 4 additions & 3 deletions cmd/nelm/chart_dependency_download.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import (
"github.com/spf13/cobra"

"github.com/werf/common-go/pkg/cli"
helm_v3 "github.com/werf/nelm/pkg/helm/cmd/helm"
"github.com/werf/nelm/pkg/action"
"github.com/werf/nelm/pkg/helm/pkg/chart/loader"
helmcmd "github.com/werf/nelm/pkg/helm/pkg/cmd"
"github.com/werf/nelm/pkg/log"
)

Expand All @@ -31,9 +32,9 @@ func newChartDependencyDownloadCommand(ctx context.Context, afterAllCommandsBuil

originalRunE := cmd.RunE
cmd.RunE = func(cmd *cobra.Command, args []string) error {
helmSettings := helm_v3.Settings
helmSettings := helmcmd.Settings

ctx = log.SetupLogging(ctx, lo.Ternary(helmSettings.Debug, log.DebugLevel, log.InfoLevel), log.SetupLoggingOptions{})
ctx = action.SetupLogging(ctx, lo.Ternary(helmSettings.Debug, log.DebugLevel, log.InfoLevel), action.SetupLoggingOptions{})

loader.NoChartLockWarning = ""

Expand Down
7 changes: 4 additions & 3 deletions cmd/nelm/chart_dependency_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import (
"github.com/spf13/cobra"

"github.com/werf/common-go/pkg/cli"
helm_v3 "github.com/werf/nelm/pkg/helm/cmd/helm"
"github.com/werf/nelm/pkg/action"
"github.com/werf/nelm/pkg/helm/pkg/chart/loader"
helmcmd "github.com/werf/nelm/pkg/helm/pkg/cmd"
"github.com/werf/nelm/pkg/log"
)

Expand All @@ -29,9 +30,9 @@ func newChartDependencyUpdateCommand(ctx context.Context, afterAllCommandsBuiltF

originalRunE := cmd.RunE
cmd.RunE = func(cmd *cobra.Command, args []string) error {
helmSettings := helm_v3.Settings
helmSettings := helmcmd.Settings

ctx = log.SetupLogging(ctx, lo.Ternary(helmSettings.Debug, log.DebugLevel, log.InfoLevel), log.SetupLoggingOptions{})
ctx = action.SetupLogging(ctx, lo.Ternary(helmSettings.Debug, log.DebugLevel, log.InfoLevel), action.SetupLoggingOptions{})

loader.NoChartLockWarning = ""

Expand Down
7 changes: 4 additions & 3 deletions cmd/nelm/chart_download.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import (
"github.com/spf13/cobra"

"github.com/werf/common-go/pkg/cli"
helm_v3 "github.com/werf/nelm/pkg/helm/cmd/helm"
"github.com/werf/nelm/pkg/action"
"github.com/werf/nelm/pkg/helm/pkg/chart/loader"
helmcmd "github.com/werf/nelm/pkg/helm/pkg/cmd"
"github.com/werf/nelm/pkg/log"
)

Expand All @@ -26,9 +27,9 @@ func newChartDownloadCommand(ctx context.Context, afterAllCommandsBuiltFuncs map

originalRunE := cmd.RunE
cmd.RunE = func(cmd *cobra.Command, args []string) error {
helmSettings := helm_v3.Settings
helmSettings := helmcmd.Settings

ctx = log.SetupLogging(ctx, lo.Ternary(helmSettings.Debug, log.DebugLevel, log.InfoLevel), log.SetupLoggingOptions{})
ctx = action.SetupLogging(ctx, lo.Ternary(helmSettings.Debug, log.DebugLevel, log.InfoLevel), action.SetupLoggingOptions{})

loader.NoChartLockWarning = ""

Expand Down
4 changes: 1 addition & 3 deletions cmd/nelm/chart_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ func newChartInitCommand(ctx context.Context, afterAllCommandsBuiltFuncs map[*co
},
},
func(cmd *cobra.Command, args []string) error {
ctx = log.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), log.InfoLevel), log.SetupLoggingOptions{
ColorMode: cfg.LogColorMode,
})
ctx = action.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), log.InfoLevel), action.SetupLoggingOptions{ColorMode: cfg.LogColorMode})

if len(args) > 0 {
cfg.ChartDirPath = args[0]
Expand Down
29 changes: 8 additions & 21 deletions cmd/nelm/chart_lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/werf/common-go/pkg/cli"
"github.com/werf/nelm/pkg/action"
"github.com/werf/nelm/pkg/common"
"github.com/werf/nelm/pkg/featgate"
"github.com/werf/nelm/pkg/log"
)

Expand All @@ -25,11 +24,7 @@ func newChartLintCommand(ctx context.Context, afterAllCommandsBuiltFuncs map[*co
cfg := &chartLintConfig{}

use := "lint [options...]"
if featgate.FeatGateRemoteCharts.Enabled() || featgate.FeatGatePreviewV2.Enabled() {
use += " [chart-dir|chart-repo-name/chart-name|chart-archive|chart-archive-url]"
} else {
use += " [chart-dir]"
}
use += " [chart-dir|chart-repo-name/chart-name|chart-archive|chart-archive-url]"

cmd := cli.NewSubCommand(
ctx,
Expand All @@ -45,16 +40,10 @@ func newChartLintCommand(ctx context.Context, afterAllCommandsBuiltFuncs map[*co
},
},
func(cmd *cobra.Command, args []string) error {
ctx = log.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultChartLintLogLevel), log.SetupLoggingOptions{
ColorMode: cfg.LogColorMode,
})
ctx = action.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultChartLintLogLevel), action.SetupLoggingOptions{ColorMode: cfg.LogColorMode})

if len(args) > 0 {
if featgate.FeatGateRemoteCharts.Enabled() || featgate.FeatGatePreviewV2.Enabled() {
cfg.Chart = args[0]
} else {
cfg.ChartDirPath = args[0]
}
cfg.Chart = args[0]
}

if err := action.ChartLint(ctx, cfg.ChartLintOptions); err != nil {
Expand Down Expand Up @@ -116,13 +105,11 @@ func newChartLintCommand(ctx context.Context, afterAllCommandsBuiltFuncs map[*co
return fmt.Errorf("add flag: %w", err)
}

if featgate.FeatGateRemoteCharts.Enabled() || featgate.FeatGatePreviewV2.Enabled() {
if err := cli.AddFlag(cmd, &cfg.ChartVersion, "chart-version", "", "Choose a remote chart version, otherwise the latest version is used", cli.AddFlagOptions{
GetEnvVarRegexesFunc: cli.GetFlagGlobalAndLocalEnvVarRegexes,
Group: mainFlagGroup,
}); err != nil {
return fmt.Errorf("add flag: %w", err)
}
if err := cli.AddFlag(cmd, &cfg.ChartVersion, "chart-version", "", "Choose a remote chart version, otherwise the latest version is used", cli.AddFlagOptions{
GetEnvVarRegexesFunc: cli.GetFlagGlobalAndLocalEnvVarRegexes,
Group: mainFlagGroup,
}); err != nil {
return fmt.Errorf("add flag: %w", err)
}

// TODO: restrict allowed values
Expand Down
9 changes: 6 additions & 3 deletions cmd/nelm/chart_pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
"github.com/spf13/cobra"

"github.com/werf/common-go/pkg/cli"
"github.com/werf/nelm/pkg/action"
"github.com/werf/nelm/pkg/featgate"
helm_v3 "github.com/werf/nelm/pkg/helm/cmd/helm"
"github.com/werf/nelm/pkg/helm/pkg/chart/loader"
helmcmd "github.com/werf/nelm/pkg/helm/pkg/cmd"
"github.com/werf/nelm/pkg/log"
"github.com/werf/nelm/pkg/ts"
)
Expand All @@ -30,9 +31,11 @@

originalRunE := cmd.RunE
cmd.RunE = func(cmd *cobra.Command, args []string) error {
helmSettings := helm_v3.Settings
helmSettings := helmcmd.Settings

ctx = log.SetupLogging(ctx, lo.Ternary(helmSettings.Debug, log.DebugLevel, log.InfoLevel), log.SetupLoggingOptions{})
// FIXME(major): should we do it like that everywhere, setting the context?

Check failure on line 36 in cmd/nelm/chart_pack.go

View workflow job for this annotation

GitHub Actions / lint / _

Line contains FIXME: "FIXME(major): should we do it like that ..." (godox)
ctx := action.SetupLogging(cmd.Context(), lo.Ternary(helmSettings.Debug, log.DebugLevel, log.InfoLevel), action.SetupLoggingOptions{})
cmd.SetContext(ctx)

loader.NoChartLockWarning = ""

Expand Down
34 changes: 8 additions & 26 deletions cmd/nelm/chart_render.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/werf/common-go/pkg/cli"
"github.com/werf/nelm/pkg/action"
"github.com/werf/nelm/pkg/common"
"github.com/werf/nelm/pkg/featgate"
"github.com/werf/nelm/pkg/log"
)

Expand All @@ -25,11 +24,7 @@ func newChartRenderCommand(ctx context.Context, afterAllCommandsBuiltFuncs map[*
cfg := &chartRenderConfig{}

use := "render [options...]"
if featgate.FeatGateRemoteCharts.Enabled() || featgate.FeatGatePreviewV2.Enabled() {
use += " [chart-dir|chart-repo-name/chart-name|chart-archive|chart-archive-url]"
} else {
use += " [chart-dir]"
}
use += " [chart-dir|chart-repo-name/chart-name|chart-archive|chart-archive-url]"

cmd := cli.NewSubCommand(
ctx,
Expand All @@ -45,17 +40,13 @@ func newChartRenderCommand(ctx context.Context, afterAllCommandsBuiltFuncs map[*
},
},
func(cmd *cobra.Command, args []string) error {
ctx = log.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultChartRenderLogLevel), log.SetupLoggingOptions{
ctx = action.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultChartRenderLogLevel), action.SetupLoggingOptions{
ColorMode: cfg.LogColorMode,
LogIsParseable: true,
})

if len(args) > 0 {
if featgate.FeatGateRemoteCharts.Enabled() || featgate.FeatGatePreviewV2.Enabled() {
cfg.Chart = args[0]
} else {
cfg.ChartDirPath = args[0]
}
cfg.Chart = args[0]
}

if _, err := action.ChartRender(ctx, cfg.ChartRenderOptions); err != nil {
Expand Down Expand Up @@ -113,13 +104,11 @@ func newChartRenderCommand(ctx context.Context, afterAllCommandsBuiltFuncs map[*
return fmt.Errorf("add flag: %w", err)
}

if featgate.FeatGateRemoteCharts.Enabled() || featgate.FeatGatePreviewV2.Enabled() {
if err := cli.AddFlag(cmd, &cfg.ChartVersion, "chart-version", "", "Choose a remote chart version, otherwise the latest version is used", cli.AddFlagOptions{
GetEnvVarRegexesFunc: cli.GetFlagGlobalAndLocalEnvVarRegexes,
Group: mainFlagGroup,
}); err != nil {
return fmt.Errorf("add flag: %w", err)
}
if err := cli.AddFlag(cmd, &cfg.ChartVersion, "chart-version", "", "Choose a remote chart version, otherwise the latest version is used", cli.AddFlagOptions{
GetEnvVarRegexesFunc: cli.GetFlagGlobalAndLocalEnvVarRegexes,
Group: mainFlagGroup,
}); err != nil {
return fmt.Errorf("add flag: %w", err)
}

if err := cli.AddFlag(cmd, &cfg.ExtraAPIVersions, "extra-apiversions", nil, "Extra Kubernetes API versions passed to $.Capabilities.APIVersions", cli.AddFlagOptions{
Expand Down Expand Up @@ -150,13 +139,6 @@ func newChartRenderCommand(ctx context.Context, afterAllCommandsBuiltFuncs map[*
return fmt.Errorf("add flag: %w", err)
}

if err := cli.AddFlag(cmd, &cfg.ForceAdoption, "force-adoption", false, "Always adopt resources, even if they belong to a different Helm release", cli.AddFlagOptions{
GetEnvVarRegexesFunc: cli.GetFlagGlobalAndLocalEnvVarRegexes,
Group: mainFlagGroup,
}); err != nil {
return fmt.Errorf("add flag: %w", err)
}

if err := cli.AddFlag(cmd, &cfg.LocalKubeVersion, "kube-version", common.DefaultLocalKubeVersion, "Kubernetes version stub for non-remote mode", cli.AddFlagOptions{
Group: mainFlagGroup,
}); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/nelm/chart_secret_file_decrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func newChartSecretFileDecryptCommand(ctx context.Context, afterAllCommandsBuilt
},
},
func(cmd *cobra.Command, args []string) error {
ctx = log.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultSecretFileDecryptLogLevel), log.SetupLoggingOptions{
ctx = action.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultSecretFileDecryptLogLevel), action.SetupLoggingOptions{
ColorMode: cfg.LogColorMode,
LogIsParseable: true,
})
Expand Down
4 changes: 1 addition & 3 deletions cmd/nelm/chart_secret_file_edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ func newChartSecretFileEditCommand(ctx context.Context, afterAllCommandsBuiltFun
},
},
func(cmd *cobra.Command, args []string) error {
ctx = log.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultSecretFileEditLogLevel), log.SetupLoggingOptions{
ColorMode: cfg.LogColorMode,
})
ctx = action.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultSecretFileEditLogLevel), action.SetupLoggingOptions{ColorMode: cfg.LogColorMode})

cfg.File = args[0]

Expand Down
2 changes: 1 addition & 1 deletion cmd/nelm/chart_secret_file_encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func newChartSecretFileEncryptCommand(ctx context.Context, afterAllCommandsBuilt
},
},
func(cmd *cobra.Command, args []string) error {
ctx = log.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultSecretFileEncryptLogLevel), log.SetupLoggingOptions{
ctx = action.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultSecretFileEncryptLogLevel), action.SetupLoggingOptions{
ColorMode: cfg.LogColorMode,
LogIsParseable: true,
})
Expand Down
2 changes: 1 addition & 1 deletion cmd/nelm/chart_secret_key_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func newChartSecretKeyCreateCommand(ctx context.Context, afterAllCommandsBuiltFu
secretCmdGroup,
cli.SubCommandOptions{},
func(cmd *cobra.Command, args []string) error {
ctx = log.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultSecretKeyCreateLogLevel), log.SetupLoggingOptions{
ctx = action.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultSecretKeyCreateLogLevel), action.SetupLoggingOptions{
ColorMode: cfg.LogColorMode,
LogIsParseable: true,
})
Expand Down
4 changes: 1 addition & 3 deletions cmd/nelm/chart_secret_key_rotate.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ func newChartSecretKeyRotateCommand(ctx context.Context, afterAllCommandsBuiltFu
},
},
func(cmd *cobra.Command, args []string) error {
ctx = log.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultSecretKeyRotateLogLevel), log.SetupLoggingOptions{
ColorMode: cfg.LogColorMode,
})
ctx = action.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultSecretKeyRotateLogLevel), action.SetupLoggingOptions{ColorMode: cfg.LogColorMode})

if len(args) > 0 {
cfg.ChartDirPath = args[0]
Expand Down
2 changes: 1 addition & 1 deletion cmd/nelm/chart_secret_values_file_decrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func newChartSecretValuesFileDecryptCommand(ctx context.Context, afterAllCommand
},
},
func(cmd *cobra.Command, args []string) error {
ctx = log.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultSecretValuesFileDecryptLogLevel), log.SetupLoggingOptions{
ctx = action.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultSecretValuesFileDecryptLogLevel), action.SetupLoggingOptions{
ColorMode: cfg.LogColorMode,
LogIsParseable: true,
})
Expand Down
4 changes: 1 addition & 3 deletions cmd/nelm/chart_secret_values_file_edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ func newChartSecretValuesFileEditCommand(ctx context.Context, afterAllCommandsBu
},
},
func(cmd *cobra.Command, args []string) error {
ctx = log.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultSecretValuesFileEditLogLevel), log.SetupLoggingOptions{
ColorMode: cfg.LogColorMode,
})
ctx = action.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultSecretValuesFileEditLogLevel), action.SetupLoggingOptions{ColorMode: cfg.LogColorMode})

cfg.ValuesFile = args[0]

Expand Down
2 changes: 1 addition & 1 deletion cmd/nelm/chart_secret_values_file_encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func newChartSecretValuesFileEncryptCommand(ctx context.Context, afterAllCommand
},
},
func(cmd *cobra.Command, args []string) error {
ctx = log.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultSecretValuesFileEncryptLogLevel), log.SetupLoggingOptions{
ctx = action.SetupLogging(ctx, cmp.Or(log.Level(cfg.LogLevel), action.DefaultSecretValuesFileEncryptLogLevel), action.SetupLoggingOptions{
ColorMode: cfg.LogColorMode,
LogIsParseable: true,
})
Expand Down
Loading
Loading