mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-30 21:30:16 +00:00 
			
		
		
		
	Merge pull request #59837 from Cynerva/gkk/fix-auth-bootstrap-on-upgrade
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. juju: Fix broken ingress after upgrade-charm **What this PR does / why we need it**: This fixes a bug that prevents the ingress controller from being deployed after doing an `upgrade-charm`. Essentially, `worker.auth.bootstrapped` gets cleared during `upgrade-charm`, and it never gets set again. This prevents the `start_worker` and `render_and_launch_ingress` handlers from running, among other things. This PR fixes that. **Release note**: ```release-note NONE ```
This commit is contained in:
		| @@ -970,15 +970,14 @@ def catch_change_in_creds(kube_control): | ||||
|     """Request a service restart in case credential updates were detected.""" | ||||
|     nodeuser = 'system:node:{}'.format(get_node_name().lower()) | ||||
|     creds = kube_control.get_auth_credentials(nodeuser) | ||||
|     if creds \ | ||||
|             and data_changed('kube-control.creds', creds) \ | ||||
|             and creds['user'] == nodeuser: | ||||
|     if creds and creds['user'] == nodeuser: | ||||
|         # We need to cache the credentials here because if the | ||||
|         # master changes (master leader dies and replaced by a new one) | ||||
|         # the new master will have no recollection of our certs. | ||||
|         db.set('credentials', creds) | ||||
|         set_state('worker.auth.bootstrapped') | ||||
|         set_state('kubernetes-worker.restart-needed') | ||||
|         if data_changed('kube-control.creds', creds): | ||||
|             set_state('kubernetes-worker.restart-needed') | ||||
|  | ||||
|  | ||||
| @when_not('kube-control.connected') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user