Skip to content

Commit

Permalink
Merge branch 'main' into tbavelier/generic_crd_controller
Browse files Browse the repository at this point in the history
  • Loading branch information
tbavelier authored Dec 31, 2024
2 parents 1f9164f + 0ca2c91 commit 53fa6d2
Show file tree
Hide file tree
Showing 197 changed files with 5,532 additions and 2,904 deletions.
28 changes: 26 additions & 2 deletions LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,25 @@ core,github.com/DataDog/viper,MIT
core,github.com/DataDog/zstd,BSD-3-Clause
core,github.com/Masterminds/semver,MIT
core,github.com/Masterminds/semver/v3,MIT
core,github.com/antlr4-go/antlr/v4,BSD-3-Clause
core,github.com/asaskevich/govalidator,MIT
core,github.com/benbjohnson/clock,MIT
core,github.com/beorn7/perks/quantile,MIT
core,github.com/blang/semver/v4,MIT
core,github.com/cenkalti/backoff,MIT
core,github.com/cenkalti/backoff/v4,MIT
core,github.com/cespare/xxhash/v2,MIT
core,github.com/cihub/seelog,BSD-3-Clause
core,github.com/davecgh/go-spew/spew,ISC
core,github.com/dustin/go-humanize,MIT
core,github.com/ebitengine/purego,Apache-2.0
core,github.com/emicklei/go-restful/v3,MIT
core,github.com/evanphx/json-patch/v5,BSD-3-Clause
core,github.com/felixge/httpsnoop,MIT
core,github.com/fsnotify/fsnotify,BSD-3-Clause
core,github.com/fxamacker/cbor/v2,MIT
core,github.com/go-logr/logr,Apache-2.0
core,github.com/go-logr/stdr,Apache-2.0
core,github.com/go-logr/zapr,Apache-2.0
core,github.com/go-openapi/jsonpointer,Apache-2.0
core,github.com/go-openapi/jsonreference,Apache-2.0
Expand All @@ -46,13 +52,15 @@ core,github.com/gobwas/glob,MIT
core,github.com/gogo/protobuf,BSD-3-Clause
core,github.com/golang/groupcache/lru,Apache-2.0
core,github.com/golang/protobuf,BSD-3-Clause
core,github.com/google/cel-go,Apache-2.0
core,github.com/google/gnostic-models,Apache-2.0
core,github.com/google/go-cmp/cmp,BSD-3-Clause
core,github.com/google/gofuzz,Apache-2.0
core,github.com/google/pprof/profile,Apache-2.0
core,github.com/google/uuid,BSD-3-Clause
core,github.com/grpc-ecosystem/go-grpc-middleware,Apache-2.0
core,github.com/grpc-ecosystem/grpc-gateway,BSD-3-Clause
core,github.com/grpc-ecosystem/grpc-gateway/v2,BSD-3-Clause
core,github.com/hashicorp/hcl,MPL-2.0
core,github.com/imdario/mergo,BSD-3-Clause
core,github.com/josharian/intern,MIT
Expand Down Expand Up @@ -83,29 +91,40 @@ core,github.com/shirou/gopsutil/v3,BSD-3-Clause
core,github.com/spaolacci/murmur3,BSD-3-Clause
core,github.com/spf13/afero,Apache-2.0
core,github.com/spf13/cast,MIT
core,github.com/spf13/cobra,Apache-2.0
core,github.com/spf13/jwalterweatherman,MIT
core,github.com/spf13/pflag,BSD-3-Clause
core,github.com/stoewer/go-strcase,MIT
core,github.com/stretchr/objx,MIT
core,github.com/stretchr/testify,MIT
core,github.com/tinylib/msgp/msgp,MIT
core,github.com/x448/float16,MIT
core,github.com/zorkian/go-datadog-api,BSD-3-Clause
core,go.etcd.io/bbolt,MIT
core,go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp,Apache-2.0
core,go.opentelemetry.io/otel,Apache-2.0
core,go.opentelemetry.io/otel/exporters/otlp/otlptrace,Apache-2.0
core,go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc,Apache-2.0
core,go.opentelemetry.io/otel/metric,Apache-2.0
core,go.opentelemetry.io/otel/sdk,Apache-2.0
core,go.opentelemetry.io/otel/trace,Apache-2.0
core,go.opentelemetry.io/proto/otlp,Apache-2.0
core,go.uber.org/atomic,MIT
core,go.uber.org/multierr,MIT
core,go.uber.org/zap,MIT
core,golang.org/x/exp,BSD-3-Clause
core,golang.org/x/mod/semver,BSD-3-Clause
core,golang.org/x/net,BSD-3-Clause
core,golang.org/x/oauth2,BSD-3-Clause
core,golang.org/x/sync/singleflight,BSD-3-Clause
core,golang.org/x/sys/unix,BSD-3-Clause
core,golang.org/x/term,BSD-3-Clause
core,golang.org/x/text,BSD-3-Clause
core,golang.org/x/time/rate,BSD-3-Clause
core,golang.org/x/xerrors,BSD-3-Clause
core,gomodules.xyz/jsonpatch/v2,Apache-2.0
core,google.golang.org/genproto/googleapis/api,Apache-2.0
core,google.golang.org/genproto/googleapis/rpc/status,Apache-2.0
core,google.golang.org/genproto/googleapis/rpc,Apache-2.0
core,google.golang.org/genproto/protobuf/field_mask,Apache-2.0
core,google.golang.org/grpc,Apache-2.0
core,google.golang.org/protobuf,BSD-3-Clause
Expand All @@ -117,14 +136,19 @@ core,k8s.io/api,Apache-2.0
core,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions,Apache-2.0
core,k8s.io/apimachinery/pkg,Apache-2.0
core,k8s.io/apimachinery/third_party/forked/golang,BSD-3-Clause
core,k8s.io/apiserver,Apache-2.0
core,k8s.io/client-go,Apache-2.0
core,k8s.io/component-base,Apache-2.0
core,k8s.io/klog/v2,Apache-2.0
core,k8s.io/kube-aggregator/pkg/apis/apiregistration,Apache-2.0
core,k8s.io/kube-openapi/pkg,Apache-2.0
core,k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json,BSD-3-Clause
core,k8s.io/kube-openapi/pkg/validation/errors,Apache-2.0
core,k8s.io/kube-openapi/pkg/validation/spec,Apache-2.0
core,k8s.io/kube-openapi/pkg/validation/strfmt,Apache-2.0
core,k8s.io/utils,Apache-2.0
core,k8s.io/utils/internal/third_party/forked/golang/net,BSD-3-Clause
core,k8s.io/utils/internal/third_party/forked/golang,BSD-3-Clause
core,sigs.k8s.io/apiserver-network-proxy/konnectivity-client,Apache-2.0
core,sigs.k8s.io/controller-runtime,Apache-2.0
core,sigs.k8s.io/json,Apache-2.0
core,sigs.k8s.io/structured-merge-diff/v4,Apache-2.0
Expand Down
138 changes: 2 additions & 136 deletions api/datadoghq/common/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,146 +5,12 @@

