native_deployment

package
v3.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VALID_DEPLOYMENT_FIELDS = map[string]int8{"image": 1, "privileged": 1, "cap_add": 1, "environment": 1, "devices": 1, "binds": 1, "specific_ports": 1, "command": 1, "ports": 1, "ephemeral_ports": 1, "tmpfs": 1}

This can't be a const because a map literal isn't a const in go

Functions

func CheckDeploymentService

func CheckDeploymentService(svcName string, depSvc map[string]interface{}) error

CheckDeploymentService verifies it has the required 'image' key, and checks for keys we don't recognize. For now it only prints a warning for unrecognized keys, in case we recently added a key to anax and haven't updated hzn yet.

func NewNativeDeploymentConfigPlugin

func NewNativeDeploymentConfigPlugin() plugin_registry.DeploymentConfigPlugin

func SignImagesFromDeploymentMap

func SignImagesFromDeploymentMap(deployment map[string]interface{}, dontTouchImage bool) (imageList []string)

SignImagesFromDeploymentMap finds the images in this deployment structure (if any) and appends them to the imageList

Types

type NativeDeploymentConfigPlugin

type NativeDeploymentConfigPlugin struct {
}

func (*NativeDeploymentConfigPlugin) DefaultConfig

func (p *NativeDeploymentConfigPlugin) DefaultConfig(imageInfo interface{}) interface{}

Given a map of image name and image pairs, the function returns a very simple deployment configuration to be used in the service definition.

func (*NativeDeploymentConfigPlugin) GetContainerImages

func (p *NativeDeploymentConfigPlugin) GetContainerImages(dep interface{}) (bool, []string, error)

func (*NativeDeploymentConfigPlugin) Sign

func (p *NativeDeploymentConfigPlugin) Sign(dep map[string]interface{}, keyFilePath string, ctx plugin_registry.PluginContext) (bool, string, string, error)

func (*NativeDeploymentConfigPlugin) StartTest

func (p *NativeDeploymentConfigPlugin) StartTest(homeDirectory string, userInputFile string, configFiles []string, configType string, noFSS bool, userCreds string) bool

Start the native deployment config in test mode. Only services are supported.

func (*NativeDeploymentConfigPlugin) StopTest

func (p *NativeDeploymentConfigPlugin) StopTest(homeDirectory string) bool

Stop the native deployment config in test mode. Only services are supported.

func (*NativeDeploymentConfigPlugin) Validate

func (p *NativeDeploymentConfigPlugin) Validate(dep interface{}) (bool, error)

Jump to

Keyboard shortcuts

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