Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ on:
- master

env:
GO_VERSION: '1.17.6'
GO_VERSION: '1.23.8'
KIND_VERSION: 'v0.12.0'

jobs:
e2e-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Check out code into the Go module directory
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ on:

env:
# Common versions
GO_VERSION: '1.17.6'
GO_VERSION: '1.23.8'
KIND_VERSION: 'v0.7.0'

jobs:
detect-noop:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
Expand All @@ -32,7 +32,7 @@ jobs:
concurrent_skipping: false

make-reviewable:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.23
- name: Get release
id: get_release
uses: bruceadams/[email protected]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

env:
# Common versions
GO_VERSION: '1.17.6'
GO_VERSION: '1.23.8'

jobs:
lint:
Expand All @@ -31,7 +31,7 @@ jobs:
make lint

unit-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Set up Go
Expand All @@ -46,7 +46,7 @@ jobs:
submodules: true

- name: Cache Go Dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
Expand Down
17 changes: 12 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ run:
timeout: 10m

skip-files:
- "zz_generated\\..+\\.go$"
- ".*_test.go$"


output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
formats: colored-line-number

linters-settings:
errcheck:
Expand All @@ -22,7 +21,7 @@ linters-settings:
# [deprecated] comma-separated list of pairs of the form pkg:regex
# the regex is used to ignore names within pkg. (default "fmt:.*").
# see https://github.com/kisielk/errcheck#the-deprecated-method for details
ignore: fmt:.*,io/ioutil:^Read.*
exclude-functions: fmt:.*,io/ioutil:^Read.*

exhaustive:
# indicates that switch statements are to be considered exhaustive if a
Expand Down Expand Up @@ -100,7 +99,6 @@ linters-settings:

linters:
enable:
- megacheck
- govet
- gocyclo
- gocritic
Expand All @@ -111,6 +109,9 @@ linters:
- unconvert
- misspell
- nakedret
- staticcheck
- gosimple
- unused

presets:
- bugs
Expand All @@ -119,6 +120,12 @@ linters:


issues:
exclude-files:
# Exclude files that are generated by controller-gen.
- "zz_generated\\..+\\.go$"
# Exclude test files.
- ".*_test.go$"

# Excluding configuration per-path and per-linter
exclude-rules:
# Exclude some linters from running on tests files.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.17-alpine as builder
FROM golang:1.23-alpine as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
IMG ?= oamdev/terraform-controller:0.2.8

# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:trivialVersions=true"
CRD_OPTIONS ?= "crd"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing trivialVersions=true from CRD_OPTIONS may cause issues with CRD compatibility for clusters older than Kubernetes 1.13, as version conversion will not be handled. Ensure this is intentional and compatible with your supported Kubernetes versions.

Suggested change
CRD_OPTIONS ?= "crd"
CRD_OPTIONS ?= "crd:trivialVersions=true"


TIME_SHORT = `date +%H:%M:%S`
TIME = $(TIME_SHORT)
Expand Down Expand Up @@ -82,15 +82,15 @@ ifeq (, $(shell which controller-gen))
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
cd $$CONTROLLER_GEN_TMP_DIR ;\
go mod init tmp ;\
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.2 ;\
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.5 ;\
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
}
CONTROLLER_GEN=$(GOBIN)/controller-gen
else
CONTROLLER_GEN=$(shell which controller-gen)
endif

GOLANGCILINT_VERSION ?= v1.50.1
GOLANGCILINT_VERSION ?= v1.60.1
HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
HOSTARCH := $(shell uname -m)
ifeq ($(HOSTARCH),x86_64)
Expand Down Expand Up @@ -131,7 +131,7 @@ goimports:
ifeq (, $(shell which goimports))
@{ \
set -e ;\
GO111MODULE=off go get -u golang.org/x/tools/cmd/goimports ;\
go install golang.org/x/tools/cmd/goimports@latest ;\
}
GOIMPORTS=$(GOBIN)/goimports
else
Expand Down
3 changes: 1 addition & 2 deletions api/v1beta1/zz_generated.deepcopy.go

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

4 changes: 2 additions & 2 deletions api/v1beta2/zz_generated.deepcopy.go

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

Loading
Loading