utils

package
v0.0.0-...-c4caace Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// NewPodAnnotationPrefix is the new autodiscovery prefix for pod annotations
	NewPodAnnotationPrefix = "ad.datadoghq.com/"
	// NewPodAnnotationFormat shows the prefix + identifier format for new autodiscovery annotations
	NewPodAnnotationFormat = NewPodAnnotationPrefix + "%s."
	// LegacyPodAnnotationPrefix is the legacy autodiscovery prefix for pod annotations
	LegacyPodAnnotationPrefix = "service-discovery.datadoghq.com/"
	// LegacyPodAnnotationFormat shows the prefix + identifier format for legacy autodiscovery annotations
	LegacyPodAnnotationFormat = LegacyPodAnnotationPrefix + "%s."
)

Variables

This section is empty.

Functions

func GetCustomCheckID

func GetCustomCheckID(annotations map[string]string, containerName string) (string, bool)

GetCustomCheckID returns whether there is a custom check ID for a given container based on the pod annotations

func ValidateAnnotationsMatching

func ValidateAnnotationsMatching(annotations map[string]string, containerIdentifiers map[string]struct{}, containerNames map[string]struct{}) []error

ValidateAnnotationsMatching detects if annotations using the new AD annotation format don't match a valid container identifier

Types

This section is empty.

Jump to

Keyboard shortcuts

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