Skip to content

Commit efb442a

Browse files
authored
Merge branch 'main' into dependabot/github_actions/sigstore/cosign-installer-3.10.0
2 parents 9444985 + b06b8d2 commit efb442a

68 files changed

Lines changed: 1331 additions & 817 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
# https://github.com/docker/metadata-action
111111
- name: Extract Docker metadata
112112
id: meta
113-
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # 5.7.0
113+
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # 5.8.0
114114
with:
115115
# Auto-discovery is based on docker image name.
116116
# That’s why the Redis docker image needs to be named exactly `redis`

.github/workflows/lint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ jobs:
2626
# Require: The version of golangci-lint to use.
2727
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
2828
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
29-
version: latest
29+
# Sync with the version in .pre-commit-config.yaml
30+
version: v1.64.8
3031

3132
# Optional: golangci-lint command line arguments.
3233
args: --timeout=10m

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
repos:
22
- repo: https://github.com/golangci/golangci-lint
3-
rev: v1.55.2
3+
# Sync with the version in .github/workflows/lint.yml
4+
rev: v1.64.8
45
hooks:
56
- id: golangci-lint
67
- repo: local

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ENV HELM_VERSION=3.12.3
99
ENV HELM_SHA=1b2313cd198d45eab00cc37c38f6b1ca0a948ba279c29e322bdf426d406129b5
1010
ARG CI_UPLOADER_SHA=873976f0f8de1073235cf558ea12c7b922b28e1be22dc1553bf56162beebf09d
1111
ARG CI_UPLOADER_VERSION=2.30.1
12-
ARG DDA_VERSION=v0.25.0
12+
ARG DDA_VERSION=v0.29.0
1313
ARG CODECOV_VERSION=0.6.1
1414
ARG CODECOV_SHA=0c9b79119b0d8dbe7aaf460dc3bd7c3094ceda06e5ae32b0d11a8ff56e2cc5c5
1515
# Skip Pulumi update warning https://www.pulumi.com/docs/cli/environment-variables/

