Skip to content

Commit 9c9c8ab

Browse files
authored
Merge branch 'main' into gabedos/add-startup-probe
2 parents 58036a9 + 9d37612 commit 9c9c8ab

File tree

109 files changed

+27730
-2419
lines changed

Some content is hidden

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

109 files changed

+27730
-2419
lines changed

.github/workflows/build.yml

+14-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@ env:
33
GO_VERSION: 1.22.7
44
on:
55
push:
6+
# Permission forced by repo-level setting; only elevate on job-level
7+
permissions:
8+
contents: read
9+
# packages: read
610
jobs:
711
build-linux-binary:
812
runs-on: ubuntu-latest
13+
permissions:
14+
# https://github.com/marketplace/actions/goreleaser-action
15+
contents: write
916
steps:
1017
- name: Checkout
1118
uses: actions/checkout@v3
@@ -23,10 +30,13 @@ jobs:
2330
- name: Run GoReleaser
2431
uses: goreleaser/goreleaser-action@v3
2532
with:
26-
version: latest
33+
version: 2.4.1
2734
args: build --skip=validate --config .goreleaser-for-linux.yaml
2835
build-darwin-binary:
2936
runs-on: macos-latest
37+
permissions:
38+
# https://github.com/marketplace/actions/goreleaser-action
39+
contents: write
3040
steps:
3141
- uses: actions/checkout@v3
3242
with:
@@ -44,6 +54,9 @@ jobs:
4454
args: build --skip=validate --config .goreleaser-for-darwin.yaml
4555
build-windows-binary:
4656
runs-on: ubuntu-latest
57+
permissions:
58+
# https://github.com/marketplace/actions/goreleaser-action
59+
contents: write
4760
steps:
4861
- uses: actions/checkout@v3
4962
with:

.github/workflows/codeql-analysis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
# The branches below must be a subset of the branches above
88
branches: [ main ]
99

10+
permissions: {}
11+
1012
jobs:
1113
analyze:
1214
name: Analyze

.github/workflows/main.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: validation
22
on: [push, pull_request]
3+
# Permission forced by repo-level setting; only elevate on job-level
4+
permissions:
5+
contents: read
6+
# packages: read
37
env:
48
PROJECTNAME: "datadog-operator"
59
GO_VERSION: 1.22.7

.github/workflows/pr-linter.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,30 @@ name: pull request linter
22
on:
33
pull_request_target:
44
types: [opened, labeled, unlabeled, synchronize]
5+
6+
permissions: {}
7+
58
jobs:
69
build:
710
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
pull-requests: read
814
steps:
915
- name: Check out code into the Go module directory
1016
uses: actions/checkout@v1
1117
- name: Verify Pull Request Labels
12-
uses: jesusvasquez333/verify-pr-label-action@v1.3.1
18+
uses: jesusvasquez333/verify-pr-label-action@v1.4.0
1319
with:
1420
github-token: '${{ secrets.GITHUB_TOKEN }}'
1521
valid-labels: 'bug, enhancement, refactoring, documentation, tooling, dependencies'
1622
pull-request-number: '${{ github.event.pull_request.number }}'
23+
disable-reviews: true
1724
check-milestone:
1825
name: Check Milestone
1926
runs-on: ubuntu-latest
27+
permissions:
28+
pull-requests: read
2029
steps:
2130
- if: github.event.pull_request.milestone == null && !contains(toJson(github.event.pull_request.labels.*.name), 'qa/skip-qa')
2231
run: echo "::error::Missing milestone or \`qa/skip-qa\` label" && exit 1

.github/workflows/release.yaml

