Giter Club home page Giter Club logo

image-cache-daemon's Introduction

image-cache-daemon

CI

Image Cache Daemon is a service to pre-pull / cache images on Kubernetes before they're needed

Synopsis

When it's desirable to run a container as fast as possible (such as when using Argo Workflows), image pull time can be a significant contributor to slow pod start times. The image cache daemon is a service that's intended to help mitigate that by discovering images to pull from a variety of sources, then pulling those images on each node before they're actually needed.

Installation

kubectl apply -f https://raw.githubusercontent.com/dcherman/image-cache-daemon/master/manifests/install.yaml -n image-cache-daemon
image-cache-daemon [flags]

Options

      --configmap-selector string               The selector to use when monitoring for ConfigMap sources (default "app.kubernetes.io/part-of=image-cache-daemon")
  -h, --help                                    help for image-cache-daemon
      --image stringArray                       Images that should be pre-fetched
      --node-name string                        The node name to pull to
      --pod-name string                         The pod name
      --pod-namespace string                    The namespace this pod is running in
      --pod-uid string                          The owning pod UID
      --resync-period duration                  How often the daemon should re-pull images from all of the sources.  Set to 0 to disable. (default 15m0s)
      --warden-image string                     The image that copies a binary to pulled containers to replace the entrypoint (default "exiges/image-cache-warden:latest")
      --watch-argo-cluster-workflow-templates   Whether or not to watch cluster workflow templates (default true)
      --watch-argo-cron-workflows               Whether or not to watch cron workflows (default true)
      --watch-argo-workflow-templates           Whether or not to watch workflow templates (default true)
      --watch-configmaps                        Whether or not to watch ConfigMaps for images to pull.  Must match the --config-map-selector (default true)

Sources

Static

If you have a known set of images that you want to pull, you can do so via providing the --image argument to the cache daemon. This argument may be provided multiple times.

./image-cache-daemon --image=alpine --image=debian

Argo Workflow Templates

Watch the cluster for Argo Workflow templates and cache images found in any of those templates. Enabled by default, can be controlled by passing --watch-argo-workflow-templates

Argo Workflow Cluster Workflow Templates

Watch the cluster for Argo Workflow cluster workflow templates and cache images found in any of those templates. Enabled by default, can be controlled by passing --watch-argo-cluster-workflow-templates

Argo Workflow CronJob Templates

Watch the cluster for Argo Workflow cron templates and cache images found in any of those templates. Enabled by default, can be controlled by passing --watch-argo-cron-workflows

ConfigMap

The ConfigMap source is useful when you want to separate the list of images that you're pulling from the installation of the cache daemon. It's also useful if you have a dynamic list of images to pull that aren't part of one of the other sources.

By default, all ConfigMaps that match the label selector "app.kubernetes.io/part-of=image-cache-daemon" will be considered as a source for the cache daemon in any namespace that it has privileges to read. If you would like to restrict the set of ConfigMaps that it reads, you can so do by changing the selector (--configmap-selector), or restricting the namespaces that the cache daemon can read via RBAC. Enabled by default, can be controlled by --watch-configmaps

Example Usage:

apiVersion: v1
kind: ConfigMap
metadata:
  name: my-image-configmap
  labels:
    app.kubernetes.io/part-of: image-cache-daemon
data:
  images: |
    ["alpine", "debian"]

image-cache-daemon's People

Contributors

amithins avatar dcherman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.