cd

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConfigEnvKey is environment variable key for config
	ConfigEnvKey = "_CONFIG_"
	// DeploymentTypeDeployment indicate deployment type 'deployment'
	DeploymentTypeDeployment = "deployment"
)

Variables

This section is empty.

Functions

func UpdateDeployment

func UpdateDeployment(client kubernetes.Interface, config *Config) error

UpdateDeployment updates images in a deployment.

Types

type ClusterInfo

type ClusterInfo struct {
	Host     string `json:"host"`
	User     string `json:"user"`
	Password string `json:"password"`
}

ClusterInfo describes cluster information.

type Config

type Config struct {
	Cluster    *ClusterInfo    `json:"cluster"`
	Deployment *DeploymentInfo `json:"deployment"`
	Images     []*ImageInfo    `json:"images"`
}

Config configures for a CD stage

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads CD configs from environment variable.

type DeploymentInfo

type DeploymentInfo struct {
	Namespace string `json:"namespace"`
	Type      string `json:"type"`
	Name      string `json:"name"`
}

DeploymentInfo describes deployment information, for the moment, only 'deployment' type supported.

type ImageInfo

type ImageInfo struct {
	Container string `json:"container"`
	Image     string `json:"image"`
}

ImageInfo describes which image to update

Jump to

Keyboard shortcuts

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