package common

// TODO move most of these constants out of common

// This file tracks constants related to setting up the Datadog Agents
// This file tracks common constants used across API versions

// // Labels
const (
// AgentDeploymentNameLabelKey label key use to link a Resource to a DatadogAgent
AgentDeploymentNameLabelKey = "agent.datadoghq.com/name"
// AgentDeploymentComponentLabelKey label key use to know with component is it
AgentDeploymentComponentLabelKey = "agent.datadoghq.com/component"
// MD5AgentDeploymentProviderLabelKey label key is used to identify which provider is being used
MD5AgentDeploymentProviderLabelKey = "agent.datadoghq.com/provider"
// MD5AgentDeploymentAnnotationKey annotation key used on a Resource in order to identify which AgentDeployment have been used to generate it.
MD5AgentDeploymentAnnotationKey = "agent.datadoghq.com/agentspechash"
// MD5ChecksumAnnotationKey annotation key is used to identify customConfig configurations
MD5ChecksumAnnotationKey = "checksum/%s-custom-config"
)

// Annotations
const (
SystemProbeAppArmorAnnotationKey = "container.apparmor.security.beta.kubernetes.io/system-probe"
SystemProbeAppArmorAnnotationValue = "unconfined"

AgentAppArmorAnnotationKey = "container.apparmor.security.beta.kubernetes.io/agent"
AgentAppArmorAnnotationValue = "unconfined"
)

