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

Feat: allow delete the provisioning resources #354

Merged
merged 5 commits into from
Feb 9, 2023

Conversation

chivalryq
Copy link
Member

@chivalryq chivalryq commented Feb 7, 2023

Signed-off-by: Qiaozp [email protected]

Add a feature gate: AllowDeleteProvisioningResource. When enabled, controller will allow to delete Configuration in the state of ProvisioningAndChecking. This is useful when developing new configuration.

Here's some examples.

  • When apply a large Configuration which creates more than one cloud resource, it could fail to create all resources but some of resources have been created.
  • When we apply a Configuration and it fails somehow. (Like the API has been changed by vendor)

Before, we have no method to delete this Configuration other than delete the finalizer fields manually and delete the created resources on vendor's console, which is tedious and annoying.

Now created resource can be deleted by controller automatically.

@codecov
Copy link

codecov bot commented Feb 7, 2023

Codecov Report

Base: 79.31% // Head: 77.20% // Decreases project coverage by -2.11% ⚠️

Coverage data is based on head (edfa822) compared to base (3a96f68).
Patch coverage: 86.66% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #354      +/-   ##
==========================================
- Coverage   79.31%   77.20%   -2.11%     
==========================================
  Files          23       24       +1     
  Lines        1750     2018     +268     
==========================================
+ Hits         1388     1558     +170     
- Misses        278      368      +90     
- Partials       84       92       +8     
Flag Coverage Δ
e2e 0.00% <ø> (∅)
unit 80.06% <86.66%> (+0.74%) ⬆️

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

Impacted Files Coverage Δ
controllers/configuration/configuration.go 92.22% <0.00%> (-3.19%) ⬇️
controllers/terraform/status.go 77.41% <ø> (ø)
e2e/normal/regression.go 0.00% <ø> (ø)
controllers/configuration_controller.go 79.25% <87.92%> (+1.89%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: Qiaozp <[email protected]>
chart/values.yaml Outdated Show resolved Hide resolved
@chivalryq chivalryq changed the title Feat: allow delete configuration halfway the apply Feat: allow delete the provisioning resources Feb 7, 2023
Signed-off-by: Qiaozp <[email protected]>

Fix test script

Signed-off-by: Qiaozp <[email protected]>

better error reporting in CI

Signed-off-by: Qiaozp <[email protected]>

report stderr

Signed-off-by: Qiaozp <[email protected]>

relative path

Signed-off-by: Qiaozp <[email protected]>

fix git cred test

Signed-off-by: Qiaozp <[email protected]>

wait job done

Signed-off-by: Qiaozp <[email protected]>

debug

Signed-off-by: Qiaozp <[email protected]>

debug

Signed-off-by: Qiaozp <[email protected]>

debug

Signed-off-by: Qiaozp <[email protected]>

debug

Signed-off-by: Qiaozp <[email protected]>

smaller resource request

Signed-off-by: Qiaozp <[email protected]>
Signed-off-by: Qiaozp <[email protected]>
cpu: "1000m"
memory: "2Gi"
cpu: "500m"
memory: "1Gi"
Copy link
Contributor

Choose a reason for hiding this comment

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

you can keep the limits quota, just reduce the requests.

cpu: "1000m"
memory: "2Gi"
cpu: "500m"
memory: "1Gi"
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make it even smaller?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this is for pod where run terraform apply which doesn't require much resources

Copy link
Contributor

@wonderflow wonderflow left a comment

Choose a reason for hiding this comment

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

generally LGTM

Signed-off-by: Qiaozp <[email protected]>
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