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

Add 'DeleteInstalledPackage' impl #3791

Merged
merged 44 commits into from Nov 25, 2021
Merged

Add 'DeleteInstalledPackage' impl #3791

merged 44 commits into from Nov 25, 2021

Conversation

antgamdia
Copy link
Contributor

Description of the change

Initial implementation of the DeleteInstalledPackage operation

Benefits

An initial and very limited Carvel support in Kubeapps

Possible drawbacks

N/A

Applicable issues

Additional information

N/A

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>
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>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
return nil, errorByStatus("get", "PackageInstall", identifier, err)
}

// Delete all the associated secrets
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I'd do this after deleting the package (and longer-term, only if we created the associated secret.)

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>
but throw an error if not matching with pkg one

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>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
* Add 'GetPackageRepositories' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Fix nil pointer

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetPackageRepositories

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

Conflicts:
	cmd/kubeapps-apis/plugins/kapp_controller/packages/v1alpha1/server_ctrl_packages.go
	cmd/kubeapps-apis/plugins/kapp_controller/packages/v1alpha1/server_data_adapters.go
	cmd/kubeapps-apis/plugins/kapp_controller/packages/v1alpha1/server_data_resources.go
	cmd/kubeapps-apis/plugins/kapp_controller/packages/v1alpha1/server_test.go
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Conflicts:
	cmd/kubeapps-apis/plugins/kapp_controller/packages/v1alpha1/server_ctrl_packages.go
	cmd/kubeapps-apis/plugins/kapp_controller/packages/v1alpha1/server_test.go
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Base automatically changed from carvel-12 to carvel November 25, 2021 00:04
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

Conflicts:
	cmd/kubeapps-apis/plugins/kapp_controller/packages/v1alpha1/server_ctrl_packages.go
	cmd/kubeapps-apis/plugins/kapp_controller/packages/v1alpha1/server_test.go
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Conflicts:
	cmd/kubeapps-apis/plugins/kapp_controller/packages/v1alpha1/server_ctrl_packages.go
	cmd/kubeapps-apis/plugins/kapp_controller/packages/v1alpha1/server_test.go
@antgamdia antgamdia merged commit da9ca1c into carvel Nov 25, 2021
@antgamdia antgamdia deleted the carvel-13 branch November 25, 2021 00:28
antgamdia added a commit that referenced this pull request Nov 25, 2021
…3816)

* Add required files for the Carvel plugin impl (#3783)

* Add required files for the Carvel plugin impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Remove old tests. Fix TestGetClient test

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageSummaries' impl (#3784)

* Add required files for the Carvel plugin impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageSummaries' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Remove old tests. Fix TestGetClient test

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageSummaries

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageVersions' impl (#3785)

* Add 'GetAvailablePackageVersions' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageVersions

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageDetail' impl (#3786)

* Add required files for the Carvel plugin impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageSummaries' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageVersions' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageDetail' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Remove old tests. Fix TestGetClient test

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageSummaries

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageVersions

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageVersions

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageVersions' impl (#3785)

* Add 'GetAvailablePackageVersions' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageVersions

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetInstalledPackageSummaries' impl (#3787)

* Add required files for the Carvel plugin impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageSummaries' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageVersions' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageDetail' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetInstalledPackageSummaries' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Remove old tests. Fix TestGetClient test

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageSummaries

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageVersions

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageVersions

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetInstalledPackageSummaries

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageVersions' impl (#3785)

* Add 'GetAvailablePackageVersions' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageVersions

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetInstalledPackageDetail' impl (#3788)

* Add required files for the Carvel plugin impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageSummaries' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageVersions' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageDetail' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetInstalledPackageSummaries' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetInstalledPackageDetail' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Remove old tests. Fix TestGetClient test

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageSummaries

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageVersions

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageVersions

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetInstalledPackageSummaries

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetInstalledPackageDetail

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Fix wrong secret name in test

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageVersions' impl (#3785)

* Add 'GetAvailablePackageVersions' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageVersions

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'CreateInstalledPackage' impl (#3789)

* Add required files for the Carvel plugin impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageSummaries' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageVersions' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageDetail' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetInstalledPackageSummaries' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetInstalledPackageDetail' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'CreateInstalledPackage' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Remove old tests. Fix TestGetClient test

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageSummaries

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageVersions

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageVersions

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetInstalledPackageSummaries

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetInstalledPackageDetail

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Fix wrong secret name in test

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add targetCluster
but throw an error if not matching with pkg one

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestCreateInstalledPackage

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Remove populated secrets in the create test. Minor renames

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'UpdateInstalledPackage' impl (#3790)

* Add required files for the Carvel plugin impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageSummaries' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageVersions' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageDetail' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetInstalledPackageSummaries' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetInstalledPackageDetail' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'CreateInstalledPackage' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'UpdateInstalledPackage' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Remove old tests. Fix TestGetClient test

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageSummaries

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageVersions

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageVersions

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetInstalledPackageSummaries

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetInstalledPackageDetail

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Fix wrong secret name in test

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add targetCluster
but throw an error if not matching with pkg one

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestCreateInstalledPackage

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add basic TestUpdateInstalledPackage

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Fix wrong pkg cluster

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Remove populated secrets in the create test. Minor renames

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'DeleteInstalledPackage' impl (#3791)

* Add required files for the Carvel plugin impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageSummaries' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageVersions' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetAvailablePackageDetail' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetInstalledPackageSummaries' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetInstalledPackageDetail' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'CreateInstalledPackage' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'UpdateInstalledPackage' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'DeleteInstalledPackage' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Remove old tests. Fix TestGetClient test

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageSummaries

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageVersions

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetAvailablePackageVersions

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetInstalledPackageSummaries

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetInstalledPackageDetail

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Fix wrong secret name in test

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add targetCluster
but throw an error if not matching with pkg one

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestCreateInstalledPackage

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add basic TestUpdateInstalledPackage

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Fix wrong pkg cluster

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Remove populated secrets in the create test. Minor renames

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestDeleteInstalledPackage

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add 'GetPackageRepositories' impl (#3792)

* Add 'GetPackageRepositories' impl

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Fix nil pointer

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add TestGetPackageRepositories

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Merge manually some changes

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Changes after code review

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Fix example plugin name in values.yaml

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Add "try again" button in the installed pkgs view

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Initial WIP GetInstalledPackageResourceRefs

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants