bscp

package
v0.0.0-...-95388de Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SideCarPrefix prefix for bscp sidecar envs
	SideCarPrefix = "BSCP_BCSSIDECAR_"
	// SideCarCfgPath sidecar config path
	SideCarCfgPath = "BSCP_BCSSIDECAR_APPCFG_PATH"

	// SideCarMod sidecar labels for multiple apps
	SideCarMod = "BSCP_BCSSIDECAR_APPINFO_MOD"

	// SideCarBusiness sidecar business name for single app
	SideCarBusiness = "BSCP_BCSSIDECAR_APPINFO_BUSINESS"
	// SideCarApp sidecar app name for single app
	SideCarApp = "BSCP_BCSSIDECAR_APPINFO_APP"
	// SideCarCluster sidecar cluster name for single app
	SideCarCluster = "BSCP_BCSSIDECAR_APPINFO_CLUSTER"
	// SideCarZone sidecar zone name for single app
	SideCarZone = "BSCP_BCSSIDECAR_APPINFO_ZONE"
	// SideCarDc sidecar dc name for single app
	SideCarDc = "BSCP_BCSSIDECAR_APPINFO_DC"
	// SideCarVolumeName shared volume name for sidecar and business container
	SideCarVolumeName = "bscp-sidecar-cfg-shared"
	// AnnotationKey annotation key to enable sidecar injection
	AnnotationKey = "bkbscp.tencent.com/sidecar-injection"
	// AnnotationValue annotation value to enable sidecar injection
	AnnotationValue = "enabled"

	// PatchOperationAdd patch add operation
	PatchOperationAdd = "add"
	// PatchOperationReplace patch replace operation
	PatchOperationReplace = "replace"
	// PatchOperationRemove patch remove operation
	PatchOperationRemove = "remove"
	// PatchPathVolumes volumes path for patch operation
	PatchPathVolumes = "/spec/volumes/%v"
	// PatchPathContainers containers path for patch operation
	PatchPathContainers = "/spec/containers/%v"
)

Variables

This section is empty.

Functions

func AddPathIntoAppInfoMode

func AddPathIntoAppInfoMode(envValue string, path string) (string, error)

AddPathIntoAppInfoMode add config path into appMode env value

func ValidateEnvs

func ValidateEnvs(envMap map[string]string) bool

ValidateEnvs Validate env

Types

type AppModInfo

type AppModInfo struct {
	// BusinessName business name.
	BusinessName string `json:"business"`

	// AppName app name.
	AppName string `json:"app"`

	// ClusterName cluster name.
	ClusterName string `json:"cluster"`

	// ZoneName zone name.
	ZoneName string `json:"zone"`

	// DC datacenter tag.
	DC string `json:"dc"`

	// Labels sidecar instance KV labels.
	Labels map[string]string `json:"labels,omitempty"`

	// Path is sidecar mod app configs effect path.
	Path string `json:"path"`
}

AppModInfo is multi app mode information.

Jump to

Keyboard shortcuts

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