Skip to content

Commit 5b38e10

Browse files
authored
Merge branch 'main' into add-dashboard-force-sync-period-env
2 parents 7781b7c + 686a1db commit 5b38e10

File tree

144 files changed

+7387
-864
lines changed

Some content is hidden

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

144 files changed

+7387
-864
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ README.md @DataDog/documentation @DataDog/container-ecosystems
1919
/internal/controller/datadogagent/feature/clusterchecks/* @DataDog/container-platform
2020
/internal/controller/datadogagent/feature/kubernetesstatecore/* @DataDog/container-integrations
2121
/internal/controller/datadogagent/feature/helmcheck/* @DataDog/container-integrations
22+
/internal/controller/datadogagent/feature/autoscaling/* @DataDog/container-autoscaling
2223

2324

2425
/api/**/datadogpodautoscaler*.go @DataDog/container-autoscaling
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
issuer: https://token.actions.githubusercontent.com
3+
4+
subject: repo:DataDog/datadog-operator:ref:refs/heads/main
5+
6+
claim_pattern:
7+
event_name: (workflow_dispatch|schedule)
8+
ref: refs/heads/main
9+
ref_protected: "true"
10+
job_workflow_ref: DataDog/datadog-operator/\.github/workflows/stale\.yml@refs/heads/main
11+
12+
permissions:
13+
actions: write
14+
issues: write
15+
pull_requests: write

.github/workflows/backport-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
<%- body %>
3838
3939
- name: Copy milestone to backport PR
40-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
40+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
4141
env:
4242
BACKPORT_PR: ${{ steps.backport.outputs.created_pull_requests }}
4343
with:

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: little-core-labs/get-git-tag@2c292ff564c1a61b989e29f0410d131317f89b03 # v3.0.2
2525
id: tag
2626
- name: Set up Go
27-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
27+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
2828
with:
2929
go-version: ${{ env.GO_VERSION }}
3030
- name: Run GoReleaser
@@ -45,7 +45,7 @@ jobs:
4545
uses: little-core-labs/get-git-tag@2c292ff564c1a61b989e29f0410d131317f89b03 # v3.0.2
4646
id: tag
4747
- name: Set up Go
48-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
48+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
4949
with:
5050
go-version: ${{ env.GO_VERSION }}
5151
- name: Build
@@ -65,7 +65,7 @@ jobs:
6565
uses: little-core-labs/get-git-tag@2c292ff564c1a61b989e29f0410d131317f89b03 # v3.0.2
6666
id: tag
6767
- name: Set up Go
68-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
68+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
6969
with:
7070
go-version: ${{ env.GO_VERSION }}
7171
- name: Build
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
name: Check if datadog member commented an issue
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
check_comment:
9+
runs-on: ubuntu-latest
10+
if: github.event.issue.pull_request == null
11+
steps:
12+
- name: Check if there is a comment from a datadog member
13+
id: datadog-comment
14+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
15+
with:
16+
result-encoding: string
17+
script: |
18+
const comments = await github.rest.issues.listComments({
19+
owner: context.repo.owner,
20+
repo: context.repo.repo,
21+
issue_number: context.issue.number
22+
});
23+
let commented = "false";
24+
for (const comment of comments.data) {
25+
try {
26+
const membership = await github.rest.orgs.checkMembershipForUser({
27+
org: 'datadog',
28+
username: comment.user.login
29+
});
30+
if (membership.status === 204) {
31+
commented = "true";
32+
break;
33+
}
34+
} catch (error) {
35+
if (error.name === 'HttpError') {
36+
// User is not a datadog member
37+
continue;
38+
}
39+
throw error;
40+
}
41+
}
42+
return commented;
43+
- name: Remove the pending label when issue is commented
44+
if: steps.datadog-comment.outputs.result == 'true'
45+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
46+
with:
47+
script: |
48+
const labels = await github.rest.issues.listLabelsOnIssue({
49+
owner: context.repo.owner,
50+
repo: context.repo.repo,
51+
issue_number: context.issue.number
52+
});
53+
for (const label of labels.data) {
54+
if (label.name === 'pending') {
55+
await github.rest.issues.removeLabel({
56+
owner: context.repo.owner,
57+
repo: context.repo.repo,
58+
issue_number: context.issue.number,
59+
name: label.name
60+
});
61+
}
62+
}

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
# Initializes the CodeQL tools for scanning.
3333
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.29.5
34+
uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.29.5
3535
with:
3636
languages: ${{ matrix.language }}
3737
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -41,7 +41,7 @@ jobs:
4141

4242
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4343
- name: Autobuild
44-
uses: github/codeql-action/autobuild@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.29.5
44+
uses: github/codeql-action/autobuild@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.29.5
4545

