Ensuring passing context across fission (#2555)

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
Sanket Sudake
2022-09-26 16:05:45 +05:30
committed by GitHub
parent a8a81ef5be
commit 3fa0f4bde3
43 changed files with 301 additions and 300 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
package container
import (
"context"
"encoding/json"
"fmt"
"log"
@@ -90,8 +91,8 @@ func MakeFetcherConfig(sharedMountPath string) (*Config, error) {
}, nil
}
func (cfg *Config) SetupServiceAccount(kubernetesClient kubernetes.Interface, namespace string, context interface{}) error {
_, err := utils.SetupSA(kubernetesClient, fv1.FissionFetcherSA, namespace)
func (cfg *Config) SetupServiceAccount(ctx context.Context, kubernetesClient kubernetes.Interface, namespace string, context interface{}) error {
_, err := utils.SetupSA(ctx, kubernetesClient, fv1.FissionFetcherSA, namespace)
if err != nil {
log.Printf("Error : %v creating %s in ns : %s for: %#v", err, fv1.FissionFetcherSA, namespace, context)
return err