p8kr

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

README

p8kr

This repo is ripped from skopeo with the following key differences:

  • CLI re-written using Cobra/Viper
  • Completely unique config file: config.yaml
  • Many legacy features removed
  • Many features removed

With the intent of scoping the functionality to only the following:

  • Syncing images defined in Kubernetes manifests to Docker registries
  • Statically compiling (no external clibs)

Given the scope of p8kr, it's primary use case is transporting images across an air gap, where the images may come from existing registries, or defined through Kubernetes manifests.

Syncing

p8kr scopes the syncing capability around the concept of declaritively defined images. Images to sync can be defined via:

  • explicitly defined images in config.yaml under source.images[]
  • images parsed from kubernetes manifests defined in config.yaml under source.manifests[]

The intent of scoping syncing to only the above use cases is to scope p8kr to packaging images obtained from kubernetes manifests for transport.

p8kr provides 2 methods of syncing:

Pull

Pulling is intended to be the "packaging" step of p8kr. It is used to sync images defined through the p8kr config file (explicit images and kubernetes manifests) to a local transient registry. The local transient registry can then be zipped up and transferred over an air gap to later be synchronized using the p8kr push command.

Push

Pushing is intended to be the "unpackaging" step of p8kr. It is used to sync images packaged in a transient registry (from the p8kr pull step) to a generic registry.

Examples

The below walks through several example use cases, and assumes docker as a container runtime.

NOTE: Requires that p8kr is built, you can build p8kr for the current OS you're on with make build in the root directory of this project.

# Start local registry
docker run -p 5000:5000 -v `pwd`/registry:/var/lib/registry registry:latest

# Sync images defined in kubernetes manifests to a local transient registry
bin/p8kr pull

# Sync images defined in kubernetes manifests located in transient registry to remote registry
docker run -p 5001:5000 registry:latest
bin/p8kr push

Documentation

Overview

Copyright © 2020 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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