Skip to content

Commit e55339f

Browse files
author
Chris Dobbyn
authored
Merge branch 'main' into granular-resource-config
2 parents 5fcdc16 + 267afde commit e55339f

File tree

158 files changed

+81912
-221002
lines changed

Some content is hidden

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

158 files changed

+81912
-221002
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+10-19
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,20 @@
1-
## Which problem is this PR solving?
2-
3-
Please include a summary of the change in your pr and what it's fixing.
4-
5-
## Short description of the changes
1+
## Description
2+
<!-- Please include a summary of the change in your PR and what it's fixing. -->
63

74
## Type of change
8-
9-
Please delete options that are not relevant.
5+
<!-- Please check the relevant option. -->
106

117
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
12-
- [ ] Security fix
138
- [ ] New feature / enhancement (non-breaking change which adds functionality)
9+
- [ ] Security fix
1410
- [ ] Bug fix (non-breaking change which fixes an issue)
15-
- [ ] This change requires a documentation update
16-
17-
## New Tests?
18-
19-
Please describe the new tests that were added (if applicable).
20-
21-
- [ ] This change requires changes in testing:
22-
- [ ] unit tests
23-
- [ ] e2e tests
2411

2512
## Checklist:
13+
<!-- Please check applicable options. -->
2614

2715
- [ ] Add changelog entry following the [contributing guide](../CONTRIBUTING.md#pull-requests)
28-
- [ ] Tests have been added
29-
- [ ] Documentation has been updated
16+
- [ ] Documentation has been updated
17+
- [ ] This change requires changes in testing:
18+
- [ ] unit tests
19+
- [ ] E2E tests
20+

.github/dependabot.yml

-25
This file was deleted.

.github/renovate.json5

+18-13
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
{
22
"extends": [
3-
"config:base",
4-
// Disable the creation of this issue that renovate updates with the pending issue we follow with Zenhub:
5-
// https://github.com/newrelic/nri-kubernetes/issues/205
6-
":disableDependencyDashboard"
3+
"github>newrelic/coreint-automation:renovate-base.json5"
74
],
8-
// Label PRs with `dependencies`.
9-
"labels": ["dependencies"],
10-
"regexManagers": [
5+
ignoreDeps: ["ingress-nginx/kube-webhook-certgen"],
6+
"packageRules": [
117
{
8+
"matchPackageNames": ["kube-state-metrics"],
9+
"allowedVersions": "<=5.12.1"
10+
}
11+
],
12+
"customManagers": [
13+
{
14+
"description": "Update minikube",
15+
"customType": "regex",
1216
"fileMatch": [
13-
'(^|/)values\.yaml$' // Is the same regex as "helmv3" but we have to change the regex.
17+
"(^|/)\\.github/workflows/.*\\.ya?ml$"
1418
],
15-
"datasourceTemplate": "docker",
1619
"matchStrings": [
17-
" *repository: (?<depName>.+)\n *tag: (?<currentValue>.+)"
18-
]
19-
}
20-
]
20+
'minikube version: "(?<currentValue>.+)"'
21+
],
22+
"depNameTemplate": "manusa/actions-setup-minikube",
23+
"datasourceTemplate": "github-releases",
24+
},
25+
],
2126
}

.github/workflows/changelog.yml

+3-29
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,8 @@ name: changelog
55

66
on:
77
pull_request:
8+
types: [opened, synchronize, reopened, labeled, unlabeled]
89

910
jobs:
10-
changelog-entry:
11-
runs-on: ubuntu-latest
12-
if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.pull_request.labels.*.name, 'Skip Changelog')}}
13-
14-
steps:
15-
- uses: actions/checkout@v3
16-
- name: Check for CHANGELOG file changes
17-
run: |
18-
# Only the latest commit of the feature branch is available
19-
# automatically. To diff with the base branch, we need to
20-
# fetch that too (and we only need its latest commit).
21-
git fetch origin ${{ github.base_ref }} --depth=1
22-
if [[ $(git diff --name-only FETCH_HEAD | grep --ignore-case CHANGELOG) ]]
23-
then
24-
echo "The CHANGELOG file was modified. Looks good!"
25-
else
26-
echo "The CHANGELOG file was not modified."
27-
echo "Please add a CHANGELOG entry to the appropriate header under \"Unreleased\", or add the \"Skip Changelog\" label if not required."
28-
false
29-
fi
30-
31-
lint-changelog:
32-
runs-on: ubuntu-latest
33-
needs: changelog-entry
34-
steps:
35-
- name: Checkout code
36-
uses: actions/checkout@v3
37-
- name: Check if CHANGELOG is valid
38-
uses: newrelic/release-toolkit/validate-markdown@v1
11+
check-changelog:
12+
uses: newrelic/k8s-metadata-injection/.github/workflows/changelog-reusable.yml@main

