resources

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SecretBaseName is the base name of the secret generated by the cli
	SecretBaseName = "dd-monitor-apikey-"
	// SecretLabel is the label used to identify the owner of the secret
	SecretLabel = "dev.local/dd-secret"
	// SubjectKey is the key for the subject in the secret
	SubjectKey = "Authentication__MonitorApiKey__Subject"
)

Variables

This section is empty.

Functions

func AddDebugContainerPodTemplate

func AddDebugContainerPodTemplate(template corev1.PodTemplateSpec, namespace, containerToDebug, debugimage, secretname string) (corev1.PodTemplateSpec, error)

AddDebugContainerPodTemplate adds debug sidecar to a PodTemplateSpec object

func GenerateSecret

func GenerateSecret(namespace, subject, key, owner string) corev1.Secret

GenerateSecret generates a kubernetes secret with a JWK public-key and subject

func RemoveDebugContainerPodTemplate

func RemoveDebugContainerPodTemplate(template corev1.PodTemplateSpec, namespace, containerToDebug string) (corev1.PodTemplateSpec, error)

RemoveDebugContainerPodTemplate removes debug sidecar from a PodTemplateSpec object

Types

type DDConfig

type DDConfig struct {
	// The name of the container to debug
	ContainerToDebug string `json:"containerToDebug"`
	// The name of the sidecar.
	DebugContainerName string `json:"debugContainerName"`
	// TmpdirAdded reflects if tmpdir was added by dd
	TmpdirAdded bool `json:"tmpdirAdded"`
	// SecretMount reflect name of created and mounted
	SecretName string `json:"secretMount"`
}

DDConfig represents the configuration applied for the debug sidecar

func DDConfigFromPodTemplate

func DDConfigFromPodTemplate(template corev1.PodTemplateSpec) (DDConfig, error)

DDConfigFromPodTemplate returns the DDConfig defined in PodTemplateSpec object

Jump to

Keyboard shortcuts

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