Add Support for System-Level Robot Accounts#507
Merged
Conversation
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
07a0d9f to
b3ffba9
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #507 +/- ##
=========================================
- Coverage 10.99% 7.39% -3.60%
=========================================
Files 173 226 +53
Lines 8671 13665 +4994
=========================================
+ Hits 953 1010 +57
- Misses 7612 12549 +4937
Partials 106 106 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
bupd
approved these changes
Jul 21, 2025
bupd
left a comment
Member
There was a problem hiding this comment.
Overall, LGTM
@qcserestipy please resolve conflicts
…on empty Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
Collaborator
Author
|
@bupd In a few upcoming PRs I aim to do some code clean up, because I think several things can be optimized and moved to other places |
16 tasks
qcserestipy
added a commit
to qcserestipy/harbor-cli
that referenced
this pull request
Sep 2, 2025
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
Vad1mo
pushed a commit
that referenced
this pull request
Sep 2, 2025
…521) * build(deps): bump golang.org/x/text from 0.23.0 to 0.27.0 (#519) Bumps [golang.org/x/text](https://github.com/golang/text) from 0.23.0 to 0.27.0. - [Release notes](https://github.com/golang/text/releases) - [Commits](golang/text@v0.23.0...v0.27.0) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-version: 0.27.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * add system `config get` command This command fetches and stores the system config in the harbor config file. Signed-off-by: bupd <bupdprasanth@gmail.com> Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * add system config `update` command Signed-off-by: bupd <bupdprasanth@gmail.com> Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * Rebase on main; moved command to its own package; added reflection for api configurationsok types; Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * Updated get function to sort for categories; update api handler for different categories; todo: update from config runs into swagger api errors Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * .. Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * feat(configurations): Added configurations view command, clean up get and update command, extend reflection for view functionality - In this commit the view command is added that supports setting categories aligned with the UI - Reflection is cleaned up to also handle secret values stored in the config file - Reflection is used for table view of configurations Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * Add Support for System-Level Robot Accounts (#507) Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * Updated github.com/go-viper/mapstructure/v2 to avoid vulnerability Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * Renamed config update to config apply; added -f flag for config apply command to support specifiying configurations in a separate file than the harbor-cli global config Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * feat: Remove get command, refactor view command The get command is removed since not necessary. The view command is updated to make category selection available for piping. The apply command is adapted to not use harbor config but external config file that can be chosen via flag. Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * refactor(harbor-cli): Remove add configurations to harbor config function. This function is not longer needed since the configurations settings will be stored in another file and not in the harbor credentials config file. Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * Added changes according to PR Signed-off-by: qcserestipy <patrickeschenbach96@gmail.com> Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * docs(config): update cli docs Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * fix(mod): Patch error in go.mod missing ) Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * docs(config): update cli docs Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * fix(config): make changes to satisfy vulncheck Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * doc(config): remove messed up cli config directory Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * fix(config): remove obsolete vscode settings folder Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> Signed-off-by: bupd <bupdprasanth@gmail.com> Signed-off-by: qcserestipy <patrickeschenbach96@gmail.com> Signed-off-by: Patrick Eschenbach <45457307+qcserestipy@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: bupd <bupdprasanth@gmail.com>
neel-1414
pushed a commit
to neel-1414/harbor-cli
that referenced
this pull request
Sep 5, 2025
…oharbor#521) * build(deps): bump golang.org/x/text from 0.23.0 to 0.27.0 (goharbor#519) Bumps [golang.org/x/text](https://github.com/golang/text) from 0.23.0 to 0.27.0. - [Release notes](https://github.com/golang/text/releases) - [Commits](golang/text@v0.23.0...v0.27.0) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-version: 0.27.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * add system `config get` command This command fetches and stores the system config in the harbor config file. Signed-off-by: bupd <bupdprasanth@gmail.com> Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * add system config `update` command Signed-off-by: bupd <bupdprasanth@gmail.com> Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * Rebase on main; moved command to its own package; added reflection for api configurationsok types; Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * Updated get function to sort for categories; update api handler for different categories; todo: update from config runs into swagger api errors Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * .. Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * feat(configurations): Added configurations view command, clean up get and update command, extend reflection for view functionality - In this commit the view command is added that supports setting categories aligned with the UI - Reflection is cleaned up to also handle secret values stored in the config file - Reflection is used for table view of configurations Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * Add Support for System-Level Robot Accounts (goharbor#507) Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * Updated github.com/go-viper/mapstructure/v2 to avoid vulnerability Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * Renamed config update to config apply; added -f flag for config apply command to support specifiying configurations in a separate file than the harbor-cli global config Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * feat: Remove get command, refactor view command The get command is removed since not necessary. The view command is updated to make category selection available for piping. The apply command is adapted to not use harbor config but external config file that can be chosen via flag. Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * refactor(harbor-cli): Remove add configurations to harbor config function. This function is not longer needed since the configurations settings will be stored in another file and not in the harbor credentials config file. Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * Added changes according to PR Signed-off-by: qcserestipy <patrickeschenbach96@gmail.com> Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * docs(config): update cli docs Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * fix(mod): Patch error in go.mod missing ) Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * docs(config): update cli docs Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * fix(config): make changes to satisfy vulncheck Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * doc(config): remove messed up cli config directory Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> * fix(config): remove obsolete vscode settings folder Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com> Signed-off-by: bupd <bupdprasanth@gmail.com> Signed-off-by: qcserestipy <patrickeschenbach96@gmail.com> Signed-off-by: Patrick Eschenbach <45457307+qcserestipy@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: bupd <bupdprasanth@gmail.com>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds full support for managing system-level robot accounts in Harbor CLI, which allows automation across multiple projects with a single robot account.
Features Added:
Benefits:
This implementation follows Harbor's API design for system robot accounts and maintains consistency with the existing CLI patterns.
ToDo
There are still some steps that have to be covered:
Screenshots & Videos
Screen.Recording.2025-07-21.at.14.37.46.mov