Skip to content

Commit bffbe49

Browse files
authored
Merge branch 'main' into swang392/e2e-ci
2 parents 8fff4b7 + 0283be3 commit bffbe49

Some content is hidden

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

45 files changed

+2550
-619
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ jobs:
3434
- uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
3535
with:
3636
token: ${{ secrets.CODECOV_TOKEN }}
37-
files: cover.out,cover_integration_v1.out,cover_integration_v2.out
37+
files: cover.out,cover_integration.out
3838
flags: unittests

.gitlab-ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ stages:
2929
- image
3030
- e2e
3131
- release
32+
- release-latest
3233
- post-release
3334
- deploy
3435

@@ -333,7 +334,7 @@ publish_redhat_public_tag_fips:
333334
IMG_DESTINATIONS: $RH_PARTNER_PROJECT_ID:$CI_COMMIT_TAG-fips
334335

335336
publish_public_latest:
336-
stage: release
337+
stage: release-latest
337338
rules:
338339
- if: $CI_COMMIT_TAG
339340
when: manual
@@ -355,7 +356,7 @@ publish_public_latest_fips:
355356
IMG_DESTINATIONS: operator:latest-fips
356357

357358
publish_redhat_public_latest:
358-
stage: release
359+
stage: release-latest
359360
rules:
360361
- if: $CI_COMMIT_TAG
361362
when: manual
@@ -548,6 +549,7 @@ check_preflight_redhat_image:
548549
# Preflight now supports multiarch image checks
549550
submit_preflight_redhat_image:
550551
stage: post-release
552+
allow_failure: true
551553
rules:
552554
- if: $CI_COMMIT_TAG
553555
when: manual
@@ -569,8 +571,10 @@ publish_community_operators:
569571
- if: $CI_COMMIT_TAG
570572
when: manual
571573
- when: never
572-
needs:
573-
- "submit_preflight_redhat_image"
574+
# Allow the job to be run manually even if submit_preflight_redhat_image fails, so that
575+
# preflight submission can be retried locally followed by this manual job trigger in the pipeline
576+
# needs:
577+
# - "submit_preflight_redhat_image"
574578
tags: [ "runner:docker", "size:large" ]
575579
image: $JOB_DOCKER_IMAGE
576580
before_script:

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ RUN if [ "$FIPS_ENABLED" = "true" ]; then \
4545

4646
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} GO111MODULE=on go build -a -ldflags "${LDFLAGS}" -o helpers cmd/helpers/main.go
4747

48-
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
48+
FROM registry.access.redhat.com/ubi9/ubi-micro:latest
4949

5050
LABEL name="datadog/operator"
5151
LABEL vendor="Datadog Inc."
@@ -62,9 +62,8 @@ COPY --from=builder /workspace/helpers .
6262
COPY scripts/readsecret.sh .
6363
RUN chmod 550 readsecret.sh && chmod 550 helpers
6464

65-
RUN mkdir -p /licences
6665
COPY ./LICENSE ./LICENSE-3rdparty.csv /licenses/
67-
RUN chmod -R 755 /licences
66+
RUN chmod -R 755 /licenses
6867

6968
USER 1001
7069

Makefile

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ SHELL = /usr/bin/env bash -o pipefail
88
# Datadog custom variables
99
#
1010
BUILDINFOPKG=github.com/DataDog/datadog-operator/pkg/version
11-
GIT_TAG?=$(shell git tag -l --contains HEAD | tail -1)
12-
TAG_HASH=$(shell git tag | tail -1)_$(shell git rev-parse --short HEAD)
11+
GIT_TAG?=$(shell git tag | tr - \~ | sort -V | tr \~ - | tail -1)
12+
TAG_HASH=$(shell git tag | tr - \~ | sort -V | tr \~ - | tail -1)_$(shell git rev-parse --short HEAD)
1313
IMG_VERSION?=$(if $(VERSION),$(VERSION),latest)
1414
VERSION?=$(if $(GIT_TAG),$(GIT_TAG),$(TAG_HASH))
1515
GIT_COMMIT?=$(shell git rev-parse HEAD)
@@ -51,7 +51,7 @@ IMG ?= gcr.io/datadoghq/operator:$(IMG_VERSION)
5151
IMG_CHECK ?= gcr.io/datadoghq/operator-check:latest
5252

