Documentation ¶
Index ¶
- Constants
- func JoinLines(lines string, addLinePrefix, addLineSuffix string) string
- func MutateLogsidecarPods(ar v1beta1.AdmissionReview) *v1beta1.AdmissionResponse
- func PatchYaml(yamlString, patchJsonString string) (string, error)
- func ReloadInjectorConfig(c *Config) error
- func ServeLogSidecarPods(w http.ResponseWriter, r *http.Request)
- type Config
- type ContainerConfig
- type ContainerLogConfig
- type ContainerLogConfigs
- type InjectorConfig
- type LogsidecarConfig
- type SidecarConfig
- type VolumeLogConfig
Constants ¶
View Source
const ( SidecarTypeFilebeat = "filebeat" SidecarTypeVector = "vector" SidecarContainerDefaultFilebeatImage = "elastic/filebeat:6.7.0" SidecarContainerDefaultVectorImage = "timberio/vector:0.34.1-distroless-static" SidecarInitContainerDefaultImage = "alpine:3.9" )
Variables ¶
This section is empty.
Functions ¶
func MutateLogsidecarPods ¶
func MutateLogsidecarPods(ar v1beta1.AdmissionReview) *v1beta1.AdmissionResponse
func ReloadInjectorConfig ¶
func ServeLogSidecarPods ¶
func ServeLogSidecarPods(w http.ResponseWriter, r *http.Request)
Types ¶
type Config ¶
type Config struct { CertFile string KeyFile string SidecarType string FilebeatConfigFile string SidecarConfigFile string VectorConfigFile string }
func (*Config) InjectorConfig ¶
func (c *Config) InjectorConfig() (*InjectorConfig, error)
type ContainerConfig ¶
type ContainerConfig struct { Image string `json:"image,omitempty" yaml:"image,omitempty"` ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty" yaml:"imagePullPolicy,omitempty"` Resources v1.ResourceRequirements `json:"resources" yaml:"resources"` }
type ContainerLogConfig ¶
type ContainerLogConfigs ¶
type ContainerLogConfigs map[string]VolumeLogConfig // key: containerName; value: VolumeLogConfig
type InjectorConfig ¶
type InjectorConfig struct { SidecarType string SidecarConfig SidecarConfig FilebeatConfigTemplate *template.Template VectorConfigTemplate *template.Template }
func GetInjectorConfig ¶
func GetInjectorConfig() *InjectorConfig
type LogsidecarConfig ¶
type LogsidecarConfig struct {
ContainerLogConfigs ContainerLogConfigs `json:"containerLogConfigs,omitempty"`
}
type SidecarConfig ¶
type SidecarConfig struct { InitContainer ContainerConfig `json:"initContainer" yaml:"initContainer"` FilebeatContainer ContainerConfig `json:"filebeatContainer,omitempty" yaml:"filebeatContainer,omitempty"` VectorContainer ContainerConfig `json:"vectorContainer,omitempty" yaml:"vectorContainer,omitempty"` }
type VolumeLogConfig ¶
Click to show internal directories.
Click to hide internal directories.