// Datadog volume names and mount paths
const (
ConfdVolumeName = "confd"
ConfdVolumePath = "/conf.d"
ConfigVolumeName = "config"
ConfigVolumePath = "/etc/datadog-agent"
ChecksdVolumeName = "checksd"
ChecksdVolumePath = "/checks.d"

HostRootVolumeName = "hostroot"
HostRootHostPath = "/"
HostRootMountPath = "/host/root"

GroupVolumeName = "group"
GroupHostPath = "/etc/group"
GroupMountPath = "/etc/group"

PasswdVolumeName = "passwd"
PasswdHostPath = "/etc/passwd"
PasswdMountPath = "/etc/passwd"

ProcdirVolumeName = "procdir"
ProcdirHostPath = "/proc"
ProcdirMountPath = "/host/proc"

CgroupsVolumeName = "cgroups"
CgroupsHostPath = "/sys/fs/cgroup"
CgroupsMountPath = "/host/sys/fs/cgroup"

SystemProbeOSReleaseDirVolumeName = "host-osrelease"
SystemProbeOSReleaseDirVolumePath = "/etc/os-release"
SystemProbeOSReleaseDirMountPath = "/host/etc/os-release"

SystemProbeSocketVolumeName = "sysprobe-socket-dir"
SystemProbeSocketVolumePath = "/var/run/sysprobe"

DebugfsVolumeName = "debugfs"
// same path on host and container
DebugfsPath = "/sys/kernel/debug"

ModulesVolumeName = "modules"
// same path on host and container
ModulesVolumePath = "/lib/modules"

SrcVolumeName = "src"
// same path on host and container
SrcVolumePath = "/usr/src"

AgentCustomConfigVolumePath = "/etc/datadog-agent/datadog.yaml"
SystemProbeConfigVolumePath = "/etc/datadog-agent/system-probe.yaml"
OtelCustomConfigVolumePath = "/etc/datadog-agent/otel-config.yaml"

LogDatadogVolumeName = "logdatadog"
LogDatadogVolumePath = "/var/log/datadog"
DefaultLogTempStoragePath = "/var/lib/datadog-agent/logs"
TmpVolumeName = "tmp"
TmpVolumePath = "/tmp"
CertificatesVolumeName = "certificates"
CertificatesVolumePath = "/etc/datadog-agent/certificates"
AuthVolumeName = "datadog-agent-auth"
AuthVolumePath = "/etc/datadog-agent/auth"
InstallInfoVolumeName = "installinfo"
InstallInfoVolumeSubPath = "install_info"
InstallInfoVolumePath = "/etc/datadog-agent/install_info"
InstallInfoVolumeReadOnly = true

DogstatsdHostPortName = "dogstatsdport"
DogstatsdHostPortHostPort = 8125
DogstatsdSocketVolumeName = "dsdsocket"
DogstatsdAPMSocketHostPath = "/var/run/datadog"
DogstatsdSocketLocalPath = "/var/run/datadog"
DogstatsdSocketName = "dsd.socket"

HostCriSocketPathPrefix = "/host"
CriSocketVolumeName = "runtimesocketdir"
RuntimeDirVolumePath = "/var/run"

KubeletAgentCAPath = "/var/run/host-kubelet-ca.crt"
KubeletCAVolumeName = "kubelet-ca"

APMSocketName = "apm.socket"

ExternalMetricsAPIServiceName = "v1beta1.external.metrics.k8s.io"

SeccompSecurityVolumeName = "datadog-agent-security"
SeccompSecurityVolumePath = "/etc/config"
SeccompRootVolumeName = "seccomp-root"
SeccompRootVolumePath = "/host/var/lib/kubelet/seccomp"
SeccompRootPath = "/var/lib/kubelet/seccomp"
SystemProbeSeccompKey = "system-probe-seccomp.json"
SystemProbeAgentSecurityConfigMapSuffixName = "system-probe-seccomp"
SystemProbeSeccompProfileName = "system-probe"

AppArmorAnnotationKey = "container.apparmor.security.beta.kubernetes.io"

AgentCustomConfigVolumeName = "custom-datadog-yaml"
ClusterAgentCustomConfigVolumeName = "custom-cluster-agent-yaml"

FIPSProxyCustomConfigVolumeName = "fips-proxy-cfg"
FIPSProxyCustomConfigFileName = "datadog-fips-proxy.cfg"
FIPSProxyCustomConfigMapName = "%s-fips-config"
FIPSProxyCustomConfigMountPath = "/etc/datadog-fips-proxy/datadog-fips-proxy.cfg"
)

const (
// FieldPathSpecNodeName used as FieldPath for selecting the NodeName
FieldPathSpecNodeName = "spec.nodeName"

// FieldPathStatusHostIP used as FieldPath to retrieve the host ip
FieldPathStatusHostIP = "status.hostIP"

// FieldPathStatusPodIP used as FieldPath to retrieve the pod ip
FieldPathStatusPodIP = "status.podIP"

// FieldPathMetaName used as FieldPath to retrieve the pod name
FieldPathMetaName = "metadata.name"
)
Loading

0 comments on commit 53fa6d2

Please sign in to comment.