Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add persistent flags to root finch command #1157

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

coderbirju
Copy link
Contributor

@coderbirju coderbirju commented Oct 29, 2024

Issue #, if available:
#516
Adds the global flags as persistent string flag to the root finch command. This enables the cli to display the flags when running the --help command on finch.

Description of changes:

Testing done:
Verified that the command works and display the global flags.

sudo ./_output/bin/finch help build  
Build an image from Dockerfile

Usage:
  finch build [flags]

Flags:
  -h, --help   help for build

Global Flags:
      --cgroup-manager string   Cgroup manager to use ("cgroupfs"|"systemd")
      --debug                   running under debug mode
      --namespace string        containerd namespace, such as "moby" for Docker, "k8s.io" for Kubernetes
      --snapshotter string      containerd snapshotter
  • I've reviewed the guidance in CONTRIBUTING.md

License Acceptance

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@coderbirju coderbirju marked this pull request as ready for review October 29, 2024 18:01
@coderbirju coderbirju changed the title fix: add persistent flags to root finch command [WIP] fix: add persistent flags to root finch command Oct 29, 2024
chews93319
chews93319 previously approved these changes Oct 29, 2024
@@ -79,6 +79,9 @@ var newApp = func(
// TODO: Decide when to forward --debug to the dependencies
// (e.g. nerdctl for container commands and limactl for VM commands).
rootCmd.PersistentFlags().Bool("debug", false, "running under debug mode")
rootCmd.PersistentFlags().String("namespace", "", `containerd namespace, such as "moby" for Docker, "k8s.io" for Kubernetes`)
rootCmd.PersistentFlags().String("cgroup-manager", "", `Cgroup manager to use ("cgroupfs"|"systemd")`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually support cgroupfs cgroup manager?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually support cgroupfs cgroup manager?

I was under the assumption that nerdctl handles this under the hood, I was just referencing this

Apologies for the delayed response, I thought I replied here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants