Fix namespace used in speciallized pod cleanup (#2415)
In pool pod controller we were using pool namespace rather than pod namespace in cleanup which was causing issue in few scenarios. Using pod namespace now instead. Also add unit test for scenario which was failing. Using kubernetes client interface now across instead of kubernetes ClientSet for testing. Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -93,7 +93,7 @@ func MakeFetcherConfig(sharedMountPath string) (*Config, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (cfg *Config) SetupServiceAccount(kubernetesClient *kubernetes.Clientset, namespace string, context interface{}) error {
|
||||
func (cfg *Config) SetupServiceAccount(kubernetesClient kubernetes.Interface, namespace string, context interface{}) error {
|
||||
_, err := utils.SetupSA(kubernetesClient, fv1.FissionFetcherSA, namespace)
|
||||
if err != nil {
|
||||
log.Printf("Error : %v creating %s in ns : %s for: %#v", err, fv1.FissionFetcherSA, namespace, context)
|
||||
|
||||
Reference in New Issue
Block a user