mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #19751 from mikedanese/fix-nil
deployment: fix nil pointer panic
This commit is contained in:
commit
810544633e
@ -198,7 +198,7 @@ func (dc *DeploymentController) Run(workers int, stopCh <-chan struct{}) {
|
||||
func (dc *DeploymentController) addRC(obj interface{}) {
|
||||
rc := obj.(*api.ReplicationController)
|
||||
glog.V(4).Infof("Replication controller %s added.", rc.Name)
|
||||
if d := dc.getDeploymentForRC(rc); rc != nil {
|
||||
if d := dc.getDeploymentForRC(rc); d != nil {
|
||||
dKey, err := controller.KeyFunc(d)
|
||||
if err != nil {
|
||||
glog.Errorf("Couldn't get key for deployment controller %#v: %v", d, err)
|
||||
|
Loading…
Reference in New Issue
Block a user