4646
- name: Perform CodeQL Analysis
47-
uses: github/codeql-action/analyze@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.29.5
47+
uses: github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.29.5
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: "Set Pending Label at Issue Creation"
3+
4+
on:
5+
issues:
6+
types: [opened]
7+
8+
jobs:
9+
set_pending_label:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
issues: write
13+
steps:
14+
- name: Set pending label
15+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
16+
with:
17+
github-token: ${{ secrets.GITHUB_TOKEN }}
18+
script: |
19+
await github.rest.issues.addLabels({
20+
owner: context.repo.owner,
21+
repo: context.repo.repo,
22+
issue_number: context.issue.number,
23+
labels: ["pending"]
24+
});

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Set up Go
15-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
15+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
1616
with:
1717
go-version: ${{ env.GO_VERSION }}
1818
id: go
@@ -31,7 +31,7 @@ jobs:
3131
- name: run unit tests and E2E tests (fake cluster)
3232
run: |
3333
make test
34-
- uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
34+
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
3535
with:
3636
token: ${{ secrets.CODECOV_TOKEN }}
3737
files: cover.out,cover_integration.out

.github/workflows/release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: little-core-labs/get-git-tag@2c292ff564c1a61b989e29f0410d131317f89b03 # v3.0.2
3333
id: tag
3434
- name: Set up Go
35-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
35+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
3636
with:
3737
go-version: ${{ env.GO_VERSION }}
3838
- name: Get Latest Release
@@ -74,7 +74,7 @@ jobs:
7474
uses: little-core-labs/get-git-tag@2c292ff564c1a61b989e29f0410d131317f89b03 # v3.0.2
7575
id: tag
7676
- name: Set up Go
77-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
77+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
7878
with:
7979
go-version: ${{ env.GO_VERSION }}
8080
- name: Get Latest Release
@@ -114,7 +114,7 @@ jobs:
114114
uses: little-core-labs/get-git-tag@2c292ff564c1a61b989e29f0410d131317f89b03 # v3.0.2
115115
id: tag
116116
- name: Set up Go
117-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
117+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
118118
with:
119119
go-version: ${{ env.GO_VERSION }}
120120
- name: Get Latest Release
@@ -196,7 +196,7 @@ jobs:
196196
- name: Generate Plugin manifest
197197
run: ./hack/release/generate-plugin-manifest.sh ${{steps.tag.outputs.tag}}
198198
- name: Release
199-
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2
199+
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
200200
with:
201201
body_path: dist/CHANGELOG.md
202202
prerelease: ${{ contains(github.ref, '-rc.') }}

.github/workflows/stale.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
name: Close stale issues and PRs
3+
4+
on:
5+
schedule:
6+
# Every day at noon CEST (10:00 UTC in summer, 11:00 UTC in winter)
7+
# Using 10:00 UTC as CEST is UTC+2 (summer time)
8+
- cron: '0 10 * * *'
9+
workflow_dispatch:
10+
11+
permissions: {}
12+
13+
jobs:
14+
stale:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
id-token: write # This is required for getting the required OIDC token from GitHub
18+
steps:
19+
- uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3
20+
id: octo-sts
21+
with:
22+
scope: DataDog/datadog-operator
23+
policy: self.stale.manage-stale
24+
25+
- uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
26+
with:
27+
repo-token: ${{ steps.octo-sts.outputs.token }}
28+
29+
# Stale configuration
30+
days-before-stale: 15
31+
days-before-close: 30
32+
33+
# Issue configuration
34+
stale-issue-message: |
35+
This issue has been automatically marked as stale because it has not had activity in the past 15 days.
36+
37+
38+
It will be closed in 30 days if no further activity occurs. If this issue is still relevant, adding a comment will keep it open. Also, you can always reopen the issue if you missed the window.
39+
40+
41+
Thank you for your contributions!
42+
43+
close-issue-message: |
44+
This issue was automatically closed because it has been stale for 30 days with no activity.
45+
46+
47+
If this issue is still relevant, please reopen it or create a new issue with updated information.
48+
49+
50+
Thanks!
51+
52+
stale-issue-label: 'stale'
53+
close-issue-label: 'auto-closed'
54+
# Pull request configuration
55+
stale-pr-message: |
56+
This pull request has been automatically marked as stale because it has not had activity in the past 15 days.
57+
58+
59+
It will be closed in 30 days if no further activity occurs. If this pull request is still relevant, adding a comment or pushing new commits will keep it open. Also, you can always reopen the pull request if you missed the window.
60+
61+
62+
Thank you for your contributions!
63+
64+
close-pr-message: |
65+
This pull request was automatically closed because it has been stale for 15 days with no activity.
66+
67+
68+
If this pull request is still relevant, please reopen it or create a new pull request with updated information.
69+
70+
71+
Thanks!
72+
73+
stale-pr-label: 'stale'
74+
close-pr-label: 'auto-closed'
75+
76+
# Exemptions
77+
exempt-issue-labels: 'kind/bug,kind/feature,kind/security,category/bugfix,category/feature,category/security,pending'
78+
exempt-pr-labels: 'do-not-merge/WIP,do-not-merge/hold'

0 commit comments

Comments
 (0)