5353
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
54-
ENVTEST_K8S_VERSION = 1.24
54+
ENVTEST_K8S_VERSION = 1.30
5555

5656
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
5757
ifeq (,$(shell go env GOBIN))
@@ -191,19 +191,15 @@ docker-push-check-img:
191191
##@ Test
192192

193193
.PHONY: test
194-
test: build manifests generate fmt vet verify-licenses gotest integration-tests integration-tests-v2 ## Run unit tests and integration tests
194+
test: build manifests generate fmt vet verify-licenses gotest integration-tests ## Run unit tests and integration tests
195195

196196
.PHONY: gotest
197197
gotest:
198198
go test ./... -coverprofile cover.out
199199

200200
.PHONY: integration-tests
201-
integration-tests: $(ENVTEST) ## Run tests.
202-
KUBEBUILDER_ASSETS="$(ROOT)/bin/$(PLATFORM)/" go test --tags=integration github.com/DataDog/datadog-operator/internal/controller -coverprofile cover_integration_v1.out
203-
204-
.PHONY: integration-tests-v2
205-
integration-tests-v2: $(ENVTEST) ## Run tests with reconciler V2
206-
KUBEBUILDER_ASSETS="$(ROOT)/bin/$(PLATFORM)/" go test --tags=integration_v2 github.com/DataDog/datadog-operator/internal/controller -coverprofile cover_integration_v2.out
201+
integration-tests: $(ENVTEST) ## Run integration tests with reconciler
202+
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(ROOT)/bin/$(PLATFORM) -p path)" go test --tags=integration github.com/DataDog/datadog-operator/internal/controller -coverprofile cover_integration.out
207203

208204
.PHONY: e2e-tests
209205
e2e-tests: ## Run E2E tests and destroy environment stacks after tests complete. To run locally, complete pre-reqs (see docs/how-to-contribute.md) and prepend command with `aws-vault exec sso-agent-sandbox-account-admin --`. E.g. `aws-vault exec sso-agent-sandbox-account-admin -- make e2e-tests`.
@@ -358,7 +354,7 @@ bin/$(PLATFORM)/operator-manifest-tools: Makefile
358354
hack/install-operator-manifest-tools.sh 0.6.0
359355

360356
bin/$(PLATFORM)/preflight: Makefile
361-
hack/install-openshift-preflight.sh 1.11.1
357+
hack/install-openshift-preflight.sh latest
362358

363359
bin/$(PLATFORM)/openapi-gen:
364360
mkdir -p $(ROOT)/bin/$(PLATFORM)

api/datadoghq/v2alpha1/datadogagent_types.go

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,20 @@ type ServiceDiscoveryFeatureConfig struct {
571571
// Default: false
572572
// +optional
573573
Enabled *bool `json:"enabled,omitempty"`
574+
575+
// Enables the service discovery network stats collection.
576+
// Default: true
577+
// +optional
578+
NetworkStats *ServiceDiscoveryNetworkStatsConfig `json:"networkStats,omitempty"`
579+
}
580+
581+
// ServiceDiscoveryNetworkStatsConfig configures Service Discovery's network stats
582+
// collection feature.
583+
type ServiceDiscoveryNetworkStatsConfig struct {
584+
// Enables the Service Discovery Network Stats feature.
585+
// Default: true
586+
// +optional
587+
Enabled *bool `json:"enabled,omitempty"`
574588
}
575589

