GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - linkerd/linkerd-await: A program that blocks on linkerd readiness

BranchesTags
Open more actions menu

Latest commit

 

History

523 Commits
523 Commits

Folders and files

NameName
Last commit message
Last commit date
.devcontainer
.devcontainer
 
 
.github
.github
 
 
src
src
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
deny.toml
deny.toml
 
 
justfile
justfile
 
 
rust-toolchain.toml
rust-toolchain.toml
 
 

Repository files navigation

linkerd-await

A command-wrapper that polls Linkerd for readiness until it becomes ready and only then executes a command.

Usage

linkerd-await 0.3.1
Wait for linkerd to become ready before running a program

Usage: linkerd-await [OPTIONS] [CMD] [ARGS]...

Arguments:
  [CMD]      The command to run after linkerd is ready
  [ARGS]...  Arguments to pass to CMD if specified

Options:
  -p, --port <PORT>
          The port of the local Linkerd proxy admin server [default: 4191]
  -b, --backoff <BACKOFF>
          Time to wait after a failed readiness check [default: 1s]
  -S, --shutdown
          Forks the program and triggers proxy shutdown on completion
  -v, --verbose
          Causes linkerd-await to print an error message when disabled [env: LINKERD_AWAIT_VERBOSE=]
  -t, --timeout <TIMEOUT>
          Causes linkerd-await to fail when the timeout elapses before the proxy becomes ready
      --timeout-fatal[=<TIMEOUT_FATAL>]
          Controls whether a readiness timeout failure prevents CMD from running [default: true] [possible values: true, false]
  -h, --help
          Print help
  -V, --version
          Print version

Examples

Dockerfile

# Create a base layer with linkerd-await from a recent release.
FROM docker.io/curlimages/curl:latest as linkerd
ARG LINKERD_AWAIT_VERSION=v0.3.0
RUN curl -sSLo /tmp/linkerd-await https://github.com/linkerd/linkerd-await/releases/download/release%2F${LINKERD_AWAIT_VERSION}/linkerd-await-${LINKERD_AWAIT_VERSION}-amd64 && \
    chmod 755 /tmp/linkerd-await

# Build your application with whatever environment makes sense.
FROM myapp-build as app
WORKDIR /app
RUN make build

# Package the application wrapped by linkerd-await. Note that the binary is
# static so it can be used in `scratch` images:
FROM scratch
COPY --from=linkerd /tmp/linkerd-await /linkerd-await
COPY --from=app /app/myapp /myapp
# In this case, we configure the proxy to be shutdown after `myapp` completes
# running. This is only really needed for jobs where the application is
# expected to complete on its own (namely, `Jobs` and `Cronjobs`)
ENTRYPOINT ["/linkerd-await", "--shutdown", "--"]
CMD  ["/myapp"]

Disabling linkerd-await at runtime

The LINKERD_AWAIT_DISABLED (or LINKERD_DISABLED) environment variable can be set to bypass linkerd-await's readiness checks. This way, linkerd-await may be controlled by overriding a default environment variable:

    # ...
    spec:
      containers:
        - name: myapp
          env:
            - name: LINKERD_AWAIT_DISABLED
              value: "Linkerd is disabled ;("
          # ...

About

A program that blocks on linkerd readiness

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

78 stars

Watchers

6 watching

Forks

19 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.