Skip to content

Commit

Permalink
Update README and fix path bug (#62)
Browse files Browse the repository at this point in the history
Update README and fix path bug based on examples.
  • Loading branch information
allenporter authored Feb 19, 2023
1 parent d52df1a commit 57c76f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,22 @@ use the flux command on a real cluster.
This example lists all Kustomizations in the cluster:
```bash
$ flux-local get ks
NAME PATH
apps ./tests/testdata/cluster/apps/prod
infra-controllers ./tests/testdata/cluster/infrastructure/controllers
infra-configs ./tests/testdata/cluster/infrastructure/configs
NAME PATH HELMREPOS RELEASES
apps ./tests/testdata/cluster/apps/prod 0 0
infra-controllers ./tests/testdata/cluster/infrastructure/controllers 0 0
infra-configs ./tests/testdata/cluster/infrastructure/configs 2 0
```

This example lists all HelmReleases in the cluster:
```bash
$ flux-local get hr -A
NAMESPACE NAME REVISION CHART SOURCE
podinfo podinfo >=1.0.0 podinfo-podinfo podinfo
podinfo podinfo 6.3.2 podinfo-podinfo podinfo
metallb metallb 4.1.14 metallb-metallb bitnami
```

This example lists all HelmReleases in a specific namespace:
```bash
$ flux-local get hr -n metallb
NAME REVISION CHART SOURCE
metallb 4.1.14 metallb-metallb bitnami
Expand Down Expand Up @@ -91,7 +92,7 @@ $ flux-local diff ks apps
```

Additionally `flux-local` can inflate a `HelmRelease` locally and show diffs in the output
objects:
objects. This is similar to `flux diff` but for HelmReleases:

```bash
$ flux-local diff hr -n podinfo podinfo
Expand Down
4 changes: 2 additions & 2 deletions flux_local/tool/selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def add_selector_flags(args: ArgumentParser) -> None:
"--path",
help="Optional path with flux Kustomization resources (multi-cluster ok)",
type=pathlib.Path,
default=".",
default=None,
nargs="?",
)
args.add_argument(
Expand Down Expand Up @@ -96,4 +96,4 @@ def not_found(resource: str, mds: git_repo.MetadataSelector) -> str:
)
if mds.namespace:
return f"no {resource} objects found in '{mds.namespace}' namespace"
return "no {resource} objects found in cluster"
return f"no {resource} objects found in cluster"

0 comments on commit 57c76f0

Please sign in to comment.