.github/workflows/e2e.yaml

+7-29
Original file line numberDiff line numberDiff line change
@@ -12,45 +12,25 @@ jobs:
1212
e2eTests:
1313
# Do not run e2e tests if commit message or PR has skip-e2e.
1414
if: ${{ ! contains(github.event.pull_request.labels.*.name, 'ci/skip-e2e') }}
15-
runs-on: ubuntu-20.04
15+
runs-on: ubuntu-latest
1616
strategy:
17-
max-parallel: 5 # len(k8sVersion)/2 is a good number to have here
17+
max-parallel: 6 # len(k8sVersion)/2 is a good number to have here
1818
matrix:
1919
# Latest patch version can be found in https://github.com/kubernetes/website/blob/main/content/en/releases/patch-releases.md
2020
# Some versions might not be available yet in https://storage.googleapis.com/kubernetes-release/release/v1.X.Y/bin/linux/amd64/kubelet
21-
k8sVersion: [ "v1.27.0-rc.0", "v1.26.0","v1.25.3", "v1.24.1", "v1.23.8", "v1.22.11", "v1.21.14", "v1.16.15" ]
22-
cri: [ docker ]
23-
exclude:
24-
- k8sVersion: v1.24.1
25-
cri: docker
26-
- k8sVersion: v1.25.3
27-
cri: docker
28-
- k8sVersion: v1.26.0
29-
cri: docker
30-
- k8sVersion: v1.27.0-rc.0
31-
cri: docker
32-
include:
33-
- k8sVersion: v1.24.1
34-
cri: containerd
35-
- k8sVersion: v1.23.8
36-
cri: containerd
37-
- k8sVersion: v1.25.3
38-
cri: containerd
39-
- k8sVersion: v1.26.0
40-
cri: containerd
41-
- k8sVersion: v1.27.0-rc.0
42-
cri: containerd
21+
k8sVersion: [ "v1.27.5", "v1.26.8","v1.25.13", "v1.24.17", "v1.23.17"]
22+
cri: [ containerd ]
4323
env:
4424
DOCKER_BUILDKIT: '1' # Setting DOCKER_BUILDKIT=1 ensures TARGETOS and TARGETARCH are populated
4525
steps:
46-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
4727
- uses: actions/setup-go@v4
4828
with:
4929
go-version-file: 'go.mod'
5030
- name: Setup Minikube
51-
uses: manusa/actions-setup-minikube@v2.7.2
31+
uses: manusa/actions-setup-minikube@v2.9.0
5232
with:
53-
minikube version: v1.30.1
33+
minikube version: v1.31.2
5434
kubernetes version: ${{ matrix.k8sVersion }}
5535
driver: docker
5636
start args: "--nodes=2 --container-runtime=${{ matrix.cri }}"
@@ -87,8 +67,6 @@ jobs:
8767
echo "exceptions=1_25" >> $GITHUB_OUTPUT
8868
elif [ "$MINOR" -eq 26 ]; then
8969
echo "exceptions=1_26" >> $GITHUB_OUTPUT
90-
elif [ "$MINOR" = "27-rc.0" ]; then
91-
echo "exceptions=1_27" >> $GITHUB_OUTPUT
9270
elif [ "$MINOR" -ge 27 ]; then
9371
echo "exceptions=1_27" >> $GITHUB_OUTPUT
9472
fi

.github/workflows/nightlyAndMainImage.yml

+21-6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
branches:
88
- main
99

10+
env:
11+
ORIGINAL_REPO_NAME: ${{ github.event.repository.full_name }}
12+
1013
jobs:
1114
build:
1215
name: Build integration for
@@ -16,7 +19,7 @@ jobs:
1619
goos: [ linux ]
1720
goarch: [ amd64, arm64, arm ]
1821
steps:
19-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2023
- uses: actions/setup-go@v4
2124
with:
2225
go-version-file: 'go.mod'
@@ -42,21 +45,21 @@ jobs:
4245
DOCKER_IMAGE_TAG: main
4346
DOCKER_PLATFORMS: "linux/amd64,linux/arm64,linux/arm" # Must be consistent with the matrix from the job above
4447
steps:
45-
- uses: actions/checkout@v3
48+
- uses: actions/checkout@v4
4649
- name: Setting nightly tag if schedule
4750
if: ${{ github.event.schedule }}
4851
run: echo "DOCKER_IMAGE_TAG=nightly" >> $GITHUB_ENV
4952
- name: Set up QEMU
50-
uses: docker/setup-qemu-action@v2
53+
uses: docker/setup-qemu-action@v3
5154
- name: Set up Docker Buildx
52-
uses: docker/setup-buildx-action@v2
55+
uses: docker/setup-buildx-action@v3
5356

