-
Notifications
You must be signed in to change notification settings - Fork 702
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
Implement UI changes for the new Repos API #5186
Conversation
* Delete unused urls Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Add getPluginByName to utils + imlp unit tests Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Remove unused types Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Rename IAppRepositoryFilter to IPkgRepositoryFilter Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Remove no longer used elements from AppRepoList Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Run prettier Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
* wip Revamp AppRepoForm Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Update tests Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Allow no-commented-out-tests temporarily Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix linter issue Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix linter issues Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> Conflicts: dashboard/src/shared/url.ts
* wip Revamp AppRepoForm Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Update tests Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Allow no-commented-out-tests temporarily Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix linter issue Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix linter issues Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Delete AppRepository Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix repos action Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Add remaining changes Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * wip fix some test cases Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix repos.ts test suite Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Implement PackageRepositoriesService test suite Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Add plural names. Add packageFormat in repo list Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Add AppRepoForm Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix AppRepoForm test cases Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix remaining tests Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Remove no longer used urls Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Avoid setting auth values if undefined Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix e2e tests Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Allow setting pullSecret in the UI. Improve CA input/secret selector Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Disable e2e test 03 Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix linter issue Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix test case Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix test 03 Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Run prettier Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Minor file renames from AppRepo to PkgRepo (#4955) * Minor renames Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Rename files from AppRepo to PkgRepo Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix test cases Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Comment-out e2e test Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Extract regex to a const Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Add some suggestions from code review Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix type issues in actons. Perform renames Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Rename kubeappsNamespace to globalReposNamespace Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Remove validation action. Fix action tests Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Return summaries in action to avoid full reload Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Add test case for sorting when adding repo Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Disable unsupported auth methods Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Suggest pull secrets if usign docker creds Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Remove ad-hoc helm client Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Extract customDetails encoding to a fn Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Delete leftover Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Remove apprepo management from Kubeops (#5026) * Remove unused logic from kubeops Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Remove old kubeops endpoint from api docs Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Remove unused kubeops args Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Address PR's comments Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Tidy up the `/pkg` folder (#5027) * Remove pkg/handlerutil Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Remove unused code from pkg/agent Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Move pkg/agent to plugins/pkg/agent Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Add dockerjson auth type as supported to flux plg Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * cast request.customDetails to RepositoryCustomDetails Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Avoid seding mixed user/kubeapps mgn secrets Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Modify toggle msgs Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Improve secret info msg Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
* Update custom detail name with a consistent naming format Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Add generated code Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Perform renames in the code Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
* clean up unused fields and actions from repos state Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Rename some state fields Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Rename actions Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> Conflicts: cmd/kubeops/internal/response/response_test.go
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
* Add kapp's customdetails handling Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Improvements on repo list page Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Skip building customdetail if any Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Avoid infinite loading after editing a repo Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Remove leftover Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix type issue Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Merge branch '4764-pkg-repos-ui' into minor-reposUI-fixes Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix minor rename Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Add test case Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> Conflicts: cmd/kubeapps-apis/plugins/helm/packages/v1alpha1/repositories.go dashboard/src/components/AppView/AppView.tsx
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
* Add imagePullSecrets option to repos API Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com> * Regenerated code after merge from main Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com> * Rename `customDetails` to `customDetail` Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix not found error handling. Organize imports Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Add pullSecret management in repos UI Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Comment out lines Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Move secret check just when required Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Avoid passing unnecesary properties in the custom details Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix e2e tese Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix merge conflicts Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Run prettier Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix merge issue Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Run prettier Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix typo Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> * Fix no-case-declarations eslint issue Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> Co-authored-by: Rafa Castelblanque <rcastelblanq@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> Conflicts: cmd/kubeapps-apis/plugins/helm/packages/v1alpha1/repositories_auth.go cmd/kubeapps-apis/plugins/helm/packages/v1alpha1/repositories_test.go dashboard/src/shared/utils.ts integration/tests/main/03-create-private-package-repository.spec.js integration/tests/main/10-deploy-package-with-private-image.spec.js
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> Conflicts: dashboard/src/components/Config/AppRepoList/AppRepoList.tsx dashboard/src/components/Config/PkgRepoList/PkgRepoList.tsx
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> Conflicts: dashboard/public/openapi.yaml
✅ Deploy Preview for kubeapps-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Great! |
var appRepoAuth = &apprepov1alpha1.AppRepositoryAuth{} | ||
|
||
if tlsConfig != nil { | ||
if secret == nil { | ||
return nil, status.Errorf(codes.InvalidArgument, "Secret is missing") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nil, status.Errorf(codes.InvalidArgument, "Secret is missing") | |
return nil, status.Errorf(codes.InvalidArgument, "Secret for AppRepository auth is missing") |
@@ -165,6 +169,9 @@ func newAppRepositoryAuth(secret *k8scorev1.Secret, | |||
case corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, | |||
corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BEARER, | |||
corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_AUTHORIZATION_HEADER: | |||
if secret == nil { | |||
return nil, status.Errorf(codes.InvalidArgument, "Secret is missing") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nil, status.Errorf(codes.InvalidArgument, "Secret is missing") | |
return nil, status.Errorf(codes.InvalidArgument, "Secret for AppRepository auth is missing") |
@@ -178,6 +185,9 @@ func newAppRepositoryAuth(secret *k8scorev1.Secret, | |||
return nil, status.Errorf(codes.InvalidArgument, "Authentication header is missing") | |||
} | |||
case corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_DOCKER_CONFIG_JSON: | |||
if secret == nil { | |||
return nil, status.Errorf(codes.InvalidArgument, "Secret is missing") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nil, status.Errorf(codes.InvalidArgument, "Secret is missing") | |
return nil, status.Errorf(codes.InvalidArgument, "Secret for AppRepository auth is missing") |
dashboard/src/shared/utils.ts
Outdated
@@ -153,3 +181,34 @@ export function getAppStatusLabel( | |||
const jsonReason = installedPackageStatus_StatusReasonToJSON(statusReason); | |||
return jsonReason.replace("STATUS_REASON_", "").toLowerCase(); | |||
} | |||
|
|||
export function getSupportedAuthMethods( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export function getSupportedAuthMethods( | |
export function getSupportedPackageRepositoryAuthTypes( |
Just being a nitpicker here 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
This is a great feature that we are adding to Kubeapps, congrats!!!
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
merging 🤞 |
Description of the change
This PR is based on the stacked and already approved incremental PRs towards a revamped UI supporting the new Repos API.
Benefits
Repos can be managed from the UI, regardless of the plugin (* Helm/Flux/Carvel for now).
Possible drawbacks
The syncpodtemplate is no longer editable using the UI. We have to analyze the impact of it and provide a way if still required. Notwithstanding, it can still be changed via
values.yaml
in theinitialRepos
value.Applicable issues
Additional information
N/A