+28-1
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,21 @@ on:
66
tags:
77
- "v[0-9]+.[0-9]+.[0-9]+"
88
- "v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+"
9+
# Permission forced by repo-level setting; only elevate on job-level
10+
permissions:
11+
contents: read
12+
# packages: read
913
env:
1014
GO_VERSION: 1.22.7
1115
jobs:
1216
build-linux-binary:
1317
if: startsWith(github.ref, 'refs/tags/v')
1418
runs-on: ubuntu-latest
19+
permissions:
20+
# https://github.com/marketplace/actions/goreleaser-action
21+
contents: write
22+
# actions/upload-artifact@v3
23+
actions: write
1524
steps:
1625
- name: Checkout
1726
uses: actions/checkout@v3
@@ -36,7 +45,7 @@ jobs:
3645
- name: Run GoReleaser
3746
uses: goreleaser/goreleaser-action@v3
3847
with:
39-
version: latest
48+
version: 2.4.1
4049
args: release --skip=publish --config .goreleaser-for-linux.yaml
4150
env:
4251
GORELEASER_PREVIOUS_TAG: ${{steps.latest_version.outputs.release}}
@@ -51,6 +60,11 @@ jobs:
5160
build-darwin-binary:
5261
if: startsWith(github.ref, 'refs/tags/v')
5362
runs-on: macos-latest
63+
permissions:
64+
# https://github.com/marketplace/actions/goreleaser-action
65+
contents: write
66+
# actions/upload-artifact@v3
67+
actions: write
5468
steps:
5569
- uses: actions/checkout@v3
5670
with:
@@ -85,6 +99,11 @@ jobs:
8599
build-windows-binary:
86100
if: startsWith(github.ref, 'refs/tags/v')
87101
runs-on: ubuntu-latest
102+
permissions:
103+
# https://github.com/marketplace/actions/goreleaser-action
104+
contents: write
105+
# actions/upload-artifact@v3
106+
actions: write
88107
steps:
89108
- uses: actions/checkout@v3
90109
with:
@@ -120,6 +139,14 @@ jobs:
120139
if: startsWith(github.ref, 'refs/tags/v')
121140
needs: [build-linux-binary, build-darwin-binary, build-windows-binary]
122141
runs-on: ubuntu-latest
142+
permissions:
143+
# https://github.com/marketplace/actions/goreleaser-action
144+
# https://github.com/softprops/action-gh-release?tab=readme-ov-file#permissions
145+
contents: write
146+
# actions/download-artifact@v3
147+
actions: read
148+
# rajatjindal/[email protected]
149+
pull-requests: write
123150
steps:
124151
- name: Checkout
125152
uses: actions/checkout@v3

.gitlab-ci.yml

+17-11
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ image: registry.ddbuild.io/images/mirror/golang:1.22.7
22
variables:
33
PROJECTNAME: "datadog-operator"
44
PROJECTNAME_CHECK: "datadog-operator-check"
5-
GOPATH: "$CI_PROJECT_DIR/.cache"
65
BUILD_DOCKER_REGISTRY: "486234852809.dkr.ecr.us-east-1.amazonaws.com/ci"
76
E2E_DOCKER_REGISTRY: "669783387624.dkr.ecr.us-east-1.amazonaws.com/operator"
8-
JOB_DOCKER_IMAGE: "486234852809.dkr.ecr.us-east-1.amazonaws.com/ci-containers-project:v46356103-16ecadd-v3.0.0"
7+
JOB_DOCKER_IMAGE: "registry.ddbuild.io/ci-containers-project:v46367840-16ecadd-v3.0.0"
98
DOCKER_REGISTRY_LOGIN_SSM_KEY: docker_hub_login
109
DOCKER_REGISTRY_PWD_SSM_KEY: docker_hub_pwd
1110
DOCKER_REGISTRY_URL: docker.io
@@ -21,8 +20,7 @@ variables:
2120
cache: &global_cache
2221
key: ${CI_COMMIT_REF_SLUG}
2322
paths:
24-
- .cache
25-
policy: pull-push
23+
- /go/pkg/mod
2624

2725
stages:
2826
- build
@@ -79,8 +77,14 @@ stages:
7977
build:
8078
stage: build
8179
tags: ["arch:amd64"]
80+
variables:
81+
KUBERNETES_MEMORY_REQUEST: 16Gi
82+
KUBERNETES_MEMORY_LIMIT: 16Gi
83+
KUBERNETES_CPU_REQUEST: 4
84+
KUBERNETES_CPU_LIMIT: 4
85+
GOMEMLIMIT: 15GiB
86+
GOMAXPROCS: 4
8287
before_script:
83-
- mkdir -p .cache
8488
- make install-tools
8589
script:
8690
- make build
@@ -92,8 +96,14 @@ unit_tests:
9296
- if: '$DDR == "true"'
9397
when: never
9498
- when: on_success
99+
variables:
100+
KUBERNETES_MEMORY_REQUEST: 16Gi
101+
KUBERNETES_MEMORY_LIMIT: 16Gi
102+
KUBERNETES_CPU_REQUEST: 4
103+
KUBERNETES_CPU_LIMIT: 4
104+
GOMEMLIMIT: 15GiB
105+
GOMAXPROCS: 4
95106
before_script:
96-
- mkdir -p .cache
97107
- make install-tools
98108
script:
99109
- make test
@@ -102,7 +112,6 @@ check-golang-version:
102112
stage: test
103113
tags: ["arch:amd64"]
104114
before_script:
105-
- mkdir -p .cache
106115
- make install-tools
107116
script:
108117
- make update-golang
@@ -116,7 +125,6 @@ generate_code:
116125
when: never
117126
- when: on_success
118127
before_script:
119-
- mkdir -p .cache
120128
- make install-tools
121129
script:
122130
- make generate manifests
@@ -457,7 +465,6 @@ publish_community_operators:
457465
tags: [ "runner:docker", "size:large" ]
458466
image: $JOB_DOCKER_IMAGE
459467
before_script:
460-
- mkdir -p .cache
461468
- make install-tools
462469
script:
463470
# Set version
@@ -522,12 +529,11 @@ publish_nightly_workflow:
522529
CONDUCTOR_TARGET: $CONDUCTOR_TARGET
523530
DDR_WORKFLOW_ID: $DDR_WORKFLOW_ID
524531

