-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mesheryctl] Bug fixes in mesheryctl system start
#10961
[mesheryctl] Bug fixes in mesheryctl system start
#10961
Conversation
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
…d when using port-fordward Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
) | ||
|
||
// dashboardOptions holds values for command line flags that apply to the dashboard | ||
// command. | ||
type dashboardOptions struct { | ||
host string | ||
port int | ||
podPort int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or is this just the Kubernetes api address, not necessarily the specific host?
@@ -71,6 +72,9 @@ mesheryctl system dashboard | |||
// Open Meshery UI in browser and use port-forwarding (if default port is taken already) | |||
mesheryctl system dashboard --port-forward | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please clarify whether this port number assignment is by default or just an example. Why not use 9081 as the default (and as the example)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will you confirm that the port-forward command gracefully handles platform
!= “kubernetes@ and informs the user that this is a platform-specific command?
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
When used with docker, it just skips the protforward logic and directly opens the browser at // @Jougan-0 You can quickly update, to add a warning message stating the flag is for when meshery is deployed on kubernetes |
@@ -44,7 +44,7 @@ func NewPortForward( | |||
ctx context.Context, | |||
client *meshkitkube.Client, | |||
namespace, deployName string, | |||
host string, localPort, remotePort int, | |||
host string, localPort, remotePort int, // I think "remotePort" should be idenitified dynamically based on the retrieved Pod configuration, instead of assuming 8080, or asking from user? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, although, for the service to be listening on a port other than 8080, the user will have to be running custom Meshery image builds.
Notes for Reviewers
This PR fixes #
mesheryctl system start
command is run using theMESHERY_SERVER_CALLBACK_URL
env var, the variable is not set inside the container.port-forward
flag, a random port is chosen on the host device, and traffic is then directed to the server within the Pod. This presents challenges in specifying a custom value forMESHERY_SERVER_CALLBACK_URL
, as this value must be provided at server startup. The PR ensures that whatever value is assigned to the environment variable, theport-forward
will correctly forward to the corresponding value of the environment variable<host:port>
.Signed commits