The flux pull artifact command currently extracts only the first layer
of the OCI manifest, which prevents pulling arbitrary layers from OCI
artifacts not created by flux. The underlying oci.Client.Pull already
accepts a WithPullLayerIndex option but it was not exposed to the CLI.
Add a --layer-index int flag (default -1, meaning unset) wired through
to oci.WithPullLayerIndex when set. The default flow is unchanged.
Signed-off-by: Ruslan Shaydullin <shaydullin.r.d@outlook.com>
Assisted-by: claude-code/claude-opus-4-7
This adds a --resolve-symlinks flag to the flux build artifact and flux push artifact
commands. When enabled, symlinks in the source directory are resolved (copied as regular
files/directories) before building the artifact. This includes:
- Recursive symlink resolution with cycle detection
- File permission preservation
- Proper handling of both single-file and directory symlink targets
- Comprehensive test coverage
Fixes#5055
Signed-off-by: Rohan Sood <56945243+rohansood10@users.noreply.github.com>
Fixes#5673
On Windows, when using absolute paths like C:\path\to\dir,
the path could be incorrectly concatenated, resulting in:
C:\working\dir\C:\path\to\dir\file
This fix applies filepath.Abs() and filepath.Clean() to normalize
the path before using it, ensuring absolute paths are handled
correctly on all platforms.
Changes:
- Apply filepath.Abs() to convert relative paths to absolute
- Apply filepath.Clean() to remove redundant separators and resolve ..
- Add tests for absolute paths, complex paths with .., and paths
with redundant separators to verify normalization works correctly
The tests use actual 'flux build kustomization' commands with:
1. Absolute paths (prevents concatenation bugs)
2. Paths with parent directory (..) references
3. Paths with redundant separators (//)
All tests verify the command produces correct output, ensuring
the path normalization fix works as expected.
Signed-off-by: Sibasis Padhi <sibasis.padhi@gmail.com>
Add --skip-namespace flag to the 'create tenant' command to skip automatic
namespace creation when the namespace already exists.
Signed-off-by: Anshuman Singh <anshumanchauhan9@gmail.com>
The `flux events` command always applied a namespace filter, even when `--all-namespaces` was set.
This produced incomplete results and confused users expecting cluster-wide events.
Changes made:
* Build `clientListOpts` dynamically.
* Omit `client.InNamespace(...)` when `eventArgs.allNamespaces` is true, ensuring no namespace constraint.
Impact:
`flux events --all-namespaces` now returns events from every namespace, restoring expected functionality without affecting other options.
Signed-off-by: S. M. Mohiuddin Khan Shiam <147746955+mohiuddin-khan-shiam@users.noreply.github.com>