Skip to content

Commit 46747b4

Browse files
authored
Bump go version and dependencies (#53)
* chore: bump go version and dependencies
1 parent f0e731a commit 46747b4

File tree

12 files changed

+236
-111
lines changed

12 files changed

+236
-111
lines changed

.github/workflows/prerelease.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
env:
1111
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12-
GO_VERSION: '1.16'
12+
GO_VERSION: '1.18'
1313
INTEGRATION: "discovery-kubernetes"
1414
ORIGINAL_REPO_NAME: 'newrelic/nri-discovery-kubernetes'
1515
REPO_FULL_NAME: ${{ github.event.repository.full_name }}

.github/workflows/push_pr.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
TAG: "v0.0.0" # needed for goreleaser windows builds
1212
REPO_FULL_NAME: ${{ github.event.repository.full_name }}
1313
ORIGINAL_REPO_NAME: "newrelic/nri-discovery-kubernetes"
14-
GO_VERSION: '1.16'
14+
GO_VERSION: '1.18'
1515

1616
jobs:
1717
static-analysis:
@@ -30,21 +30,6 @@ jobs:
3030
with:
3131
only-new-issues: true
3232

33-
snyk:
34-
name: Run security checks via snyk
35-
runs-on: ubuntu-20.04
36-
env:
37-
SNYK_TOKEN: ${{ secrets.COREINT_SNYK_TOKEN }}
38-
steps:
39-
- uses: actions/checkout@v2
40-
- name: Login to DockerHub
41-
uses: docker/login-action@v1
42-
with:
43-
username: ${{ secrets.OHAI_DOCKER_HUB_ID }}
44-
password: ${{ secrets.OHAI_DOCKER_HUB_PASSWORD }}
45-
- name: Scan code for vulnerabilities
46-
run: make ci/snyk-test
47-
4833
test-nix:
4934
name: Run unit tests on *Nix
5035
runs-on: ubuntu-20.04

.github/workflows/security.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ on:
1010
- cron: "0 3 * * *"
1111

1212
jobs:
13-
# Note: Snyk SaaS is already configured for this repository, which does not need a workflow to run
1413
trivy:
1514
name: Trivy security scan
1615
runs-on: ubuntu-latest
@@ -25,15 +24,15 @@ jobs:
2524
scan-type: fs
2625
ignore-unfixed: true
2726
exit-code: 1
28-
severity: 'HIGH,CRITICAL'
27+
severity: 'CRITICAL'
2928

3029
- name: Run Trivy vulnerability scanner sarif output
3130
uses: aquasecurity/trivy-action@master
3231
if: ${{ github.event.schedule }} # Generate sarif when running periodically
3332
with:
3433
scan-type: fs
3534
ignore-unfixed: true
36-
severity: 'HIGH,CRITICAL'
35+
severity: 'CRITICAL'
3736
format: 'template'
3837
template: '@/contrib/sarif.tpl'
3938
output: 'trivy-results.sarif'

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,38 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## 1.4.1
9+
### Changed
10+
- Bump go version and dependencies
11+
12+
## 1.4.0
13+
### Changed
14+
- Update Kubernetes Go dependencies to latest versions
15+
16+
## 1.3.1
17+
### Changed
18+
- CI/CD pipeline migrated to GitHub Actions
19+
20+
## 1.3.0
21+
### Changelog
22+
23+
- Docs update
24+
- Check if command line args were provided
25+
- Add Open Source Policy Workflow (#11)
26+
- Close request body
27+
- Added auto-detection for kubelet client config by using --auto_config cmd line arg
28+
- b226a2f trigger pipeline
29+
- Update linter version
30+
31+
32+
## 1.2.0
33+
### Changelog
34+
35+
- Filter non-running containers
36+
- Update gcp.yaml.template
37+
- Update minikube.yaml
38+
- Fixed failing test
39+
840
## 1.1.0
941
### Changed
1042
- Optional `insecure` flag has been deprecated in favor of `tls`

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.16-alpine AS build
1+
FROM golang:1.18-alpine AS build
22
RUN apk add --no-cache --update git make
33

44
WORKDIR /go/src/github.com/newrelic/nri-discovery-kubernetes

Dockerfile.release

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM alpine:3.13
1+
FROM alpine:3.16
22

33
RUN apk add --no-cache --upgrade ca-certificates
44

55
USER nobody
66
COPY nri-discovery-kubernetes /bin/nri-discovery-kubernetes
77

8-
ENTRYPOINT ["/bin/nri-discovery-kubernetes"]
8+
ENTRYPOINT ["/bin/nri-discovery-kubernetes"]

Makefile

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,8 @@ ifneq ("$(GOARCH)" "$(NATIVEARCH)")
6767
endif
6868
endif
6969

70-
snyk: deps-only
71-
@echo "=== $(PROJECT) === [ snyk ]: Running snyk..."
72-
@snyk test --file=go.mod --org=ohai
73-
74-
snyk/monitor: deps-only
75-
@echo "=== $(PROJECT) === [ snyk/monitor ]: Running snyk..."
76-
@snyk monitor --file=go.mod --org=ohai
77-
7870
# Include thematic Makefiles
7971
include $(CURDIR)/build/ci.mk
8072
include $(CURDIR)/build/release.mk
8173

82-
.PHONY: all fmt build clean tools tools-update deps deps-only validate compile compile-only test check-version tools-golangci-lint docker-build release release/deps release/test snyk snyk/monitor docker-release
74+
.PHONY: all fmt build clean tools tools-update deps deps-only validate compile compile-only test check-version tools-golangci-lint docker-build release release/deps release/test docker-release

build/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.16-buster
1+
FROM golang:1.18-buster
22

33
ARG GH_VERSION='1.10.3'
44

build/ci.mk

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,6 @@ ci/test: ci/deps
3535
-w /go/src/github.com/newrelic/nri-$(INTEGRATION) \
3636
$(BUILDER_TAG) make test
3737

38-
.PHONY : ci/snyk-test
39-
ci/snyk-test:
40-
@docker run --rm -t \
41-
--name "nri-$(INTEGRATION)-snyk-test" \
42-
-v $(CURDIR):/go/src/github.com/newrelic/nri-$(INTEGRATION) \
43-
-w /go/src/github.com/newrelic/nri-$(INTEGRATION) \
44-
-e SNYK_TOKEN \
45-
snyk/snyk:golang snyk test --severity-threshold=high
46-
4738
.PHONY : ci/build
4839
ci/build: ci/deps
4940
ifdef TAG
@@ -78,4 +69,4 @@ ifdef TAG
7869
else
7970
@echo "===> $(INTEGRATION) === [ci/prerelease] TAG env variable expected to be set"
8071
exit 1
81-
endif
72+
endif

go.mod

Lines changed: 66 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,74 @@
11
module github.com/newrelic/nri-discovery-kubernetes
22

3-
go 1.13
3+
go 1.18
44

55
require (
66
github.com/newrelic/nri-kubernetes/v2 v2.8.0
7-
github.com/sirupsen/logrus v1.8.1
7+
github.com/sirupsen/logrus v1.9.0
88
github.com/spf13/pflag v1.0.5
9-
github.com/spf13/viper v1.8.1
10-
github.com/stretchr/testify v1.7.0
11-
k8s.io/api v0.22.0
12-
k8s.io/apimachinery v0.22.0
13-
k8s.io/client-go v0.22.0
9+
github.com/spf13/viper v1.12.0
10+
github.com/stretchr/testify v1.8.0
11+
k8s.io/api v0.24.3
12+
k8s.io/apimachinery v0.24.3
13+
k8s.io/client-go v0.24.3
1414
)
1515

16-
replace github.com/pkg/sftp => github.com/pkg/sftp v1.13.2
16+
require (
17+
github.com/PuerkitoBio/purell v1.1.1 // indirect
18+
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
19+
github.com/davecgh/go-spew v1.1.1 // indirect
20+
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
21+
github.com/fsnotify/fsnotify v1.5.4 // indirect
22+
github.com/go-logr/logr v1.2.0 // indirect
23+
github.com/go-openapi/jsonpointer v0.19.5 // indirect
24+
github.com/go-openapi/jsonreference v0.19.5 // indirect
25+
github.com/go-openapi/swag v0.19.14 // indirect
26+
github.com/gogo/protobuf v1.3.2 // indirect
27+
github.com/golang/protobuf v1.5.2 // indirect
28+
github.com/google/gnostic v0.5.7-v3refs // indirect
29+
github.com/google/gofuzz v1.2.0 // indirect
30+
github.com/hashicorp/hcl v1.0.0 // indirect
31+
github.com/imdario/mergo v0.3.8 // indirect
32+
github.com/josharian/intern v1.0.0 // indirect
33+
github.com/json-iterator/go v1.1.12 // indirect
34+
github.com/magiconair/properties v1.8.6 // indirect
35+
github.com/mailru/easyjson v0.7.6 // indirect
36+
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
37+
github.com/mitchellh/mapstructure v1.5.0 // indirect
38+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
39+
github.com/modern-go/reflect2 v1.0.2 // indirect
40+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
41+
github.com/newrelic/infra-integrations-sdk v2.0.1-0.20180410150501-14a5386f9150+incompatible // indirect
42+
github.com/pelletier/go-toml v1.9.5 // indirect
43+
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
44+
github.com/pkg/errors v0.9.1 // indirect
45+
github.com/pmezard/go-difflib v1.0.0 // indirect
46+
github.com/prometheus/client_model v0.2.0 // indirect
47+
github.com/prometheus/common v0.26.0 // indirect
48+
github.com/prometheus/prom2json v1.3.0 // indirect
49+
github.com/segmentio/go-camelcase v0.0.0-20160726192923-7085f1e3c734 // indirect
50+
github.com/spf13/afero v1.9.2 // indirect
51+
github.com/spf13/cast v1.5.0 // indirect
52+
github.com/spf13/jwalterweatherman v1.1.0 // indirect
53+
github.com/stretchr/objx v0.4.0 // indirect
54+
github.com/subosito/gotenv v1.4.0 // indirect
55+
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect
56+
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
57+
golang.org/x/sys v0.0.0-20220731174439-a90be440212d // indirect
58+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
59+
golang.org/x/text v0.3.7 // indirect
60+
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
61+
google.golang.org/appengine v1.6.7 // indirect
62+
google.golang.org/protobuf v1.28.0 // indirect
63+
gopkg.in/inf.v0 v0.9.1 // indirect
64+
gopkg.in/ini.v1 v1.66.6 // indirect
65+
gopkg.in/yaml.v2 v2.4.0 // indirect
66+
gopkg.in/yaml.v3 v3.0.1 // indirect
67+
k8s.io/klog/v2 v2.60.1 // indirect
68+
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect
69+
k8s.io/kubelet v0.22.0 // indirect
70+
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
71+
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
72+
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
73+
sigs.k8s.io/yaml v1.2.0 // indirect
74+
)

0 commit comments

Comments
 (0)