Skip to content

Commit ae6e4f0

Browse files
committed
Fix template
Signed-off-by: Matheus Cruz <[email protected]>
1 parent 704e1bf commit ae6e4f0

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

workspaces/controller/internal/controller/workspace_controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,6 @@ func generateStatefulSet(workspace *kubefloworgv1beta1.Workspace, workspaceKind
586586
}
587587

588588
containerPortsIdMap := make(map[string]kubefloworgv1beta1.ImagePort)
589-
httpPathPrefixFunc := helper.GenerateHttpPathPrefixFunc(workspace, containerPortsIdMap)
590589

591590
// generate container ports
592591
containerPorts := make([]corev1.ContainerPort, len(imageConfigSpec.Ports))
@@ -605,6 +604,7 @@ func generateStatefulSet(workspace *kubefloworgv1beta1.Workspace, workspaceKind
605604
// NOTE: we construct this map for use in the go string templates
606605
containerPortsIdMap[port.Id] = port
607606
}
607+
httpPathPrefixFunc := helper.GenerateHttpPathPrefixFunc(workspace, containerPortsIdMap)
608608

609609
// generate container env
610610
containerEnv := make([]corev1.EnvVar, len(workspaceKind.Spec.PodTemplate.ExtraEnv))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package helper
2+
3+
import "github.com/onsi/ginkgo/v2"
4+
5+
var _ = ginkgo.Describe("helper", func() {
6+
7+
ginkgo.It("should render request headers correctly", func() {
8+
9+
m := make(map[string]string, 1)
10+
m["X-RStudio"] = "{{ httpPathPrefix 'rstudio' }}"
11+
})
12+
})

0 commit comments

Comments
 (0)