5457
- name: Download all artifacts from build job
5558
uses: actions/download-artifact@v3
5659
with:
5760
path: bin
5861

59-
- uses: docker/login-action@v2
62+
- uses: docker/login-action@v3
6063
with:
6164
username: ${{ secrets.FSI_DOCKERHUB_USERNAME }}
6265
password: ${{ secrets.FSI_DOCKERHUB_TOKEN }}
@@ -74,7 +77,7 @@ jobs:
7477
-t $DOCKER_IMAGE_NAME:ci-scan \
7578
.
7679
- name: Run Trivy vulnerability scanner
77-
uses: aquasecurity/trivy-action@0.11.2
80+
uses: aquasecurity/trivy-action@0.12.0
7881
with:
7982
image-ref: '${{ env.DOCKER_IMAGE_NAME }}:ci-scan'
8083
format: 'table'
@@ -87,3 +90,15 @@ jobs:
8790
docker buildx build --push --platform=$DOCKER_PLATFORMS \
8891
-t $DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG \
8992
.
93+
94+
notify-failure:
95+
if: ${{ always() && failure() }}
96+
needs: [build, docker]
97+
runs-on: ubuntu-latest
98+
steps:
99+
- name: Notify failure via Slack
100+
uses: archive/[email protected]
101+
with:
102+
slack-bot-user-oauth-access-token: ${{ secrets.K8S_AGENTS_SLACK_TOKEN }}
103+
slack-channel: ${{ secrets.K8S_AGENTS_SLACK_CHANNEL }}
104+
slack-text: "❌ `${{ env.ORIGINAL_REPO_NAME }}`: <${{ github.server_url }}/${{ env.ORIGINAL_REPO_NAME }}/actions/runs/${{ github.run_id }}|'Nightly and main build' failed>."

.github/workflows/push_pr.yaml

+10-9
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
push:
77
branches:
88
- main
9+
- renovate/**
910

1011
jobs:
1112
build:
@@ -16,7 +17,7 @@ jobs:
1617
goos: [ linux ]
1718
goarch: [ amd64, arm64, arm ]
1819
steps:
19-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2021
- uses: actions/setup-go@v4
2122
with:
2223
go-version-file: 'go.mod'
@@ -29,13 +30,13 @@ jobs:
2930
3031
chart-lint:
3132
name: Helm chart Lint
32-
runs-on: ubuntu-20.04
33+
runs-on: ubuntu-latest
3334
timeout-minutes: 10
3435
strategy:
3536
matrix:
36-
kubernetes-version: [ "v1.16.15", "v1.22.0" ]
37+
kubernetes-version: [ "v1.27.5", "v1.26.8","v1.25.13", "v1.24.17", "v1.23.17" ]
3738
steps:
38-
- uses: actions/checkout@v3
39+
- uses: actions/checkout@v4
3940
with:
4041
fetch-depth: 0
4142
- uses: helm/[email protected]
@@ -66,10 +67,10 @@ jobs:
6667
fi
6768
done
6869
- name: Setup Minikube
69-
uses: manusa/actions-setup-minikube@v2.7.2
70+
uses: manusa/actions-setup-minikube@v2.9.0
7071
if: steps.list-changed.outputs.changed == 'true'
7172
with:
72-
minikube version: v1.30.1
73+
minikube version: v1.31.2
7374
kubernetes version: ${{ matrix.kubernetes-version }}
7475
github token: ${{ secrets.GITHUB_TOKEN }}
7576
- uses: actions/setup-go@v4
@@ -95,7 +96,7 @@ jobs:
9596
needs: [ build ]
9697
runs-on: ubuntu-latest
9798
steps:
98-
- uses: actions/checkout@v3
99+
- uses: actions/checkout@v4
99100
- uses: actions/setup-go@v4
100101
with:
101102
go-version-file: 'go.mod'
@@ -106,7 +107,7 @@ jobs:
106107
name: Static analysis and linting
107108
runs-on: ubuntu-latest
108109
steps:
109-
- uses: actions/checkout@v3
110+
- uses: actions/checkout@v4
110111
- uses: actions/setup-go@v4
111112
with:
112113
go-version-file: 'go.mod'
@@ -128,6 +129,6 @@ jobs:
128129
runs-on: ubuntu-latest
129130
timeout-minutes: 5
130131
steps:
131-
- uses: actions/checkout@v3
132+
- uses: actions/checkout@v4
132133
- name: Codespell test
133134
uses: codespell-project/actions-codespell@master

0 commit comments

Comments
 (0)