From a98d86ed76e555db74df34fa4b286c18374eb2b4 Mon Sep 17 00:00:00 2001 From: catttam Date: Thu, 25 Jul 2024 12:30:16 +0200 Subject: [PATCH] Deleted debug comments --- pkg/handlers/create.go | 5 ----- pkg/types/mount.go | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/handlers/create.go b/pkg/handlers/create.go index c2a41864..79844911 100644 --- a/pkg/handlers/create.go +++ b/pkg/handlers/create.go @@ -53,9 +53,7 @@ func MakeCreateHandler(cfg *types.Config, back types.ServerlessBackend) gin.Hand return func(c *gin.Context) { var service types.Service authHeader := c.GetHeader("Authorization") - createLogger.Printf("[*] POST header : %v", authHeader) if len(strings.Split(authHeader, "Bearer")) == 1 { - createLogger.Printf(">>> is admin") isAdminUser = true service.Owner = "cluster_admin" createLogger.Printf("Creating service for user: %s", service.Owner) @@ -68,13 +66,11 @@ func MakeCreateHandler(cfg *types.Config, back types.ServerlessBackend) gin.Hand // Check service values and set defaults checkValues(&service, cfg) - createLogger.Printf(">>> checked values") // Check if users in allowed_users have a MinIO associated user minIOAdminClient, _ := utils.MakeMinIOAdminClient(cfg) // Service is created by an EGI user if !isAdminUser { - createLogger.Printf(">>> not admin") uid, err := auth.GetUIDFromContext(c) if err != nil { c.String(http.StatusInternalServerError, fmt.Sprintln(err)) @@ -136,7 +132,6 @@ func MakeCreateHandler(cfg *types.Config, back types.ServerlessBackend) gin.Hand } // Create the service - createLogger.Printf(">>> service uid: %s", service.Owner) if err := back.CreateService(service); err != nil { // Check if error is caused because the service name provided already exists if k8sErrors.IsAlreadyExists(err) { diff --git a/pkg/types/mount.go b/pkg/types/mount.go index 1bfd0df2..4c2e5621 100644 --- a/pkg/types/mount.go +++ b/pkg/types/mount.go @@ -46,6 +46,7 @@ done` ephemeralVolumeMount = "/tmpfolder" ) +// SetMount Creates the sidecar container that mounts the source volume onto the pod volume func SetMount(podSpec *v1.PodSpec, service Service, cfg *Config) { podSpec.Containers = append(podSpec.Containers, sidecarPodSpec(service)) termination := int64(5)