Skip to content

Commit

Permalink
updating a few of the help texts based on a few issues that partners …
Browse files Browse the repository at this point in the history
…have had with the check container cmd (#604)

Signed-off-by: Adam D. Cornett <[email protected]>
  • Loading branch information
acornett21 authored May 6, 2022
1 parent c8275b0 commit 14517e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cmd/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ func init() {

checkCmd.PersistentFlags().BoolP("list-checks", "l", false, "lists all the checks run for a given check")

checkCmd.PersistentFlags().StringP("docker-config", "d", "", "path to docker config.json file (env: PFLT_DOCKERCONFIG)")
checkCmd.PersistentFlags().StringP("docker-config", "d", "", "Path to docker config.json file. This value is optional for publicly accessible images.\n"+
"However, it is strongly encouraged for public Docker Hub images,\n"+
"due to the rate limit imposed for unauthenticated requests. (env: PFLT_DOCKERCONFIG)")
viper.BindPFlag("dockerConfig", checkCmd.PersistentFlags().Lookup("docker-config"))

rootCmd.AddCommand(checkCmd)
Expand Down
6 changes: 4 additions & 2 deletions cmd/check_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,15 @@ func init() {
checkContainerCmd.Flags().String("pyxis-api-token", "", "API token for Pyxis authentication (env: PFLT_PYXIS_API_TOKEN)")
viper.BindPFlag("pyxis_api_token", checkContainerCmd.Flags().Lookup("pyxis-api-token"))

checkContainerCmd.Flags().String("pyxis-host", "", fmt.Sprintf("Host to use for Pyxis submissions.\nThis will override Pyxis Env.\nOnly set this if you know what you are doing.\nIf you do set it, it should include just the host, and the URI path.\n(env: PFLT_PYXIS_HOST)"))
checkContainerCmd.Flags().String("pyxis-host", "", fmt.Sprintf("Host to use for Pyxis submissions. This will override Pyxis Env. Only set this if you know what you are doing.\n"+
"If you do set it, it should include just the host, and the URI path. (env: PFLT_PYXIS_HOST)"))
viper.BindPFlag("pyxis_host", checkContainerCmd.Flags().Lookup("pyxis-host"))

checkContainerCmd.Flags().String("pyxis-env", certification.DefaultPyxisEnv, "Env to use for Pyxis submissions.")
viper.BindPFlag("pyxis_env", checkContainerCmd.Flags().Lookup("pyxis-env"))

checkContainerCmd.Flags().String("certification-project-id", "", fmt.Sprintf("Certification Project ID from connect.redhat.com.\nShould be supplied without the ospid- prefix.\n(env: PFLT_CERTIFICATION_PROJECT_ID)"))
checkContainerCmd.Flags().String("certification-project-id", "", fmt.Sprintf("Certification Project ID from connect.redhat.com/projects/{certification-project-id}/overview\n"+
"URL paramater. This value may differ from the PID on the overview page. (env: PFLT_CERTIFICATION_PROJECT_ID)"))
viper.BindPFlag("certification_project_id", checkContainerCmd.Flags().Lookup("certification-project-id"))

checkCmd.AddCommand(checkContainerCmd)
Expand Down

0 comments on commit 14517e2

Please sign in to comment.