saffire

command module
v0.0.29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

README

A controller to override image sources in the event that an image cannot be pulled.

Want to learn more? Reach out on the Slack channel (request invite), send an email to opensource@fairwinds.com, or join us for office hours on Zoom

Built using kubebuilder

Alpha Software

At this time, saffire is currently in alpha. This means that we could change literally anything at any time without notice. Keep an eye out for major changes, and hopefully a v1 release at some point.

Why?

The image repository for docker images is a single point of failure for many clusters. As seen in the past with rate limiting on Docker Hub and several high-profile Quay.io outages, these images being unavailable can produce disastrous consequences for Kubernetes cluster operators.

The intent of saffire is to provide operators with a method of automatically switching image repositories when imagePullErrors occur.

How?

This works via controller and a CRD called an AlternateImageSource. The AlternateImageSource specifies a set of equivalentRepositories. These repositories must have the exact same image tags pushed to them. In order to achieve this, we recommend pushing images to both repositories from your CI pipeline. Here's an example AlternateImageSource

apiVersion: saffire.fairwinds.com/v1alpha1
kind: AlternateImageSource
metadata:
  name: alternateimagesource-sample
spec:
  imageSourceReplacements:
    - equivalentRepositories:
        - quay.io/fairwinds/docker-demo
        - ehazlett/docker-demo

This indicates that quay.io/fairwinds/docker-demo and ehazlett/docker-demo have the exact same image tags in both.

Once the controller and this AlternateImageSource are installed in your cluster, if any pod experiences an ImgagePullError in that namespace and the image matches one of these repositories, saffire will find the top level controller of that pod and patch it to set the image as one of the other repositories in the equivalentRepositories field (currently this only applies to deployments).

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the saffire v1alpha1 API group +kubebuilder:object:generate=true +groupName=saffire.fairwinds.com
Package v1alpha1 contains API Schema definitions for the saffire v1alpha1 API group +kubebuilder:object:generate=true +groupName=saffire.fairwinds.com

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL