|
@@ -31,13 +31,18 @@ func genParam(req *types.CreateJupyterInfo) map[string]interface{} {
|
|
settings = append(settings, fmt.Sprintf("ingress.jupyterlab.hosts[0].paths[0].pathType=%s", req.PathType))
|
|
settings = append(settings, fmt.Sprintf("ingress.jupyterlab.hosts[0].paths[0].pathType=%s", req.PathType))
|
|
logx.Info(req.IngressClass, "------- len: ", len(req.IngressClass))
|
|
logx.Info(req.IngressClass, "------- len: ", len(req.IngressClass))
|
|
if len(req.IngressClass) > 0 {
|
|
if len(req.IngressClass) > 0 {
|
|
- // ingressClass, _ := json.Marshal(map[string]string{
|
|
|
|
- // "kubernetes.io/ingress.class": req.IngressClass,
|
|
|
|
- // })
|
|
|
|
|
|
+
|
|
settings = append(settings, fmt.Sprintf("ingress.jupyterlab.annotations.kubernetes\\.io/ingress\\.class=%s", req.IngressClass))
|
|
settings = append(settings, fmt.Sprintf("ingress.jupyterlab.annotations.kubernetes\\.io/ingress\\.class=%s", req.IngressClass))
|
|
settings = append(settings, fmt.Sprintf("ingress.jupyterlab.annotations.nginx\\.ingress\\.kubernetes\\.io/proxy-body-size=%s", "8192m"))
|
|
settings = append(settings, fmt.Sprintf("ingress.jupyterlab.annotations.nginx\\.ingress\\.kubernetes\\.io/proxy-body-size=%s", "8192m"))
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ if req.NodeSelector != "" {
|
|
|
|
+ settings = append(settings, fmt.Sprintf("jupyterlab.nodeSelector.kubernetes\\.io/hostname=%s", req.NodeSelector))
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if req.ImagePullSecret != "" {
|
|
|
|
+ settings = append(settings, fmt.Sprintf("jupyterlab.imagePullSecrets[0].name=%s", req.ImagePullSecret))
|
|
|
|
+ }
|
|
settings = append(settings, fmt.Sprintf("jupyterlab.image.repository=%s", req.Image))
|
|
settings = append(settings, fmt.Sprintf("jupyterlab.image.repository=%s", req.Image))
|
|
settings = append(settings, fmt.Sprintf("jupyterlab.image.tag=%s", req.Tag))
|
|
settings = append(settings, fmt.Sprintf("jupyterlab.image.tag=%s", req.Tag))
|
|
settings = append(settings, fmt.Sprintf("jupyterlab.config.baseUrl=%s", req.BaseUrl))
|
|
settings = append(settings, fmt.Sprintf("jupyterlab.config.baseUrl=%s", req.BaseUrl))
|