yxxhero and copilot-swe-agent[bot]
08a22772f7
feat: add --write-output flag to helmfile fetch for air-gapped environments ( #2572 )
...
* feat: add --write-output flag to helmfile fetch for air-gapped environments
Add --write-output flag to helmfile fetch that outputs a modified
helmfile.yaml with chart references updated to point to downloaded
local chart paths. Combined with --output-dir, this enables preparing
all charts for deployment in air-gapped environments.
Usage:
helmfile fetch --output-dir ./charts --write-output > helmfile-airgapped.yaml
Fixes #2571
Signed-off-by: yxxhero <yxxhero@users.noreply.github.com >
Signed-off-by: yxxhero <aiopsclub@163.com >
* fix: update fetch-write-output integration test grep to match YAML list item chart field
Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/d00f71ab-d40d-4220-9b11-97674597685f
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com >
* fix: send status messages to stderr and enforce sequential processing in --write-output mode
Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/d338e24c-4f6f-4a59-a319-4b975e0efdcb
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com >
* fix: restore SequentialHelmfiles after Fetch and use %s for YAML string formatting
Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/cfa9f3f4-c72f-4760-9c51-88bc6f30add2
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com >
* test: add test for SequentialHelmfiles restore after Fetch with --write-output
Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/cfa9f3f4-c72f-4760-9c51-88bc6f30add2
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com >
* fix: disable live output on --write-output and fix shell quoting/portability in integration test
Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/b0eb0d3d-493b-4d77-b8eb-2a5c0ce70d86
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com >
* fix: use unquoted ${helmfile} variable to allow word splitting for EXTRA_HELMFILE_FLAGS
Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/d025a111-f7d0-439e-bf14-5508c40d0b51
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com >
* fix: restore helm.EnableLiveOutput after Fetch --write-output via defer
Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/ddb8c5fc-ebd1-4f09-9474-5da58938a219
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com >
* test: strengthen enableLiveOutput restore assertion with non-trivial initial value
Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/d1d0ba9e-5c97-48e1-b761-8bdee391efb2
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com >
* feat: restrict --write-output to a single helmfile state file with clear error
Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/f608a0d0-7f52-4e3f-9fac-ab966bd01efb
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com >
* refactor: apply code review suggestions for variable and test naming
Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/f608a0d0-7f52-4e3f-9fac-ab966bd01efb
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com >
* fix: replace naked return with explicit return ok, errs to fix nakedret lint error
Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/4b060131-a977-44b0-98f7-42bc108ae8e8
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com >
* fix: buffer YAML output and update --write-output flag description
Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/50c6ad2e-125c-43c1-b9c3-37fe1686a8eb
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com >
* fix: shorten --write-output flag description, move detail to Long help
Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/50c6ad2e-125c-43c1-b9c3-37fe1686a8eb
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com >
---------
Signed-off-by: yxxhero <yxxhero@users.noreply.github.com >
Signed-off-by: yxxhero <aiopsclub@163.com >
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
2026-05-03 18:32:30 +08:00
yxxhero
503c397810
feat: support .Environment.* in --output-dir-template ( #2375 )
...
* feat: support .Environment.* in --output-dir-template
This commit adds support for accessing environment values in the --output-dir-template flag.
Previously, users could only access .OutputDir, .State.*, and .Release.* in the template.
Now .Environment.* is also available, allowing users to use environment values in the
output directory path.
Example usage:
helmfile template -e test-1 --output-dir-template='{{ .OutputDir }}/{{ .Environment.cluster.name }}/{{ .Environment.Name }}/{{ .Release.Name }}'
This produces output like: ./gitops/my-test-cluster/test-1/release-name/
Changes:
- Add Environment field to GenerateOutputDir template data
- Add Environment field to generateChartPath template data (now a method on HelmState)
- Update help text for --output-dir-template flag in template and fetch commands
- Add test cases for Environment in template
Signed-off-by: yxxhero <aiopsclub@163.com >
* fix: address PR review comments for --output-dir-template
- Clarify .Environment.Name, .Environment.KubeContext, .Environment.Values.* in help text
- Update generateChartPath comment to reflect broader usage (fetch, pull, OCI)
- Add tests for GenerateOutputDir with Environment fields
Signed-off-by: yxxhero <aiopsclub@163.com >
* fix: address additional PR review comments
- Move HelmState setup outside test loop to reduce duplication
- Document Environment field (.Name, .KubeContext, .Values) in template data structs
Signed-off-by: yxxhero <aiopsclub@163.com >
---------
Signed-off-by: yxxhero <aiopsclub@163.com >
2026-02-14 11:54:43 +08:00
Hans Song
1d0ba72b47
feat: add/expose cli flags ( #771 )
...
* feat: add/expose cli flags
Signed-off-by: Hans Song <hans.m.song@gmail.com >
* fix tests
Signed-off-by: Hans Song <hans.m.song@gmail.com >
* remove skipdeps from subcommand options
Signed-off-by: Hans Song <hans.m.song@gmail.com >
* remove skip-deps from subcommand flags
Signed-off-by: Hans Song <hans.m.song@gmail.com >
* remove SkipDeps from subcommand implementations
Signed-off-by: Hans Song <hans.m.song@gmail.com >
* update doco with new flags
Signed-off-by: Hans Song <hans.m.song@gmail.com >
---------
Signed-off-by: Hans Song <hans.m.song@gmail.com >
2023-04-02 14:53:52 +08:00
Helge Eichelberg
8f59a1c18a
Add --output-dir-template flag to the fetch command ( #456 )
...
* Add --output-dir-template flag to the fetch command
Signed-off-by: elchenberg <elchenberg@users.noreply.github.com >
2022-11-05 18:55:02 +08:00
yxxhero
6be3c11119
fix typo
...
Signed-off-by: yxxhero <aiopsclub@163.com >
2022-10-24 20:01:13 +08:00
yxxhero
5f699656df
Optimize cmd pkg ( #384 )
...
Signed-off-by: yxxhero <aiopsclub@163.com >
Signed-off-by: yxxhero <aiopsclub@163.com >
2022-10-05 11:02:24 +09:00
Yusuke Kuoka
89950f3794
Merge branch 'main' into update_golang_lint
2022-08-14 12:21:10 +09:00
yxxhero
94b7a6c128
Cleanup pkg/config/config.go ( #287 )
...
Signed-off-by: yxxhero <aiopsclub@163.com >
Signed-off-by: yxxhero <aiopsclub@163.com >
2022-08-14 12:17:02 +09:00
yxxhero
8690d63401
fix lint error
...
Signed-off-by: yxxhero <aiopsclub@163.com >
2022-08-13 07:40:32 +08:00
Yusuke Kuoka
eabf360fe8
Merge branch 'main' into fix_cobra_flag_default_value
2022-08-08 10:35:32 +09:00
yxxhero
6a37ae9650
Add flags about need for lint subcmd ( #273 )
...
* fix typo
Signed-off-by: yxxhero <aiopsclub@163.com >
* add flags about needs for lint subcmd
Signed-off-by: yxxhero <aiopsclub@163.com >
2022-08-08 10:32:30 +09:00
yxxhero
8beb69d08e
fix cobra flag default value
...
Signed-off-by: yxxhero <aiopsclub@163.com >
2022-08-06 15:04:34 +08:00
yxxhero
85ade797ab
Use cobra ( #234 )
...
switch to cobra
Signed-off-by: yxxhero <aiopsclub@163.com >
2022-07-19 21:06:18 +09:00
yxxhero
45283bfcde
move all subcommand to sigle file
...
Signed-off-by: yxxhero <aiopsclub@163.com >
2022-06-10 12:42:31 +08:00