From 9e4e6a977b1a1b545c37945accb57467097333fb Mon Sep 17 00:00:00 2001 From: Luca Francescato Date: Thu, 22 Apr 2021 10:58:13 +0200 Subject: [PATCH 1/2] Add annotations to FileBrowser ingress --- operators/pkg/instance-creation/exposition.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/operators/pkg/instance-creation/exposition.go b/operators/pkg/instance-creation/exposition.go index 131e18094..833fbe576 100644 --- a/operators/pkg/instance-creation/exposition.go +++ b/operators/pkg/instance-creation/exposition.go @@ -117,8 +117,12 @@ func ForgeFileBrowserIngress( Namespace: namespace, Labels: nil, Annotations: map[string]string{ - "nginx.ingress.kubernetes.io/auth-signin": "https://$host/" + urlUUID + "/oauth2/start?rd=$escaped_request_uri", - "nginx.ingress.kubernetes.io/auth-url": "https://$host/" + urlUUID + "/oauth2/auth", + "nginx.ingress.kubernetes.io/auth-signin": "https://$host/" + urlUUID + "/oauth2/start?rd=$escaped_request_uri", + "nginx.ingress.kubernetes.io/auth-url": "https://$host/" + urlUUID + "/oauth2/auth", + "nginx.ingress.kubernetes.io/proxy-body-size": "0", + "nginx.ingress.kubernetes.io/proxy-read-timeout": "600", + "nginx.ingress.kubernetes.io/proxy-send-timeout": "600", + "nginx.ingress.kubernetes.io/proxy-max-temp-file-size": "0", }, }, Spec: networkingv1.IngressSpec{ From 32f0a11dbb794d761cf1b029a2e98f155c1a4330 Mon Sep 17 00:00:00 2001 From: Luca Francescato Date: Thu, 22 Apr 2021 15:12:34 +0200 Subject: [PATCH 2/2] Adjust FileBrowser resources --- .../pkg/instance-controller/container_logic.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/operators/pkg/instance-controller/container_logic.go b/operators/pkg/instance-controller/container_logic.go index bf20536ec..77da1f460 100644 --- a/operators/pkg/instance-controller/container_logic.go +++ b/operators/pkg/instance-controller/container_logic.go @@ -162,9 +162,18 @@ func buildContainerInstanceDeploymentSpec( ReadinessProbe: &tigerVncProbe, }, { - Name: "filebrowser", - Image: o.FileBrowserImg + ":" + o.FileBrowserImgTag, - Resources: buildResRequirements(0.1, 10, resource.MustParse("100Mi")), // actual: ~10MiB + Name: "filebrowser", + Image: o.FileBrowserImg + ":" + o.FileBrowserImgTag, + Resources: v1.ResourceRequirements{ + Requests: v1.ResourceList{ + "cpu": resource.MustParse(fmt.Sprintf("%f", 0.01)), + "memory": resource.MustParse("100Mi"), + }, + Limits: v1.ResourceList{ + "cpu": resource.MustParse(fmt.Sprintf("%f", 0.25)), + "memory": resource.MustParse("500Mi"), + }, + }, Args: []string{ "--port=" + fmt.Sprintf("%d", fileBrowserPort), "--root=" + mountPath,