common/config/environment.go

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const (
2929
DDInfraKubernetesVersion = "kubernetesVersion"
3030
DDInfraOSDescriptor = "osDescriptor" // osDescriptor is expected in the format: <osFamily>:<osVersion>:<osArch>, see components/os/descriptor.go
3131
DDInfraOSImageID = "osImageID"
32+
DDInfraOSImageIDUseLatest = "osImageIDUseLatest"
3233
DDInfraDeployFakeintakeWithLoadBalancer = "deployFakeintakeWithLoadBalancer"
3334
DDInfraExtraResourcesTags = "extraResourcesTags"
3435
DDInfraSSHUser = "sshUser"
@@ -56,6 +57,8 @@ const (
5657
DDAgentAPPKeyParamName = "appKey"
5758
DDAgentFakeintake = "fakeintake"
5859
DDAgentDualShipping = "dualshipping"
60+
DDAgentFakeintakeStoreType = "fakeintakeStoreType"
61+
DDAGentFakeintakeRetentionPeriod = "fakeintakeRetentionPeriod"
5962
DDAgentSite = "site"
6063
DDAgentMajorVersion = "majorVersion"
6164
DDAgentExtraEnvVars = "extraEnvVars" // extraEnvVars is expected in the format: <key1>=<value1>,<key2>=<value2>,...
@@ -68,7 +71,8 @@ const (
6871
DDUpdaterParamName = "deploy"
6972

7073
// Testing workload namerNamespace
71-
DDTestingWorkloadDeployParamName = "deploy"
74+
DDTestingWorkloadDeployParamName = "deploy"
75+
DDTestingWorkloadDeployArgoRollout = "deployArgoRollout"
7276

7377
// Dogstatsd namespace
7478
DDDogstatsdDeployParamName = "deploy"
@@ -106,7 +110,7 @@ type Env interface {
106110
KubernetesVersion() string
107111
DefaultResourceTags() map[string]string
108112
ExtraResourcesTags() map[string]string
109-
ResourcesTags() pulumi.StringMap
113+
ResourcesTags() pulumi.StringMapInput
110114
AgentExtraEnvVars() map[string]string
111115

112116
AgentDeploy() bool
@@ -212,6 +216,10 @@ func (e *CommonEnvironment) InfraOSImageID() string {
212216
return e.GetStringWithDefault(e.InfraConfig, DDInfraOSImageID, "")
213217
}
214218

219+
func (e *CommonEnvironment) InfraOSImageIDUseLatest() bool {
220+
return e.GetBoolWithDefault(e.InfraConfig, DDInfraOSImageIDUseLatest, false)
221+
}
222+
215223
func (e *CommonEnvironment) KubernetesVersion() string {
216224
return e.GetStringWithDefault(e.InfraConfig, DDInfraKubernetesVersion, "1.32")
217225
}
@@ -247,7 +255,7 @@ func EnvVariableResourceTags() map[string]string {
247255
return tags
248256
}
249257

250-
func (e *CommonEnvironment) ResourcesTags() pulumi.StringMap {
258+
func (e *CommonEnvironment) ResourcesTags() pulumi.StringMapInput {
251259
tags := pulumi.StringMap{}
252260

253261
// default tags
@@ -269,6 +277,10 @@ func (e *CommonEnvironment) AgentDeployWithOperator() bool {
269277
return e.GetBoolWithDefault(e.AgentConfig, DDAgentDeployWithOperatorParamName, false)
270278
}
271279

280+
func (e *CommonEnvironment) AgentDeployArgoRollout() bool {
281+
return e.GetBoolWithDefault(e.TestingWorkloadConfig, DDTestingWorkloadDeployArgoRollout, false)
282+
}
283+
272284
func (e *CommonEnvironment) AgentVersion() string {
273285
return e.AgentConfig.Get(DDAgentVersionParamName)
274286
}
@@ -341,6 +353,14 @@ func (e *CommonEnvironment) AgentUseDualShipping() bool {
341353
return e.GetBoolWithDefault(e.AgentConfig, DDAgentDualShipping, false)
342354
}
343355

356+
func (e *CommonEnvironment) AgentFakeintakeStoreType() string {
357+
return e.GetStringWithDefault(e.AgentConfig, DDAgentFakeintakeStoreType, "memory")
358+
}
359+
360+
func (e *CommonEnvironment) AgentFakeintakeRetentionPeriod() string {
361+
return e.AgentConfig.Get(DDAGentFakeintakeRetentionPeriod)
362+
}
363+
344364
func (e *CommonEnvironment) Site() string {
345365
return e.AgentConfig.Get(DDAgentSite)
346366
}

components/datadog/agent/kubernetes_helm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
)
2424

2525
const (
26-
HelmVersion = "3.120.2"
26+
HelmVersion = "3.135.4"
2727
)
2828

2929
// HelmInstallationArgs is the set of arguments for creating a new HelmInstallation component

components/datadog/agentparams/params.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ network_devices.netflow.forwarder.logs_dd_url: %[1]s:%[2]d
283283
network_devices.netflow.forwarder.logs_no_ssl: true
284284
network_path.forwarder.logs_dd_url: %[1]s:%[2]d
285285
network_path.forwarder.logs_no_ssl: true
286+
synthetics.forwarder.logs_dd_url: %[1]s:%[2]d
287+
synthetics.forwarder.logs_no_ssl: true
286288
container_lifecycle.logs_dd_url: %[1]s:%[2]d
287289
container_lifecycle.logs_no_ssl: true
288290
container_image.logs_dd_url: %[1]s:%[2]d
@@ -291,6 +293,8 @@ sbom.logs_dd_url: %[1]s:%[2]d
291293
sbom.logs_no_ssl: true
292294
service_discovery.forwarder.logs_dd_url: %[1]s:%[2]d
293295
service_discovery.forwarder.logs_no_ssl: true
296+
software_inventory.forwarder.logs_dd_url: %[1]s:%[2]d
297+
software_inventory.forwarder.logs_no_ssl: true
294298
`, hostname, port, scheme)
295299
p.ExtraAgentConfig = append(p.ExtraAgentConfig, extraConfig)
296300
return nil

components/datadog/apps/cpustress/k8s.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ func K8sAppDefinition(e config.Env, kubeProvider *kubernetes.Provider, namespace
6363
Args: pulumi.StringArray{
6464
pulumi.String("--cpu=1"),
6565
pulumi.String("--cpu-load=15"),
66+
pulumi.String("--temp-path=/tmp/"),
6667
},
68+
WorkingDir: pulumi.String("/tmp"),
6769
Resources: &corev1.ResourceRequirementsArgs{
6870
Limits: pulumi.StringMap{
6971
"cpu": pulumi.String("200m"),
@@ -74,6 +76,18 @@ func K8sAppDefinition(e config.Env, kubeProvider *kubernetes.Provider, namespace
7476
"memory": pulumi.String("64Mi"),
7577
},
7678
},
79+
VolumeMounts: corev1.VolumeMountArray{
80+
corev1.VolumeMountArgs{
81+
Name: pulumi.String("temp-dir"),
82+
MountPath: pulumi.String("/tmp"),
83+
},
84+
},
85+
},
86+
},
87+
Volumes: corev1.VolumeArray{
88+
corev1.VolumeArgs{
89+
Name: pulumi.String("temp-dir"),
90+
EmptyDir: &corev1.EmptyDirVolumeSourceArgs{},
7791
},
7892
},
7993
},

components/datadog/apps/cpustress/openshift.go

Lines changed: 0 additions & 102 deletions
This file was deleted.

components/datadog/apps/dogstatsd/k8s.go

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
appsv1 "github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/apps/v1"
1313
corev1 "github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/core/v1"
1414
metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/meta/v1"
15+
rbacv1 "github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/rbac/v1"
1516
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
1617
)
1718

@@ -36,6 +37,39 @@ func K8sAppDefinition(e config.Env, kubeProvider *kubernetes.Provider, namespace
3637

3738
opts = append(opts, utils.PulumiDependsOn(ns))
3839

40+
// openshift requires a non-default service account tighted to the privileged scc
41+
sa, err := corev1.NewServiceAccount(e.Ctx(), fmt.Sprintf("dogstatsd-uds-sa-%d", statsdPort), &corev1.ServiceAccountArgs{
42+
Metadata: &metav1.ObjectMetaArgs{
43+
Name: pulumi.StringPtr("dogstatsd-uds-sa"),
44+
Namespace: pulumi.StringPtr(namespace),
45+
},
46+
}, opts...)
47+
if err != nil {
48+
return nil, err
49+
}
50+
51+
// create a clusterRoleBinding to bind the new service account with the existing privileged scc
52+
if _, err := rbacv1.NewRoleBinding(e.Ctx(), fmt.Sprintf("dogstatsd-uds-scc-binding-%d", statsdPort), &rbacv1.RoleBindingArgs{
53+
Metadata: &metav1.ObjectMetaArgs{
54+
Name: pulumi.String("dogstatsd-scc-binding"),
55+
Namespace: pulumi.StringPtr(namespace),
56+
},
57+
RoleRef: &rbacv1.RoleRefArgs{
58+
ApiGroup: pulumi.String("rbac.authorization.k8s.io"),
59+
Kind: pulumi.String("ClusterRole"),
60+
Name: pulumi.String("system:openshift:scc:hostaccess"),
61+
},
62+
Subjects: rbacv1.SubjectArray{
63+
rbacv1.SubjectArgs{
64+
Kind: pulumi.String("ServiceAccount"),
65+
Name: sa.Metadata.Name().Elem(),
66+
Namespace: pulumi.String(namespace),
67+
},
68+
},
69+
}, opts...); err != nil {
70+
return nil, err
71+
}
72+
3973
if _, err := appsv1.NewDeployment(e.Ctx(), fmt.Sprintf("dogstatsd-uds-with-csi-%d", statsdPort), &appsv1.DeploymentArgs{
4074
Metadata: &metav1.ObjectMetaArgs{
4175
Name: pulumi.String("dogstatsd-uds-with-csi"),
@@ -60,6 +94,7 @@ func K8sAppDefinition(e config.Env, kubeProvider *kubernetes.Provider, namespace
6094
},
6195
},
6296
Spec: &corev1.PodSpecArgs{
97+
ServiceAccountName: sa.Metadata.Name().Elem(),
6398
Containers: corev1.ContainerArray{
6499
&corev1.ContainerArgs{
65100
Name: pulumi.String("dogstatsd"),
@@ -106,6 +141,7 @@ func K8sAppDefinition(e config.Env, kubeProvider *kubernetes.Provider, namespace
106141
},
107142
},
108143
Spec: &corev1.PodSpecArgs{
144+
ServiceAccountName: sa.Metadata.Name().Elem(),
109145
Containers: corev1.ContainerArray{
110146
&corev1.ContainerArgs{
111147
Name: pulumi.String("dogstatsd"),

0 commit comments

Comments
 (0)