Adopt machine console to new metal-console - #58
Merged
Merged
Conversation
majst01
force-pushed
the
console-adoption
branch
from
September 3, 2026 11:48
1df257e to
23491d4
Compare
majst01
force-pushed
the
console-adoption
branch
from
September 4, 2026 05:50
23491d4 to
74e528f
Compare
Gerrit91
reviewed
Sep 9, 2026
Comment on lines
+9
to
+10
| // sshClient opens an interactive ssh session to the host on port with user, authenticated by the key. | ||
| func SShClient(user, keyfile, host string, port int, idToken, project string) error { |
Contributor
There was a problem hiding this comment.
Suggested change
| // sshClient opens an interactive ssh session to the host on port with user, authenticated by the key. | |
| func SShClient(user, keyfile, host string, port int, idToken, project string) error { | |
| // SSHClient opens an interactive ssh session to the host on port with user, authenticated by the key. | |
| func SSHClient(user, keyfile, host string, port int, idToken, project string) error { |
| } | ||
|
|
||
| err = sshClient(id, viper.GetString("sshidentity"), parsedurl.Host, viper.GetInt("metal-console-port"), &c.c.Context.Token, true) | ||
| err = helpers.SShClient(id, viper.GetString("sshidentity"), parsedurl.Host, viper.GetInt("metal-console-port"), c.c.Context.Token, c.c.GetProject()) |
Contributor
There was a problem hiding this comment.
As project is not required for admins, I think it would be better to just omit passing the LC_METAL_STACK_PROJECT env variable (turning the func param into a pointer). This prevents passing a probably incorrect project ID along with the machine ID, which would be kind of confusing.
| } | ||
|
|
||
| env := map[string]string{ | ||
| "LC_METAL_STACK_OIDC_TOKEN": idToken, |
Contributor
There was a problem hiding this comment.
It's a bit unfortunate we do not expose constants for this. Would it make sense to create a pkg/contants in metal-console or put this into metal-lib?
majst01
force-pushed
the
console-adoption
branch
from
September 9, 2026 09:57
45bedbe to
308afa9
Compare
iljarotar
approved these changes
Sep 9, 2026
Gerrit91
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Newer metal-console requires some changes here, also added end user console access
Used AI-Tools ✨