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

Fix: allow external cloud resources to be kept when Application is deleted #2698

Merged
merged 4 commits into from Nov 16, 2021

Conversation

zzxwill
Copy link
Collaborator

@zzxwill zzxwill commented Nov 12, 2021

Provide an option for users whether to keep provisioned cloud resources when Terraform-typed Application is deleted.

Fix #2697

Description of your changes

Fixes #

I have:

  • Read and followed KubeVela's contribution process.
  • Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Special notes for your reviewer

…leted

Provide an option for users whether to keep provisioned cloud resources when Terraform-typed Application is deleted.

Fix kubevela#2697
@codecov
Copy link

codecov bot commented Nov 15, 2021

Codecov Report

Merging #2698 (8492149) into master (b3014c2) will increase coverage by 3.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2698      +/-   ##
==========================================
+ Coverage   58.60%   61.69%   +3.09%     
==========================================
  Files         186      186              
  Lines       17759    17756       -3     
==========================================
+ Hits        10407    10955     +548     
+ Misses       6181     5608     -573     
- Partials     1171     1193      +22     
Flag Coverage Δ
apiserver-unittests 11.18% <0.00%> (+<0.01%) ⬆️
core-unittests 55.49% <ø> (+0.01%) ⬆️
e2e-multicluster-test 24.32% <0.00%> (+0.13%) ⬆️
e2e-rollout-tests 32.17% <100.00%> (?)
e2etests 37.90% <100.00%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
apis/core.oam.dev/common/types.go 14.28% <ø> (ø)
apis/core.oam.dev/common/zz_generated.deepcopy.go 38.52% <100.00%> (+0.62%) ⬆️
...ponentdefinition/componentdefinition_controller.go 80.00% <0.00%> (-5.56%) ⬇️
pkg/controller/utils/capability.go 79.23% <0.00%> (-1.28%) ⬇️
...am.dev/v1alpha2/applicationconfiguration/render.go 87.39% <0.00%> (-0.82%) ⬇️
...tepdefinition/workflowstepdefinition_controller.go 63.82% <0.00%> (ø)
apis/core.oam.dev/v1beta1/zz_generated.deepcopy.go 42.64% <0.00%> (+0.28%) ⬆️
pkg/appfile/parser.go 67.10% <0.00%> (+0.43%) ⬆️
...dev/v1alpha2/applicationconfiguration/component.go 59.05% <0.00%> (+0.78%) ⬆️
pkg/oam/util/helper.go 73.41% <0.00%> (+0.97%) ⬆️
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b3014c2...8492149. Read the comment docs.

@zzxwill zzxwill marked this pull request as ready for review November 16, 2021 03:22

// ProviderReference specifies the reference to Provider
ProviderReference *types.Reference `json:"providerRef,omitempty"`
v1beta1.BaseConfigurationSpec `json:",inline"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we keep the compatiblity here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, the CRD didn't change and I have tested VPC with remote git repo. And I will port e2e tests from https://github.com/oam-dev/terraform-controller/blob/master/.github/workflows/e2e-test.yml to this repo once it got stable.

@wonderflow wonderflow merged commit 7a06701 into kubevela:master Nov 16, 2021
@zzxwill
Copy link
Collaborator Author

zzxwill commented Nov 19, 2021

/backport 1.1

@zzxwill zzxwill deleted the override-region branch November 19, 2021 09:09
@github-actions
Copy link

Backport failed for release-1.1, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin release-1.1
git worktree add -d .worktree/backport-2698-to-release-1.1 origin/release-1.1
cd .worktree/backport-2698-to-release-1.1
git checkout -b backport-2698-to-release-1.1
ancref=$(git merge-base 3df47d74f1937afa78a6241b1e168de51dd35118 849214960c13f81e0c1bd05fbcc620c8d920d23a)
git cherry-pick -x $ancref..849214960c13f81e0c1bd05fbcc620c8d920d23a

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.

Allow external cloud resources to be kept when Application is deleted
2 participants