config

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentConfig           = "config.yaml"
	InjectorConfigName    = "injector.yaml"
	LogConfig             = "logback.xml"
	BootConfig            = "bootstrap.properties"
	ConfigMountPath       = "/joylive/config"
	EmptyDirMountPath     = "/joylive"
	InitEmptyDirMountPath = "/agent"
	InitContainerCmd      = "/bin/sh"
	InitContainerArgs     = "-c, cp -r /joylive/* /agent && chmod -R 777 /agent"
	ConfigMapEnvName      = "JOYLIVE_CONFIGMAP_NAME"
	NamespaceEnvName      = "JOYLIVE_NAMESPACE"
	DefaultNamespace      = "joylive"
	AgentVersionLabel     = "x-live-version"
	LiveSpaceIdLabel      = "x-live-space-id"
	LiveUnitLabel         = "x-live-unit"
	LiveCellLabel         = "x-live-cell"
)

Variables

View Source
var (
	Cert               string
	Key                string
	Addr               string
	ConfigMountSubPath string
	MatchLabel         string
)
View Source
var (
	InitContainerName string
	// DefaultInjectorConfigMap store default injector configMap data
	DefaultInjectorConfigMap map[string]string
	// DefaultInjectorConfig define the default agent version information that can be injected into the application
	DefaultInjectorConfig *AgentInjectorConfig
	// InjectorConfigMaps key is configMap name, value is configMap data
	InjectorConfigMaps = map[string]map[string]string{}
	// InjectorAgentVersion store all versions of the agent and associated configuration information
	InjectorAgentVersion = map[string]v1.AgentVersionSpec{}
)

injection_deploy config

Functions

func GetNamespace

func GetNamespace() string

Types

type Agent

type Agent struct {
	Image   string            `yaml:"image"`
	Version string            `yaml:"version"`
	Env     map[string]string `json:"env"`
}

type AgentInjectorConfig

type AgentInjectorConfig struct {
	AgentConfig Agent `yaml:"agent"`
}

func GetAgentInjectConfig

func GetAgentInjectConfig(yamlData string) (*AgentInjectorConfig, error)

type AgentVersionWatcher

type AgentVersionWatcher struct {
	// contains filtered or unexported fields
}

func NewAgentVersionWatcher

func NewAgentVersionWatcher(client *rest.Config) *AgentVersionWatcher

func (*AgentVersionWatcher) InitAgentVersion

func (w *AgentVersionWatcher) InitAgentVersion(namespace string) error

func (*AgentVersionWatcher) Start

func (w *AgentVersionWatcher) Start() error

type ConfigMapWatcher

type ConfigMapWatcher struct {
	// contains filtered or unexported fields
}

func NewConfigMapWatcher

func NewConfigMapWatcher(kubeClient kubernetes.Interface) *ConfigMapWatcher

func (*ConfigMapWatcher) InitConfigMap

func (w *ConfigMapWatcher) InitConfigMap(namespace string) error

func (*ConfigMapWatcher) Start

func (w *ConfigMapWatcher) Start() error

Jump to

Keyboard shortcuts

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