Skip to content

Commit

Permalink
Merge pull request #1493 from cybozu/set-env-var-for-hubble
Browse files Browse the repository at this point in the history
Set env vars for hubble
  • Loading branch information
rkwmt authored Dec 17, 2024
2 parents 9c933b5 + 7a20478 commit f69cfcf
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
21 changes: 18 additions & 3 deletions teleport-node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
# Stage1: build from source
FROM ghcr.io/cybozu/golang:1.22-jammy AS build

ARG TELEPORT_VERSION=16.4.6

ARG TELEPORT_VERSION=15.3.7
ARG RUST_VERSION=1.77.0
ARG WASM_PACK_VERSION=0.12.1

# Install Nodejs
ARG NODE_VERSION=20.13.0
ENV NODE_URL="https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz"
ENV NODE_PATH="/usr/local/lib/nodejs-linux"
ENV PATH="$PATH:${NODE_PATH}/bin"
RUN mkdir -p ${NODE_PATH} && \
curl -o /tmp/nodejs.tar.xz -L ${NODE_URL} && \
tar -xJf /tmp/nodejs.tar.xz -C /usr/local/lib/nodejs-linux --strip-components=1
RUN corepack enable yarn
RUN git clone --depth 1 --branch v${TELEPORT_VERSION} https://github.com/gravitational/teleport && \
curl https://sh.rustup.rs -sSf | sh -s -- -y && . "$HOME/.cargo/env" && \
rustup toolchain add ${RUST_VERSION} && rustup default ${RUST_VERSION} && \
yarn global add wasm-pack@${WASM_PACK_VERSION} && \
cd teleport && \
make build/teleport OS=linux WEBASSETS_SKIP_BUILD=1
make build/teleport OS=linux

# Stage2: setup runtime container
FROM ghcr.io/cybozu/ubuntu-debug:22.04
Expand All @@ -19,6 +33,7 @@ COPY --from=build /work/teleport/build/teleport /usr/local/teleport/bin/
COPY --from=build /work/teleport/LICENSE /usr/local/teleport/
COPY update-necocli.sh /etc/profile.d/
COPY loki-env.sh /etc/profile.d/
COPY hubble-env.sh /etc/profile.d/

USER cybozu

Expand Down
2 changes: 1 addition & 1 deletion teleport-node/TAG
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.4.6.1
15.3.7.3
3 changes: 3 additions & 0 deletions teleport-node/hubble-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export HUBBLE_SERVER="hubble-relay.kube-system.svc:443"
export HUBBLE_TLS_ALLOW_INSECURE="true"
export HUBBLE_TLS="true"

0 comments on commit f69cfcf

Please sign in to comment.