MortalHappiness commented on a change in pull request #588:
URL: https://github.com/apache/submarine/pull/588#discussion_r633101543
##########
File path: submarine-cloud-v2/controller.go
##########
@@ -1134,6 +1136,17 @@ func (c *Controller) syncHandler(workqueueItem
WorkQueueItem) error {
if err != nil {
return err
}
+
+ // Port-forwarding
+ // TODO:
+ // (1) multi-tenant port-forwarding
+ // (2) Basic operations: on/off/modify (change port)
+ // (3) in-cluster
+ if action == ADD {
+ if !incluster {
+ k8sutil.ServicePortForwardPort(context.TODO(),
newNamespace, "traefik", 32080, 80, color.FgGreen)
+ }
+ }
} else { // Case: DELETE
Review comment:
You do not remove the port forward in delete event. So if the submarine
custom resource is deleted and re-created again, some bugs will happen.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]