525-
# On success, this will cause CNAB to trigger a Deployment to Release Candidate clusters
532+
# On success, this will cause CNAB to trigger a Deployment to Release Candidate clusters and open a corresponding pull request
526533
publish_release_candidate_workflow:
527534
stage: deploy
528535
rules:
529536
- if: $CI_COMMIT_TAG
530-
when: manual # TODO: change this to on_success when feeling confident
531537
- when: never
532538
needs:
533539
- trigger_internal_operator_image

.golangci.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[run]
2-
deadline = "5m"
32
tests = false
3+
timeout = "10m"
44

55
[linters-settings]
66

.goreleaser-for-darwin.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
version: 2
12
before:
23
hooks:
34
- go mod download

.goreleaser-for-linux.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
version: 2
12
before:
23
hooks:
34
- go mod download

.goreleaser-for-windows.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
version: 2
12
before:
23
hooks:
34
- go mod download

.goreleaser.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
version: 2
12
before:
23
hooks:
34
- go mod download

LICENSE-3rdparty.csv

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Component,Origin,License
2+
core,github.com/DataDog/appsec-internal-go,Apache-2.0
23
core,github.com/DataDog/datadog-agent/pkg/config/model,Apache-2.0
34
core,github.com/DataDog/datadog-agent/pkg/config/remote,Apache-2.0
5+
core,github.com/DataDog/datadog-agent/pkg/obfuscate,Apache-2.0
46
core,github.com/DataDog/datadog-agent/pkg/proto,Apache-2.0
57
core,github.com/DataDog/datadog-agent/pkg/remoteconfig/state,Apache-2.0
68
core,github.com/DataDog/datadog-agent/pkg/util/backoff,Apache-2.0
@@ -14,8 +16,11 @@ core,github.com/DataDog/datadog-api-client-go/v2,Apache-2.0
1416
core,github.com/DataDog/datadog-go/v5/statsd,MIT
1517
core,github.com/DataDog/datadog-operator,Apache-2.0
1618
core,github.com/DataDog/extendeddaemonset/api/v1alpha1,Apache-2.0
19+
core,github.com/DataDog/go-libddwaf/v3,Apache-2.0
20+
core,github.com/DataDog/go-sqllexer,MIT
1721
core,github.com/DataDog/go-tuf,BSD-3-Clause
1822
core,github.com/DataDog/gostackparse,Apache-2.0
23+
core,github.com/DataDog/sketches-go/ddsketch,Apache-2.0
1924
core,github.com/DataDog/viper,MIT
2025
core,github.com/DataDog/zstd,BSD-3-Clause
2126
core,github.com/Masterminds/semver,MIT
@@ -26,9 +31,12 @@ core,github.com/cenkalti/backoff,MIT
2631
core,github.com/cespare/xxhash/v2,MIT
2732
core,github.com/cihub/seelog,BSD-3-Clause
2833
core,github.com/davecgh/go-spew/spew,ISC
34+
core,github.com/dustin/go-humanize,MIT
35+
core,github.com/ebitengine/purego,Apache-2.0
2936
core,github.com/emicklei/go-restful/v3,MIT
3037
core,github.com/evanphx/json-patch/v5,BSD-3-Clause
3138
core,github.com/fsnotify/fsnotify,BSD-3-Clause
39+
core,github.com/fxamacker/cbor/v2,MIT
3240
core,github.com/go-logr/logr,Apache-2.0
3341
core,github.com/go-logr/zapr,Apache-2.0
3442
core,github.com/go-openapi/jsonpointer,Apache-2.0
@@ -51,12 +59,13 @@ core,github.com/josharian/intern,MIT
5159
core,github.com/json-iterator/go,MIT
5260
core,github.com/magiconair/properties,BSD-2-Clause
5361
core,github.com/mailru/easyjson,MIT
54-
core,github.com/matttproud/golang_protobuf_extensions/pbutil,Apache-2.0
5562
core,github.com/mitchellh/mapstructure,MIT
5663
core,github.com/modern-go/concurrent,Apache-2.0
5764
core,github.com/modern-go/reflect2,Apache-2.0
5865
core,github.com/mohae/deepcopy,MIT
5966
core,github.com/munnerz/goautoneg,BSD-3-Clause
67+
core,github.com/outcaste-io/ristretto,Apache-2.0
68+
core,github.com/outcaste-io/ristretto/z,MIT
6069
core,github.com/patrickmn/go-cache,MIT
6170
core,github.com/pelletier/go-toml,Apache-2.0
6271
core,github.com/philhofer/fwd,MIT
@@ -65,7 +74,6 @@ core,github.com/pmezard/go-difflib/difflib,BSD-3-Clause
6574
core,github.com/prometheus/client_golang/prometheus,Apache-2.0
6675
core,github.com/prometheus/client_model/go,Apache-2.0
6776
core,github.com/prometheus/common,Apache-2.0
68-
core,github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg,BSD-3-Clause
6977
core,github.com/prometheus/procfs,Apache-2.0
7078
core,github.com/richardartoul/molecule,MIT
7179
core,github.com/richardartoul/molecule/src/codec,Apache-2.0
@@ -80,18 +88,21 @@ core,github.com/spf13/pflag,BSD-3-Clause
8088
core,github.com/stretchr/objx,MIT
8189
core,github.com/stretchr/testify,MIT
8290
core,github.com/tinylib/msgp/msgp,MIT
91+
core,github.com/x448/float16,MIT
8392
core,github.com/zorkian/go-datadog-api,BSD-3-Clause
8493
core,go.etcd.io/bbolt,MIT
8594
core,go.uber.org/atomic,MIT
8695
core,go.uber.org/multierr,MIT
8796
core,go.uber.org/zap,MIT
8897
core,golang.org/x/exp,BSD-3-Clause
98+
core,golang.org/x/mod/semver,BSD-3-Clause
8999
core,golang.org/x/net,BSD-3-Clause
90100
core,golang.org/x/oauth2,BSD-3-Clause
91101
core,golang.org/x/sys/unix,BSD-3-Clause
92102
core,golang.org/x/term,BSD-3-Clause
93103
core,golang.org/x/text,BSD-3-Clause
94104
core,golang.org/x/time/rate,BSD-3-Clause
105+
core,golang.org/x/xerrors,BSD-3-Clause
95106
core,gomodules.xyz/jsonpatch/v2,Apache-2.0
96107
core,google.golang.org/genproto/googleapis/api,Apache-2.0
97108
core,google.golang.org/genproto/googleapis/rpc/status,Apache-2.0
@@ -107,7 +118,6 @@ core,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions,Apache-2.0
107118
core,k8s.io/apimachinery/pkg,Apache-2.0
108119
core,k8s.io/apimachinery/third_party/forked/golang,BSD-3-Clause
109120
core,k8s.io/client-go,Apache-2.0
110-
core,k8s.io/component-base/config,Apache-2.0
111121
core,k8s.io/klog/v2,Apache-2.0
112122
core,k8s.io/kube-aggregator/pkg/apis/apiregistration,Apache-2.0
113123
core,k8s.io/kube-openapi/pkg,Apache-2.0
@@ -118,4 +128,5 @@ core,k8s.io/utils/internal/third_party/forked/golang/net,BSD-3-Clause
118128
core,sigs.k8s.io/controller-runtime,Apache-2.0
119129
core,sigs.k8s.io/json,Apache-2.0
120130
core,sigs.k8s.io/structured-merge-diff/v4,Apache-2.0
121-
core,sigs.k8s.io/yaml,MIT
131+
core,sigs.k8s.io/yaml,Apache-2.0
132+
core,sigs.k8s.io/yaml/goyaml.v2,Apache-2.0

0 commit comments

Comments
 (0)