mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 12:18:16 +00:00 
			
		
		
		
	abort if namespace doesn't exist or terminating
This commit is contained in:
		@@ -187,6 +187,10 @@ func (c *Publisher) syncNamespace(ns string) error {
 | 
				
			|||||||
				"ca.crt": string(c.rootCA),
 | 
									"ca.crt": string(c.rootCA),
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
		}, metav1.CreateOptions{})
 | 
							}, metav1.CreateOptions{})
 | 
				
			||||||
 | 
							// don't retry a create if the namespace doesn't exist or is terminating
 | 
				
			||||||
 | 
							if apierrors.IsNotFound(err) || apierrors.HasStatusCause(err, v1.NamespaceTerminatingCause) {
 | 
				
			||||||
 | 
								return nil
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		return err
 | 
							return err
 | 
				
			||||||
	case err != nil:
 | 
						case err != nil:
 | 
				
			||||||
		return err
 | 
							return err
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user