Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion components/pvcviewer-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ spec:
# podSpec: {}
# If defined, the viewer will be exposed via a Service and a VirtualService
networking:
# Specifies the cluster domain
clusterDomain: cluster.local
# Specifies the application's target port used by the Service
targetPort: 8080
# The base prefix is suffixed by '/namespace/name' to create the
Expand Down Expand Up @@ -106,4 +108,4 @@ kubectl -n kubeflow set image deployment pvc-viewer-controller-manager manager=k
kubectl apply -k config/samples
```

After the viewer has been launched, you should be able to open the filebrowser in your browser at `/pvcviewer/kubeflow-user-example-com/pvcviewer-sample/files/`.
After the viewer has been launched, you should be able to open the filebrowser in your browser at `/pvcviewer/kubeflow-user-example-com/pvcviewer-sample/files/`.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ type PVCViewerSpec struct {
}

type Networking struct {
// Specifies the cluster domain.
// +optional
ClusterDomain string `json:"clusterDomain"`
// Specifies the application's target port used by the Deployment's Service.
// +optional
TargetPort intstr.IntOrString `json:"targetPort"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ spec:
properties:
networking:
properties:
clusterDomain:
type: string
default: cluster.local
basePrefix:
type: string
rewrite:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func (r *PVCViewerReconciler) reconcileVirtualService(ctx context.Context, log l
if viewer.Spec.Networking.Rewrite != "" {
rewrite = viewer.Spec.Networking.Rewrite
}
service := fmt.Sprintf("%s%s.%s.svc.cluster.local", resourcePrefix, viewer.Name, viewer.Namespace)
service := fmt.Sprintf("%s%s.%s.svc.%s", resourcePrefix, viewer.Name, viewer.Namespace, viewer.Spec.Networking.ClusterDomain)
var timeout *string = nil
if viewer.Spec.Networking.Timeout != "" {
timeout = &viewer.Spec.Networking.Timeout
Expand Down