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: Helm dapr upgrade #5794

Merged

Conversation

JoshVanL
Copy link
Contributor

@JoshVanL JoshVanL commented Jan 24, 2023

Due to how Helm upgrades, upgrading from v1.9.5 to master is currently broken as roleRef in roles cannot be updated in place.

Error: UPGRADE FAILED: cannot patch "dapr-operator" with kind ClusterRoleBinding: ClusterRoleBinding.rbac.authorization.k8s.io "dapr-operator" is invalid: roleRef: Invalid value: rbac.RoleRef{APIGroup:"rbac.authorization.k8s.io", Kind:"ClusterRole", Name:"dapr-operator"}: cannot change roleRef

This PR reverts the ClusterRole name back to dapr-operator-admin so it doesn't change on an upgrade, and changes the binding name to match.

After a number of future versions, we would be able to remove the admin suffix from the role and binding names to be consistent since the upgrade would be deleting the exiting resources with another. There isn't currently a maximum version upgrade jump though so it's possible a user could always upgrade from pre 1.10 to any future version.

Perhaps we should create a policy for the maximum version jump a user could perform, i.e can only upgrade from target - 2 minor versions? This would allow us to change these resource names, as well as allowing us to handle these kind of problems in future.

Broken from: #5767

/cc @yaron2

@JoshVanL JoshVanL requested review from a team as code owners January 24, 2023 10:37
@codecov
Copy link

codecov bot commented Jan 24, 2023

Codecov Report

Merging #5794 (6c9ed2c) into master (f4d2e8b) will decrease coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #5794      +/-   ##
==========================================
- Coverage   65.35%   65.33%   -0.02%     
==========================================
  Files         150      150              
  Lines       15833    15833              
==========================================
- Hits        10348    10345       -3     
- Misses       4738     4742       +4     
+ Partials      747      746       -1     
Impacted Files Coverage Δ
pkg/components/pubsub/pluggable.go 64.63% <0.00%> (-4.88%) ⬇️
pkg/actors/actors.go 66.41% <0.00%> (+0.08%) ⬆️

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

@artursouza artursouza merged commit 7a6be4b into dapr:master Jan 24, 2023
Taction added a commit to Taction/dapr that referenced this pull request Jan 27, 2023
* master: (138 commits)
  Register state.sqlite component (dapr#5815)
  Disable the fasthttp Server header (dapr#5821)
  proxy test: do not fail on context canceled v2 (dapr#5818)
  Add CI step to detect disallowed changes to go.mod (dapr#5816)
  Add k6 and perftests docs (dapr#5817)
  Ignore context canceled errors in proxy test (dapr#5812)
  Dapr Workflow Engine (dapr#5784)
  lower log severity for binding problems (dapr#5806)
  Add namespaced rbac mode (dapr#5801)
  Update dependencies, pin new contrib (dapr#5791)
  gRPC proxy: fix streaming and resiliency (dapr#5777)
  Change dapr-operator ClusterRole[Binding] name to suffix with `-admin` (dapr#5794)
  Add component field to logs from components (dapr#5792)
  Fixed log message (dapr#5786)
  Updated helm install link (dapr#5790)
  Add performance test for bulk subscribe over HTTP (dapr#5650)
  Remove annotations from pluggable components injector feature (dapr#5750)
  Dapr Workflow Engine Part 1: Internal Actors (dapr#5761)
  Pin contrib for ASB and update apache dubbo replacement to address CVE (dapr#5780)
  Add deepanshuA to dapr bot. (dapr#5770)
  ...

# Conflicts:
#	go.mod
#	go.sum
#	pkg/grpc/api.go
#	pkg/http/api.go
ASHIQUEMD pushed a commit to ASHIQUEMD/dapr that referenced this pull request Feb 23, 2023
dapr#5794)

Signed-off-by: joshvanl <me@joshvanl.dev>

Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: ashiquemd <noorani.ashique5@gmail.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.

2 participants