Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump sigs.k8s.io/controller-runtime from 0.16.3 to 0.17.0 #183

Merged
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
9 changes: 4 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ on:
tags-ignore:
- "v*"
pull_request:

env:
CGO_ENABLED: 0
GO_VERSION: '1.21'

jobs:
verify:
Expand All @@ -19,10 +21,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.20"

- name: goimports
run: go install golang.org/x/tools/cmd/goimports@latest && goimports -d . | (! grep .)
go-version: "${{ env.GO_VERSION }}"

- name: make vet
run: make vet
Expand All @@ -39,7 +38,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.20"
go-version: "${{ env.GO_VERSION }}"

- name: Unit test
run: make test
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 --platform=$BUILDPLATFORM golang:1.20 AS builder
FROM --platform=$BUILDPLATFORM golang:1.21 AS builder

WORKDIR /workspace

Expand Down
15 changes: 6 additions & 9 deletions api/v1alpha1/zz_generated.deepcopy.go

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

9 changes: 8 additions & 1 deletion config/crd/bases/bmc.tinkerbell.org_jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null
name: jobs.bmc.tinkerbell.org
spec:
group: bmc.tinkerbell.org
Expand Down Expand Up @@ -155,3 +156,9 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
11 changes: 8 additions & 3 deletions config/crd/bases/bmc.tinkerbell.org_machines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null
name: machines.bmc.tinkerbell.org
spec:
group: bmc.tinkerbell.org
Expand Down Expand Up @@ -55,7 +56,6 @@ spec:
secret name must be unique.
type: string
type: object
x-kubernetes-map-type: atomic
host:
description: Host is the host IP address or hostname of the Machine.
minLength: 1
Expand Down Expand Up @@ -147,7 +147,6 @@ spec:
which the secret name must be unique.
type: string
type: object
x-kubernetes-map-type: atomic
type: array
description: Secrets are a map of algorithms to secrets
used for signing.
Expand Down Expand Up @@ -264,3 +263,9 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
11 changes: 8 additions & 3 deletions config/crd/bases/bmc.tinkerbell.org_tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null
name: tasks.bmc.tinkerbell.org
spec:
group: bmc.tinkerbell.org
Expand Down Expand Up @@ -56,7 +57,6 @@ spec:
secret name must be unique.
type: string
type: object
x-kubernetes-map-type: atomic
host:
description: Host is the host IP address or hostname of the Machine.
minLength: 1
Expand Down Expand Up @@ -148,7 +148,6 @@ spec:
which the secret name must be unique.
type: string
type: object
x-kubernetes-map-type: atomic
type: array
description: Secrets are a map of algorithms to secrets
used for signing.
Expand Down Expand Up @@ -309,3 +308,9 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
1 change: 1 addition & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
Expand Down
8 changes: 6 additions & 2 deletions controller/job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ func TestJobReconcile(t *testing.T) {
if task.OwnerReferences[0].Name != tt.job.Name {
t.Fatalf("expected owner reference name %v, got %v", tt.job.Name, task.OwnerReferences[0].Name)
}
if diff := cmp.Diff(task.OwnerReferences[0].Kind, "Job"); diff != "" {
t.Fatal(diff)
if task.OwnerReferences[0].Kind != "Job" {
t.Fatalf("expected OwnerReferences[0].Kind = 'Job', got '%v'", task.OwnerReferences[0].Kind)
}

// Ensure re-reconciling a job does nothing given the task is still outstanding.
Expand Down Expand Up @@ -131,6 +131,10 @@ func createJob(name string, machine *v1alpha1.Machine, t ...v1alpha1.Action) *v1
tasks = t
}
return &v1alpha1.Job{
TypeMeta: metav1.TypeMeta{
APIVersion: v1alpha1.GroupVersion.String(),
Kind: "Job",
},
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: name,
Expand Down
28 changes: 15 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/tinkerbell/rufio

go 1.20
go 1.21

toolchain go1.21.4

require (
dario.cat/mergo v1.0.0
Expand All @@ -15,7 +17,7 @@ require (
k8s.io/api v0.29.0
k8s.io/apimachinery v0.29.0
k8s.io/client-go v0.29.0
sigs.k8s.io/controller-runtime v0.16.3
sigs.k8s.io/controller-runtime v0.17.0
)

require (
Expand All @@ -28,8 +30,8 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
Expand All @@ -49,15 +51,15 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.16.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/satori/go.uuid v1.2.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stmcginnis/gofish v0.15.1-0.20231121142100-22a60a77be91 // indirect
Expand All @@ -66,7 +68,7 @@ require (
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
Expand All @@ -77,12 +79,12 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.28.3 // indirect
k8s.io/component-base v0.28.3 // indirect
k8s.io/apiextensions-apiserver v0.29.0 // indirect
k8s.io/component-base v0.29.0 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
Loading