Code Monkey home page Code Monkey logo

Comments (4)

jeff-mccoy avatar jeff-mccoy commented on May 24, 2024 1

Eek sorry I see what you’re saying, I was talking about in zarf init. For regenerate we should make the ui consistent and prompt like init does eventually but for now just leaving as a required (no default value) flag is probably fine.

from zarf.

YrrepNoj avatar YrrepNoj commented on May 24, 2024

@jeff-mccoy

36:   pkiRegenerate.Flags().StringVar(&pkiOptions.Host, "host", "zarf-server", "Specify the host or IP for the gitops service ingress")
37:   _ = pkiRegenerate.MarkFlagRequired("host")

https://github.com/defenseunicorns/zarf/blob/master/cli/cmd/pki.go#L36 defines the --host flag as having a default of zarf-server but then also marks the flag as required making it so a user would have to manually put a host no matter what.

This is would be confusing for new (or non-technical) users since cobra compiles the help docs from zarf pki regenerate --help to say --host string Specify the host or IP for the gitops service ingress (default "zarf-server") which implies you don't need to do anything.

Do we want "zarf-server" to actually be a default or do we want to force the user to pass in their own value for the flag?

from zarf.

jeff-mccoy avatar jeff-mccoy commented on May 24, 2024

Actually neither. It’s a bit funkier than that. That’s just legacy code we can probably remove. There are cases where a host isn’t needed at all—such as when you provide your own tls keypair. I think the best thing for now would be to drop the required flag (if it’s required) and the default value. They should still be prompted. Eventually I’d like to not ask for the host name if they aren’t generating pki.

from zarf.

YrrepNoj avatar YrrepNoj commented on May 24, 2024

Just to make sure I'm 100% following, the required flag I pointed out was for the ./zarf pki regenerate command. Farther along in the code it uses the hostname to generate the cert. Are you saying it's okay if the hostname is an empty string at this point?

from zarf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.