Skip to content

Commit

Permalink
docs: add missing options
Browse files Browse the repository at this point in the history
The new cobra update fixed a bug which caused some options to not be
included in --help when there was already a option with the same name
on a parent command.

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 authored and mheon committed Oct 18, 2022
1 parent f2a2ab5 commit 42b6425
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
4 changes: 3 additions & 1 deletion cmd/podman/pods/ps.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/containers/common/pkg/report"
"github.com/containers/podman/v4/cmd/podman/common"
"github.com/containers/podman/v4/cmd/podman/registry"
"github.com/containers/podman/v4/cmd/podman/utils"
"github.com/containers/podman/v4/cmd/podman/validate"
"github.com/containers/podman/v4/pkg/domain/entities"
"github.com/docker/go-units"
Expand Down Expand Up @@ -59,7 +60,6 @@ func init() {
_ = psCmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(&ListPodReporter{}))

flags.Bool("noheading", false, "Do not print headers")
flags.BoolVar(&psInput.Namespace, "namespace", false, "Display namespace information of the pod")
flags.BoolVar(&psInput.Namespace, "ns", false, "Display namespace information of the pod")
flags.BoolVar(&noTrunc, "no-trunc", false, "Do not truncate pod and container IDs")
flags.BoolVarP(&psInput.Quiet, "quiet", "q", false, "Print the numeric IDs of the pods only")
Expand All @@ -69,6 +69,8 @@ func init() {
_ = psCmd.RegisterFlagCompletionFunc(sortFlagName, common.AutocompletePodPsSort)

validate.AddLatestFlag(psCmd, &psInput.Latest)

flags.SetNormalizeFunc(utils.AliasFlags)
}

func pods(cmd *cobra.Command, _ []string) error {
Expand Down
18 changes: 18 additions & 0 deletions docs/source/markdown/podman-build.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,18 @@ transports.

Print usage statement

#### **--hooks-dir**=*path*

Each *.json file in the path configures a hook for buildah build containers. For more details on the syntax of the JSON files and the semantics of hook injection. Buildah currently support both the 1.0.0 and 0.1.0 hook schemas, although the 0.1.0 schema is deprecated.

This option may be set multiple times; paths from later options have higher precedence.

For the annotation conditions, buildah uses any annotations set in the generated OCI configuration.

For the bind-mount conditions, only mounts explicitly requested by the caller via --volume are considered. Bind mounts that buildah inserts by default (e.g. /dev/shm) are not considered.

If --hooks-dir is unset for root callers, Buildah will currently default to /usr/share/containers/oci/hooks.d and /etc/containers/oci/hooks.d in order of increasing precedence. Using these defaults is deprecated, and callers should migrate to explicitly setting --hooks-dir.

#### **--http-proxy**

Pass through HTTP Proxy environment variables.
Expand Down Expand Up @@ -532,6 +544,12 @@ commands specified by the **RUN** instruction.
Note: You can also override the default runtime by setting the BUILDAH\_RUNTIME
environment variable. `export BUILDAH_RUNTIME=/usr/local/bin/runc`

#### **--runtime-flag**=*flag*

Adds global flags for the container rutime. To list the supported flags, please consult the manpages of the selected container runtime.

Note: Do not pass the leading -- to the flag. To pass the runc flag --log-format json to buildah build, the option given would be --runtime-flag log-format=json.

#### **--secret**=**id=id,src=path**

Pass secret information to be used in the Containerfile for building images
Expand Down
8 changes: 4 additions & 4 deletions docs/source/markdown/podman-pod-ps.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ Print usage statement

Show the latest pod created (all states) (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)

#### **--namespace**, **--ns**

Display namespace information of the pod

#### **--no-trunc**

Do not truncate the output (default *false*).
Expand All @@ -105,10 +109,6 @@ Do not truncate the output (default *false*).

Omit the table headings from the listing of pods.

#### **--ns**

Display namespace information of the pod

#### **--quiet**, **-q**

Print the numeric IDs of the pods only
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/ps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ var _ = Describe("Podman ps", func() {
session := podmanTest.RunTopContainer("test1")
session.WaitWithDefaultTimeout()

result := podmanTest.Podman([]string{"ps", "-a", "--namespace", "--format",
result := podmanTest.Podman([]string{"ps", "-a", "--ns", "--format",
"{{with .Namespaces}}{{.Cgroup}}:{{.IPC}}:{{.MNT}}:{{.NET}}:{{.PIDNS}}:{{.User}}:{{.UTS}}{{end}}"})
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
Expand Down

0 comments on commit 42b6425

Please sign in to comment.