Skip to content
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

DEVOPS-3141 teleport changes #118

Merged
merged 24 commits into from
Nov 4, 2022
Merged

DEVOPS-3141 teleport changes #118

merged 24 commits into from
Nov 4, 2022

Conversation

vivekjainx86
Copy link
Contributor

No description provided.

pkg/exec/exec.go Outdated Show resolved Hide resolved
pkg/exec/exec.go Outdated
@@ -25,6 +25,8 @@ import (
var (
//go:embed bin/tsh
tsh []byte
//go:embed bin/tsh.md5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of embedding the md5 hash file into the binary, we can set md5Sum string value at build time using -ldflags, something like shubhindia/go-m1temperature@1d0084b. Embedding the file will unnecessarily increase the overall binary size. 😁

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @shubhindia for suggestion, also we are already using -ldflags for version, we can use that for md5 hash too.

pkg/exec/exec.go Outdated
@@ -36,9 +38,13 @@ func InstallTsh() error {
return os.WriteFile(dir+"/tsh", tsh, 0755)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might cause issue in m1 where after executing the command it just returns zsh: killed because of some gatekeeper issues in macOS. This can be solved by running codesign after binary is copied so binary doesn't get quarantined. codesign --sign - --force --preserve-metadata=entitlements,requirements,flags,runtime <binary-path> should do the trick.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm.. I will check on it. 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you face above issue with a binary built-for arm or x86_64? We are not planning to build an arm-based binary but relaying on rosetta to the job on m1/2 macs. 🤞

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. There is no issue with x86_64. Using Rosetta would mean people will have to install it. The issue occurs on arm machines only. Even homebrew guys had to implement a workaround. Homebrew/brew@4c19d67
I found the above command from there only 🤪

Copy link
Contributor

@shubhindia shubhindia Aug 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or installation can be manual. Like it is done for kubectl right now. We just check if its installed and ask people to install it if it isn't

@avdhoot avdhoot merged commit 96fd20c into master Nov 4, 2022
@avdhoot avdhoot deleted the devops-3141-teleport-changes branch November 4, 2022 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants