Skip to content

Commit

Permalink
Merge pull request #14 from harshad16/sync-rhods-1.31
Browse files Browse the repository at this point in the history
Sync RHODS 1.31  branch with v1.7 ODH branch
  • Loading branch information
harshad16 authored Aug 3, 2023
2 parents 8f2a0a2 + 78f1a7b commit 8a773ff
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
14 changes: 0 additions & 14 deletions components/notebook-controller/controllers/notebook_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,24 +392,10 @@ func generateStatefulSet(instance *v1beta1.Notebook) *appsv1.StatefulSet {
}

podSpec := &ss.Spec.Template.Spec
podSpec.Volumes = append(podSpec.Volumes, corev1.Volume{
Name: "shm",
VolumeSource: corev1.VolumeSource{
EmptyDir: &corev1.EmptyDirVolumeSource{
Medium: corev1.StorageMediumMemory,
},
},
})


container := &podSpec.Containers[0]
if container.WorkingDir == "" {
container.WorkingDir = "/home/jovyan"
}
container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{
Name: "shm",
MountPath: "/dev/shm",
})
if container.Ports == nil {
container.Ports = []corev1.ContainerPort{
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,6 @@ var _ = Describe("The Openshift Notebook controller", func() {
"--upstream=http://localhost:8888",
"--upstream-ca=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt",
"--email-domain=*",
"--skip-provider-button",
`--openshift-sar={"verb":"get","resource":"notebooks","resourceAPIGroup":"kubeflow.org",` +
`"resourceName":"` + Name + `","namespace":"$(NAMESPACE)"}`,
"--logout-url=https://example.notebook-url/notebook/" + Namespace + "/" + Name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ import (
"context"
"encoding/json"
"fmt"
configv1 "github.com/openshift/api/config/v1"
"net/http"

configv1 "github.com/openshift/api/config/v1"

nbv1 "github.com/kubeflow/kubeflow/components/notebook-controller/api/v1"
"github.com/kubeflow/kubeflow/components/notebook-controller/pkg/culler"
admissionv1 "k8s.io/api/admission/v1"
Expand Down Expand Up @@ -91,7 +92,6 @@ func InjectOAuthProxy(notebook *nbv1.Notebook, oauth OAuthConfig) error {
"--upstream=http://localhost:8888",
"--upstream-ca=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt",
"--email-domain=*",
"--skip-provider-button",
`--openshift-sar={"verb":"get","resource":"notebooks","resourceAPIGroup":"kubeflow.org",` +
`"resourceName":"` + notebook.Name + `","namespace":"$(NAMESPACE)"}`,
},
Expand Down

0 comments on commit 8a773ff

Please sign in to comment.