Skip to content

Commit

Permalink
Merge pull request #442 from lucafrancescato/vm-to-docker/ingress
Browse files Browse the repository at this point in the history
  • Loading branch information
kingmakerbot authored Apr 26, 2021
2 parents 4c7b0d0 + 32f0a11 commit df41684
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
15 changes: 12 additions & 3 deletions operators/pkg/instance-controller/container_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 6 additions & 2 deletions operators/pkg/instance-creation/exposition.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit df41684

Please sign in to comment.