slipway

command module
v0.0.0-...-1d507be Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

README

slipway

A slipway is a large platform that slopes down into the sea, from which boats are put into the water.

Slipway is a k8s operator which securely mirrors container images between registries. Users interact with the service by deploying k8s resources describing the containers which should be mirrored, and the operator observes changes to these resources and takes action.

tl;dr

cat << EOF > imagemirror.yaml
apiVersion: slipway.k8s.facebook.com/v1
kind: ImageMirror
metadata:
  name: centos
spec:
  sourceRepo: docker.io
  destRepo: dtr.thefacebook.com/dwat
  imageName: centos
  pattern: "semver: ~7"
EOF

kubectl apply -f imagemirror.yaml

Securely Mirroring Images

If no credentials are provided, slipway uses an anonymous identity when authenticating. In most environments this is insecure, and might result in a malicious image being mirrored and run. To prevent this is it possible to specify basic auth credentials on a per registry basis.

In addition to the fields specified above, there are two fields for this purpose, sourceSecretName and destSecretName. These names refer to Kubernetes Secrets within the same namespace as the ImageMirror resource, for example:

  sourceSecretName: docker-registry-creds
  destSecretName: dtr-registry-creds

To create these secrets, first obtain an access token from the registry. To do this for Docker Trusted Registry, you may:

Login to registry, and goto account settings

Goto the security tab

Click on "New Access Token"

Copy token and create a k8s Secret with it

kubectl create secret generic docker-registry-token \
  --from-literal=username='dwat'
  --from-literal=password=<REACTED>

Developer notes

Architecture

Slipway enforces an injection between k8s resources and image mirrors.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1
Package v1 contains API Schema definitions for the slipway.k8s.facebook.com v1 API group +kubebuilder:object:generate=true +groupName=slipway.k8s.facebook.com
Package v1 contains API Schema definitions for the slipway.k8s.facebook.com v1 API group +kubebuilder:object:generate=true +groupName=slipway.k8s.facebook.com
cmd
cli

Jump to

Keyboard shortcuts

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