576590
// GPUFeatureConfig contains the GPU monitoring configuration.
@@ -1209,25 +1223,26 @@ type OriginDetectionUnified struct {
12091223
// +kubebuilder:object:generate=true
12101224
type AgentImageConfig struct {
12111225
// Defines the Agent image name for the pod. You can provide this as:
1212-
// * <NAME> - use agent for the Datadog Agent, cluster-agent for the Datadog Cluster Agent, or dogstatsd for DogStatsD.
1213-
// The full image string is derived from global.registry, [key].image.tag, and [key].image.jmxEnabled.
1214-
// * <NAME>:<TAG> - For example, agent:latest. The registry is derived from global.registry. [key].image.tag and [key].image.jmxEnabled are ignored.
1215-
// * <REGISTRY>/<NAME>:<TAG> - For example, gcr.io/datadoghq/agent:latest. If the full image string is specified
1216-
// like this, then global.registry, [key].image.tag, and [key].image.jmxEnabled are ignored.
1226+
// * `<NAME>` - Use `agent` for the Datadog Agent, `cluster-agent` for the Datadog Cluster Agent, or `dogstatsd`
1227+
// for DogStatsD. The full image string is derived from `global.registry`, `[key].image.tag`, and `[key].image.jmxEnabled`.
1228+
// * `<NAME>:<TAG>` - For example, `agent:latest`. The registry is derived from `global.registry`. `[key].image.tag`
1229+
// and `[key].image.jmxEnabled` are ignored.
1230+
// * `<REGISTRY>/<NAME>:<TAG>` - For example, `gcr.io/datadoghq/agent:latest`. If the full image string is specified
1231+
// like this, then `global.registry`, `[key].image.tag`, and `[key].image.jmxEnabled` are ignored.
12171232
Name string `json:"name,omitempty"`
12181233

12191234
// Define the image tag to use.
1220-
// To be used if the Name field does not correspond to a full image string.
1235+
// To be used if the `Name` field does not correspond to a full image string.
12211236
// +optional
12221237
Tag string `json:"tag,omitempty"`
12231238

12241239
// Define whether the Agent image should support JMX.
1225-
// To be used if the Name field does not correspond to a full image string.
1240+
// To be used if the `Name` field does not correspond to a full image string.
12261241
// +optional
12271242
JMXEnabled bool `json:"jmxEnabled,omitempty"`
12281243

12291244
// The Kubernetes pull policy:
1230-
// Use Always, Never, or IfNotPresent.
1245+
// Use `Always`, `Never`, or `IfNotPresent`.
12311246
PullPolicy *corev1.PullPolicy `json:"pullPolicy,omitempty"`
12321247

12331248
// It is possible to specify Docker registry credentials.

api/datadoghq/v2alpha1/zz_generated.deepcopy.go

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundle/manifests/datadog-operator.clusterserviceversion.yaml

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,12 @@ metadata:
194194
]
195195
capabilities: Full Lifecycle
196196
categories: Monitoring, Logging & Tracing
197-
createdAt: "2025-02-11 18:13:00"
197+
createdAt: "2025-03-17 18:00:52"
198198
description: Datadog provides a modern monitoring and analytics platform. Gather metrics, logs and traces for full observability of your Kubernetes cluster with Datadog Operator.
199199
operators.operatorframework.io/builder: operator-sdk-v1.34.1
200200
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
201201
repository: https://github.com/DataDog/datadog-operator
202-
containerImage: gcr.io/datadoghq/operator:1.12.1
202+
containerImage: gcr.io/datadoghq/operator:1.13.0
203203
support: Datadog, Inc.
204204
features.operators.openshift.io/disconnected: "true"
205205
features.operators.openshift.io/fips-compliant: "false"
@@ -208,12 +208,12 @@ metadata:
208208
features.operators.openshift.io/token-auth-aws: "false"
209209
features.operators.openshift.io/token-auth-azure: "false"
210210
features.operators.openshift.io/token-auth-gcp: "false"
211-
olm.skipRange: '>=1.7.0 <1.12.1'
211+
olm.skipRange: '>=1.7.0 <1.13.0'
212212
labels:
213213
operatorframework.io/arch.amd64: supported
214214
operatorframework.io/arch.arm64: supported
215215
operatorframework.io/os.linux: supported
216-
name: datadog-operator.v1.12.1
216+
name: datadog-operator.v1.13.0
217217
namespace: placeholder
218218
spec:
219219
apiservicedefinitions: {}
@@ -252,6 +252,11 @@ spec:
252252
kind: DatadogPodAutoscaler
253253
name: datadogpodautoscalers.datadoghq.com
254254
version: v1alpha1
255+
- description: DatadogPodAutoscaler is the Schema for the datadogpodautoscalers API
256+
displayName: Datadog Pod Autoscaler
257+
kind: DatadogPodAutoscaler
258+
name: datadogpodautoscalers.datadoghq.com
259+
version: v1alpha2
255260
- description: DatadogSLO allows a user to define and manage datadog SLOs from Kubernetes cluster.
256261
displayName: Datadog SLO
257262
kind: DatadogSLO
@@ -276,7 +281,12 @@ spec:
276281
resources:
277282
- componentstatuses
278283
- deployments
284+
- limitranges
279285
- namespaces
286+
- persistentvolumeclaims
287+
- persistentvolumes
288+
- replicationcontrollers
289+
- resourcequotas
280290
verbs:
281291
- get
282292
- list
@@ -299,17 +309,6 @@ spec:
299309
- patch
300310
- update
301311
- watch
302-
- apiGroups:
303-
- ""
304-
resources:
305-
- limitranges
306-
- persistentvolumeclaims
307-
- persistentvolumes
308-
- replicationcontrollers
309-
- resourcequotas
310-
verbs:
311-
- list
312-
- watch
313312
- apiGroups:
314313
- ""
315314
resources:
@@ -328,6 +327,12 @@ spec:
328327
- nodes/stats
329328
verbs:
330329
- get
330+
- apiGroups:
331+
- ""
332+
resources:
333+
- pods/exec
334+
verbs:
335+
- create
331336
- apiGroups:
332337
- '*'
333338
resources:
@@ -404,12 +409,8 @@ spec:
404409
verbs:
405410
- create
406411
- get
407-
- apiGroups:
408-
- authorization.k8s.io
409-
resources:
410-
- pods/exec
411-
verbs:
412-
- create
412+
- list
413+
- watch
413414
- apiGroups:
414415
- authorization.k8s.io
415416
resources:
@@ -462,6 +463,7 @@ spec:
462463
resources:
463464
- certificatesigningrequests
464465
verbs:
466+
- get
465467
- list
466468
- watch
467469
- apiGroups:
@@ -538,6 +540,7 @@ spec:
538540
verbs:
539541
- create
540542
- delete
543+
- get
541544
- list
542545
- watch
543546
- apiGroups:
@@ -551,11 +554,6 @@ spec:
551554
- datadoghq.com
552555
resources:
553556
- extendeddaemonsetreplicasets
554-
verbs:
555-
- get
556-
- apiGroups:
557-
- datadoghq.com
558-
resources:
559557
- watermarkpodautoscalers
560558
verbs:
561559
- get
@@ -569,6 +567,13 @@ spec:
569567
- get
570568
- list
571569
- watch
570+
- apiGroups:
571+
- metrics.eks.amazonaws.com
572+
resources:
573+
- kcm/metrics
574+
- ksh/metrics
575+
verbs:
576+
- get
572577
- apiGroups:
573578
- networking.k8s.io
574579
resources:
@@ -621,6 +626,7 @@ spec:
621626
- storageclasses
622627
- volumeattachments
623628
verbs:
629+
- get
624630
- list
625631
- watch
626632
serviceAccountName: datadog-operator-controller-manager
@@ -678,7 +684,7 @@ spec:
678684
fieldPath: metadata.annotations['olm.targetNamespaces']
679685
- name: DD_TOOL_VERSION
680686
value: redhat
681-
image: gcr.io/datadoghq/operator:1.12.1
687+
image: gcr.io/datadoghq/operator:1.13.0
682688
imagePullPolicy: IfNotPresent
683689
livenessProbe:
684690
httpGet:
@@ -776,5 +782,5 @@ spec:
776782
minKubeVersion: 1.16.0
777783
provider:
778784
name: Datadog
779-
version: 1.12.1
780-
replaces: datadog-operator.v1.12.0
785+
version: 1.13.0
786+
replaces: datadog-operator.v1.12.1

0 commit comments

Comments
 (0)