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

split hauler login into registry and helm-repo #205

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

Conversation

amartin120
Copy link
Contributor

@amartin120 amartin120 commented Mar 12, 2024

Please check below, if the PR fulfills these requirements:

  • Commit(s) and code follow the repositories guidelines.
  • Test(s) have been added or updated to support these change(s).
  • Doc(s) have been added or updated to support these change(s).

Associated Links:

Types of Changes:

  • feature and breaking change

Proposed Changes:

  • Hauler login was just for registries but we needed to add support for authenticated helm repos so this PR splits the hauler login command into hauler login registry and hauler login helm-repo.

Verification/Testing of Changes:

  • crossed two fingers and said some nice words.
  • repo info added to helm repositories file that's used by the helm client libraries.

Additional Context:

  • If you have an existing scripts using hauler login they will need to be adjusted accordingly.
❯ hauler login registry --help                                                                                                                                                                                                                                                                          
Log into an authenticated registry

Usage:
  hauler login registry [flags]

Aliases:
  registry, r

Examples:
hauler login registry reg.example.com -u bob -p haulin

Flags:
  -h, --help              help for registry
  -p, --password string   Password
      --password-stdin    Take the password from stdin
  -u, --username string   Username

Global Flags:
  -l, --log-level string    (default "info")
❯ hauler login helm-repo --help                                                                                                                                                                                                                                                                          
Authentication info for a helm repo

Usage:
  hauler login helm-repo [name] [url] [flags]

Aliases:
  helm-repo, h

Examples:
hauler login helm-repo my-helm-repo https://chart.repo.com -u bob -p haulin

Flags:
      --ca-file string             verify certificates of HTTPS-enabled servers using this CA bundle
      --cert-file string           identify HTTPS client using this SSL certificate file
  -h, --help                       help for helm-repo
      --insecure-skip-tls-verify   skip tls certificate checks for the chart download
      --key-file string            identify HTTPS client using this SSL key file
      --pass-credentials           pass credentials to all domains
  -p, --password string            chart repository password where to locate the requested chart
      --password-stdin             Take the password from stdin
  -u, --username string            chart repository username where to locate the requested chart

Global Flags:
  -l, --log-level string    (default "info")

@amartin120 amartin120 requested a review from dweomer March 12, 2024 14:37
@dweomer
Copy link
Contributor

dweomer commented Mar 12, 2024

Not a fan of changing the CLI contract without some attempt to accommodate "legacy" (we just went 1.0, heh) usage. 🤔

@amartin120
Copy link
Contributor Author

amartin120 commented Mar 12, 2024

Okay. After some good conversation with @dweomer, I'd like to re-work this a bit.

hauler login <url> --login-type (helm or other options down the road)

default to registry if --login-type is omitted to not break any existing cli contracts.

In order for this to work without even more helm specific flags, I'll need to work some non-trivial things out. Mostly around how the "repo name" plays into the equation.

@zackbradys zackbradys added enhancement New feature or request size/M Denotes an issue/PR requiring a relatively moderate amount of work labels Mar 28, 2024
@amartin120 amartin120 marked this pull request as draft March 28, 2024 20:49
@zackbradys zackbradys added this to the Hauler v1.0.5 milestone Jun 26, 2024
@zackbradys
Copy link
Member

Hey @amartin120, what is left to complete the rest of this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/M Denotes an issue/PR requiring a relatively moderate amount of work
Projects
Status: To Triage
Development

Successfully merging this pull request may close these issues.

3 participants