pod2docker

package module
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2018 License: MIT Imports: 4 Imported by: 5

README

Pod-2-Docker Build Status

Simple utility which takes a Kubernetes Pod definition and generates a Bash script which emulates the Pods behavior on a VM using docker commands.

Testing

Docker is required.

Run ./ci.sh at the root directory. The tests will create and execute docker commands to validate pod behavior (Volumes, IPC and Network).

Supported Volumes

  • EmptyDir
  • HostDir

Supported Configuration

Note many features of pods aren't included. Currently the following settings are supported:

  • ImagePullCredentials
  • ImagePullPolicy
  • Volumes
  • VolumeMounts
  • Command
  • Args

See Unit and Integrations tests to understand more on usage.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBashCommand

func GetBashCommand(p PodComponents) (string, error)

GetBashCommand generates the bash script to execute the pod

Types

type ImageRegistryCredential

type ImageRegistryCredential struct {
	Server   string `json:"server,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

ImageRegistryCredential - Used to input a credential used by docker login

type PodComponents

type PodComponents struct {
	PullCredentials []ImageRegistryCredential
	InitContainers  []v1.Container
	Containers      []v1.Container
	Volumes         []v1.Volume
	PodName         string
}

PodComponents provides details to run a pod

Jump to

Keyboard shortcuts

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