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

[tsh] Initial support for teleport tsh, GEODESIC_PORT #452

Merged
merged 2 commits into from
Apr 17, 2019
Merged
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FROM google/cloud-sdk:241.0.0-alpine as google-cloud-sdk
#
# Cloud Posse Package Distribution
#
FROM cloudposse/packages:0.87.0 as packages
FROM cloudposse/packages:0.89.1 as packages

WORKDIR /packages

Expand Down
2 changes: 1 addition & 1 deletion geodesic_apkindex.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7b7682ed95935a145df2d4bac8ff88cd
b7d17e808fd428fec858a3e7a15997b5
1 change: 1 addition & 0 deletions packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ stern@cloudposse
sudo
syslog-ng
tar
teleport@cloudposse
terraform@cloudposse
terragrunt@cloudposse
terrahelp@cloudposse
Expand Down
5 changes: 5 additions & 0 deletions rootfs/etc/profile.d/tsh-login.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

function tsh-login() {
tsh login --bind-addr=:${GEODESIC_PORT} --proxy=${TELEPORT_PROXY_DOMAIN_NAME:-tele.${DOCKER_IMAGE#*.}} $*
}
2 changes: 1 addition & 1 deletion rootfs/templates/wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function use() {
--publish ${GEODESIC_PORT}:${GEODESIC_PORT}
--name "${DOCKER_NAME}"
--rm
--env KUBERNETES_API_PORT=${GEODESIC_PORT})
--env GEODESIC_PORT=${GEODESIC_PORT})
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure about ports

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I support this. I want to generalize it so we can use it for both kubectl and teleport. The port can be overloaded,

Copy link
Member

Choose a reason for hiding this comment

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

Also, I like the consistency where the LHS==RHS env name


trap run_exit_hooks EXIT
# the extra curly braces around .ID are because this file goes through go template substitution local before being installed as a shell script
Expand Down