Skip to content

Commit

Permalink
Merge pull request #58 from k8gb-io/refresh/plugin
Browse files Browse the repository at this point in the history
Bump dependencies
  • Loading branch information
abaguas authored Dec 4, 2024
2 parents 35e643d + a173675 commit 599c35b
Show file tree
Hide file tree
Showing 22 changed files with 995 additions and 1,588 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,35 @@ on:

jobs:
skip-check:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
name: Skip the job?
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v3.4.1
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1
with:
skip_after_successful_duplicate: 'true'
do_not_skip: '["workflow_dispatch", "schedule"]'
# Linting is in a separate job because golangci-lint is quite slow when
# running it in cold-start mode.
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/setup-go@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: '>=1.20.0'
go-version: 1.23.3
- name: Lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
version: v1.51.2
version: v1.60.3
args: --timeout=3m30s
- name: go test
run: go test ./...
- name: golic
run: |
go install github.com/AbsaOSS/golic@v0.7.2
golic inject --dry -x -t apache2 -c "2022 The k8gb Contributors"
golic inject --dry -x -t apache2 -c "2022 The k8gb Contributors"
12 changes: 6 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: 1.18
go-version: 1.23.3
- name: Login to Dockerhub
uses: docker/login-action@v1
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
version: latest
args: release --clean
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/terratest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ on:

jobs:
skip-check:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
name: Skip the job?
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v3.4.1
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1
with:
skip_after_successful_duplicate: 'true'
do_not_skip: '["workflow_dispatch", "schedule"]'

terratest:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
env:
TAG: "ci"
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: 1.18
go-version: 1.23.3
- name: build
run: make build
- name: build image
Expand Down
15 changes: 0 additions & 15 deletions .golangci.toml

This file was deleted.

25 changes: 25 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
run:
timeout: 120s

output:
formats:
- format: colored-line-number

linters:
disable-all: true
enable:
- gocyclo
- unconvert
- goimports
- unused
- misspell
- nakedret
- errcheck
- ineffassign
- goconst
- govet
- unparam
- gofmt

issues:
exclude-use-default: false
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ TAG ?= latest
# Image URL to use all building/pushing image targets
IMG ?= $(REGISTRY)/$(BIN)

GOLINT_VERSION ?= v1.51.2
GOLINT_VERSION ?= v1.60.3

# create GOBIN if not specified
ifndef GOBIN
GOBIN=$(shell go env GOPATH)/bin
endif

# find or download golic
# download golic if necessary
Expand Down Expand Up @@ -57,12 +62,15 @@ clean:
go clean
rm -f coredns

image:
image: build
docker build . -t ${IMG}:${TAG}

create-local-cluster:
k3d cluster create -c k3d-cluster.yaml

destroy-local-cluster:
k3d cluster delete coredns-crd

import-image:
k3d image import -c coredns-crd absaoss/k8s_crd:${TAG}

Expand Down Expand Up @@ -93,7 +101,7 @@ test:
go test $$(go list ./... | grep -Ev '/mocks|/terratest|/netutils|/cmd') --cover

mocks:
go install github.com/golang/mock/mockgen@v1.5.0
go install go.uber.org/mock/mockgen@v0.4.0
mockgen -destination=common/mocks/client_mock.go -package=mocks k8s.io/client-go/rest Interface
mockgen -destination=common/mocks/cache_mock.go -package=mocks k8s.io/client-go/tools/cache SharedIndexInformer
mockgen -destination=common/mocks/index_mock.go -package=mocks k8s.io/client-go/tools/cache Indexer
Expand Down
2 changes: 1 addition & 1 deletion charts/coredns/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ appVersion: 0.1.0
dependencies:
- name: coredns
repository: https://coredns.github.io/helm
version: 1.14.0
version: 1.36.1
6 changes: 3 additions & 3 deletions charts/coredns/requirements.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: coredns
repository: https://coredns.github.io/helm
version: 1.14.0
digest: sha256:3a6b4ca5f4e2be5a9d5c65320b975001f14a02a7eb258f922e68a9f37013e4db
generated: "2021-02-08T11:28:20.527962+01:00"
version: 1.36.1
digest: sha256:55c867121c6aa4e926387802c02cd44e4c0f26439b79a73dbf4ff750c1e6f743
generated: "2024-12-01T21:51:33.968526+01:00"
2 changes: 1 addition & 1 deletion common/k8sctrl/ctrl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ import (
"unsafe"

"github.com/AbsaOSS/k8s_crd/common/mocks"
"go.uber.org/mock/gomock"

"sigs.k8s.io/external-dns/endpoint"

dnsendpoint "github.com/AbsaOSS/k8s_crd/extdns"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"k8s.io/client-go/rest"
)
Expand Down
61 changes: 50 additions & 11 deletions common/mocks/cache_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions common/mocks/client_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 599c35b

Please sign in to comment.