Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,27 @@ on:
jobs:
e2eTests:
if: ${{ ! contains(github.event.pull_request.labels.*.name, 'ci/skip-e2e') }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
max-parallel: 7 # len(k8sVersion) is a good number to have here
matrix:
privilegedMode: [ "normal", "unprivileged" ]
# Latest patch version can be found in https://github.com/kubernetes/website/blob/main/content/en/releases/patch-releases.md
# Some versions might not be available yet in https://storage.googleapis.com/kubernetes-release/release/v1.X.Y/bin/linux/amd64/kubelet
k8sVersion: [ "v1.16.15", "v1.17.17", "v1.18.20", "v1.19.14", "v1.20.10", "v1.21.4", "v1.22.0" ]
k8sVersion: [ "v1.34.0", "v1.33.0", "v1.32.0", "v1.31.0", "v1.30.0" ]
env:
DOCKER_BUILDKIT: '1' # Setting DOCKER_BUILDKIT=1 ensures TARGETOS and TARGETARCH are populated
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.19'
go-version: '1.23'
- name: Setup Minikube
uses: manusa/actions-setup-minikube@v2.4.2
uses: manusa/actions-setup-minikube@v2.16.1
with:
minikube version: v1.20.0
minikube version: v1.38.1
kubernetes version: ${{ matrix.k8sVersion }}
github token: ${{ secrets.GITHUB_TOKEN }}
driver: none # required for nri-kubernetes, as metrics gathered for the host are tested as well
- name: Compile and Build Image
run: |
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/push_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.19'
go-version: '1.23'
- name: Build integration
env:
GOOS: ${{ matrix.goos }}
Expand All @@ -26,7 +26,7 @@ jobs:

chart-lint:
name: Helm chart Lint
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
Expand Down Expand Up @@ -60,16 +60,16 @@ jobs:
fi
done
- name: Setup Minikube
uses: manusa/actions-setup-minikube@v2.7.2
uses: manusa/actions-setup-minikube@v2.16.1
if: steps.list-changed.outputs.changed == 'true'
with:
minikube version: v1.20.0
minikube version: v1.38.1
kubernetes version: ${{ matrix.kubernetes-version }}
github token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@v2
if: steps.list-changed.outputs.changed == 'true'
with:
go-version: '1.19'
go-version: '1.23'
- name: Create image for chart testing
if: steps.list-changed.outputs.changed == 'true'
run: |
Expand All @@ -92,7 +92,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.19'
go-version: '1.23'
- name: Run unit tests
run: make test

Expand All @@ -102,12 +102,14 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: newrelic/newrelic-infra-checkers@v1
- name: Semgrep
uses: returntocorp/semgrep-action@v1
with:
auditOn: push
golangci-lint-config: golangci-lint
# - name: Semgrep
# uses: returntocorp/semgrep-action@v1
# with:
# auditOn: push
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v6
continue-on-error: ${{ github.event_name != 'pull_request' }}
with:
only-new-issues: true
Expand All @@ -124,4 +126,4 @@ jobs:
skip: ./.git
check_filenames: true
check_hidden: true
ignore_words_list: inout
ignore_words_list: inout,NotIn
2 changes: 1 addition & 1 deletion .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
-f Dockerfile.windows `
-t newrelic/infrastructure:${{ env.AGENT_VERSION }}-windows-${{ matrix.windows.tag }} .

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: |
%LocalAppData%\go-build
Expand Down
6 changes: 3 additions & 3 deletions src/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ type argumentList struct {
DiscoveryCacheDir string `default:"/var/cache/nr-kubernetes" help:"The location of the cached values for discovered endpoints. Obsolete, use CacheDir instead."`
CacheDir string `default:"/var/cache/nr-kubernetes" help:"The location where to store various cached data."`
DiscoveryCacheTTL string `default:"1h" help:"Duration since the discovered endpoints are stored in the cache until they expire. Valid time units: 'ns', 'us', 'ms', 's', 'm', 'h'"`
DiscoveryCacheTTLJitter int `default:"0" help:"Total percentage how much the TTL can be randomly reduced or increased to spead load on the API server for discovery. E.g. 100% can either double the TTL or reduce it to 0."`
DiscoveryCacheTTLJitter int `default:"0" help:"Total percentage how much the TTL can be randomly reduced or increased to speed load on the API server for discovery. E.g. 100% can either double the TTL or reduce it to 0."`
APIServerCacheTTL string `default:"5m" help:"Duration to cache responses from the API Server. Valid time units: 'ns', 'us', 'ms', 's', 'm', 'h'. Set to 0s to disable"`
APIServerCacheTTLJitter int `default:"0" help:"Total percentage how much the TTL can be randomly reduced or increased to spead load on the API server for API metrics. E.g. 100% can either double the TTL or reduce it to 0."`
APIServerCacheTTLJitter int `default:"0" help:"Total percentage how much the TTL can be randomly reduced or increased to speed load on the API server for API metrics. E.g. 100% can either double the TTL or reduce it to 0."`
APIServerCacheK8SVersionTTL string `default:"3h" help:"Duration to cache the kubernetes version responses from the API Server. Valid time units: 'ns', 'us', 'ms', 's', 'm', 'h'. Set to 0s to disable"`
APIServerCacheK8SVersionTTLJitter int `default:"0" help:"Total percentage how much the TTL can be randomly reduced or increased to spead load on the API server for K8s version discovery. E.g. 100% can either double the TTL or reduce it to 0."`
APIServerCacheK8SVersionTTLJitter int `default:"0" help:"Total percentage how much the TTL can be randomly reduced or increased to speed load on the API server for K8s version discovery. E.g. 100% can either double the TTL or reduce it to 0."`
EtcdTLSSecretName string `help:"Name of the secret that stores your ETCD TLS configuration"`
EtcdTLSSecretNamespace string `default:"default" help:"Namespace in which the ETCD TLS secret lives"`
DisableKubeStateMetrics bool `default:"false" help:"Used to disable KSM data fetching. Defaults to 'false''"`
Expand Down
Loading