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 CRD handling for upgrades and removals #977

Merged
merged 3 commits into from
May 6, 2022

Conversation

yaron2
Copy link
Member

@yaron2 yaron2 commented May 5, 2022

Fixes #975.

This PR does several things:

  1. Fixes issue CLI does not install Resiliency CRD #975 by adding the resiliency CRD to the list of CRDs to be applied to the cluster and removed when uninstalled
  2. Fixes an issue where a user tries to install a version of Dapr (for example, 1.1.0) with a CLI that tries to apply CRDs that are not available in the desired version (for example, trying to install Dapr 1.1.0 with CLI 1.5.0 will fail because the CLI can't find the subscription CRD for 1.1.0). This is done by checking if the CRD exists for the required version before attempting to apply it to the cluster.
  3. Fixes an issue where users trying to uninstall an older version of Dapr with a newer CLI is failing because the older version doesn't have a CRD that the CLI is trying to uninstall. (for example, trying to remove Dapr 1.6.0 with the 1.7.0 CLI will fail because it can't find a resiliency policy). The PR treats the removal of a CRD as a warning instead of an error.

Signed-off-by: yaron2 <schneider.yaron@live.com>
@yaron2 yaron2 requested review from a team as code owners May 5, 2022 23:08
artursouza
artursouza previously approved these changes May 5, 2022
@yaron2
Copy link
Member Author

yaron2 commented May 5, 2022

There's a silly linter issue, don't merge yet...

Signed-off-by: yaron2 <schneider.yaron@live.com>
Signed-off-by: yaron2 <schneider.yaron@live.com>
@codecov
Copy link

codecov bot commented May 5, 2022

Codecov Report

Merging #977 (893015f) into release-1.7 (1c0c3de) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@               Coverage Diff               @@
##           release-1.7     #977      +/-   ##
===============================================
- Coverage        21.71%   21.68%   -0.04%     
===============================================
  Files               33       33              
  Lines             1920     1923       +3     
===============================================
  Hits               417      417              
- Misses            1449     1452       +3     
  Partials            54       54              
Impacted Files Coverage Δ
pkg/kubernetes/uninstall.go 0.00% <0.00%> (ø)
pkg/kubernetes/upgrade.go 21.05% <0.00%> (-0.87%) ⬇️

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 1c0c3de...893015f. Read the comment docs.

@yaron2 yaron2 merged commit 4362537 into dapr:release-1.7 May 6, 2022
@yaron2 yaron2 deleted the fixcrds-2 branch May 6, 2022 04:49
artursouza pushed a commit that referenced this pull request Jun 22, 2022
* Fix CRD handling for upgrades and removals

Signed-off-by: yaron2 <schneider.yaron@live.com>

* nolint

Signed-off-by: yaron2 <schneider.yaron@live.com>

* linter, fix crd name

Signed-off-by: yaron2 <schneider.yaron@live.com>

Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
hueifeng pushed a commit to hueifeng/cli that referenced this pull request Jul 14, 2022
* Fix CRD handling for upgrades and removals

Signed-off-by: yaron2 <schneider.yaron@live.com>

* nolint

Signed-off-by: yaron2 <schneider.yaron@live.com>

* linter, fix crd name

Signed-off-by: yaron2 <schneider.yaron@live.com>

Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Signed-off-by: hueifeng <695979933@qq.com>
hueifeng pushed a commit to hueifeng/cli that referenced this pull request Jul 18, 2022
* Fix CRD handling for upgrades and removals

Signed-off-by: yaron2 <schneider.yaron@live.com>

* nolint

Signed-off-by: yaron2 <schneider.yaron@live.com>

* linter, fix crd name

Signed-off-by: yaron2 <schneider.yaron@live.com>

Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Signed-off-by: hueifeng <695979933@qq.com>
hueifeng pushed a commit to hueifeng/cli that referenced this pull request Jul 29, 2022
* Fix CRD handling for upgrades and removals

Signed-off-by: yaron2 <schneider.yaron@live.com>

* nolint

Signed-off-by: yaron2 <schneider.yaron@live.com>

* linter, fix crd name

Signed-off-by: yaron2 <schneider.yaron@live.com>

Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Signed-off-by: hueifeng <695979933@qq.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.

3 participants