Skip to content

Commit 0663a8e

Browse files
Update dependencies, resolve deprecations (#334)
* Bump the global group across 1 directory with 8 updates Bumps the global group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github.com/chia-network/go-chia-libs](https://github.com/chia-network/go-chia-libs) | `1.2.3` | `1.3.2` | | [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) | `2.27.3` | `2.28.2` | | [k8s.io/api](https://github.com/kubernetes/api) | `0.35.0` | `0.36.0` | | [k8s.io/client-go](https://github.com/kubernetes/client-go) | `0.35.0` | `0.36.0` | | [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) | `0.22.4` | `0.23.3` | Updates `github.com/chia-network/go-chia-libs` from 1.2.3 to 1.3.2 - [Release notes](https://github.com/chia-network/go-chia-libs/releases) - [Commits](Chia-Network/go-chia-libs@v1.2.3...v1.3.2) Updates `github.com/onsi/ginkgo/v2` from 2.27.3 to 2.28.2 - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](onsi/ginkgo@v2.27.3...v2.28.2) Updates `github.com/onsi/gomega` from 1.38.3 to 1.39.0 - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](onsi/gomega@v1.38.3...v1.39.0) Updates `k8s.io/api` from 0.35.0 to 0.36.0 - [Commits](kubernetes/api@v0.35.0...v0.36.0) Updates `k8s.io/apimachinery` from 0.35.0 to 0.36.0 - [Commits](kubernetes/apimachinery@v0.35.0...v0.36.0) Updates `k8s.io/client-go` from 0.35.0 to 0.36.0 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.35.0...v0.36.0) Updates `k8s.io/utils` from 0.0.0-20251220205832-9d40a56c1308 to 0.0.0-20260210185600-b8788abfbbc2 - [Commits](https://github.com/kubernetes/utils/commits) Updates `sigs.k8s.io/controller-runtime` from 0.22.4 to 0.23.3 - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](kubernetes-sigs/controller-runtime@v0.22.4...v0.23.3) --- updated-dependencies: - dependency-name: github.com/chia-network/go-chia-libs dependency-version: 1.3.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: global - dependency-name: github.com/onsi/ginkgo/v2 dependency-version: 2.28.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: global - dependency-name: github.com/onsi/gomega dependency-version: 1.39.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: global - dependency-name: k8s.io/api dependency-version: 0.36.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: global - dependency-name: k8s.io/apimachinery dependency-version: 0.36.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: global - dependency-name: k8s.io/client-go dependency-version: 0.36.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: global - dependency-name: k8s.io/utils dependency-version: 0.0.0-20260210185600-b8788abfbbc2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: global - dependency-name: sigs.k8s.io/controller-runtime dependency-version: 0.23.3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: global ... Signed-off-by: dependabot[bot] <support@github.com> * Update controller-runtime and regenerate manifests * Update go modules * make manifests and generate again * Migrate to new event recorder API * Migrate past scheme.Builder and client.Apply deprecations --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Starttoaster <b.butler@chia.net>
1 parent bae5ddb commit 0663a8e

29 files changed

Lines changed: 398 additions & 356 deletions

api/v1/groupversion_info.go

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,37 @@ Copyright 2023 Chia Network Inc.
88
package v1
99

1010
import (
11+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
12+
"k8s.io/apimachinery/pkg/runtime"
1113
"k8s.io/apimachinery/pkg/runtime/schema"
12-
"sigs.k8s.io/controller-runtime/pkg/scheme"
1314
)
1415

1516
var (
1617
// GroupVersion is group version used to register these objects
1718
GroupVersion = schema.GroupVersion{Group: "k8s.chia.net", Version: "v1"}
1819

1920
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
20-
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
21+
SchemeBuilder = &builder{}
2122

2223
// AddToScheme adds the types in this group-version to the given scheme.
2324
AddToScheme = SchemeBuilder.AddToScheme
2425
)
26+
27+
// builder is a thin wrapper around runtime.SchemeBuilder that preserves the
28+
// concise `Register(&Foo{}, &FooList{})` call shape used in this api package's
29+
// per-types init() functions. We avoid sigs.k8s.io/controller-runtime/pkg/scheme
30+
// (deprecated) so that this api package stays cheap to import.
31+
type builder struct {
32+
runtime.SchemeBuilder
33+
}
34+
35+
// Register adds one or more types to the SchemeBuilder under GroupVersion and
36+
// also ensures the standard meta/v1 types are added to the same group-version
37+
// the first time the registered functions are applied to a Scheme.
38+
func (b *builder) Register(objects ...runtime.Object) {
39+
b.SchemeBuilder.Register(func(scheme *runtime.Scheme) error {
40+
scheme.AddKnownTypes(GroupVersion, objects...)
41+
metav1.AddToGroupVersion(scheme, GroupVersion)
42+
return nil
43+
})
44+
}

api/v1/zz_generated.deepcopy.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/main.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,95 +89,95 @@ func main() {
8989
if err = (&chianode.ChiaNodeReconciler{
9090
Client: mgr.GetClient(),
9191
Scheme: mgr.GetScheme(),
92-
Recorder: mgr.GetEventRecorderFor("chianode-controller"),
92+
Recorder: mgr.GetEventRecorder("chianode-controller"),
9393
}).SetupWithManager(mgr); err != nil {
9494
setupLog.Error(err, "unable to create controller", "controller", "ChiaNode")
9595
os.Exit(1)
9696
}
9797
if err = (&chiafarmer.ChiaFarmerReconciler{
9898
Client: mgr.GetClient(),
9999
Scheme: mgr.GetScheme(),
100-
Recorder: mgr.GetEventRecorderFor("chiafarmer-controller"),
100+
Recorder: mgr.GetEventRecorder("chiafarmer-controller"),
101101
}).SetupWithManager(mgr); err != nil {
102102
setupLog.Error(err, "unable to create controller", "controller", "ChiaFarmer")
103103
os.Exit(1)
104104
}
105105
if err = (&chiaharvester.ChiaHarvesterReconciler{
106106
Client: mgr.GetClient(),
107107
Scheme: mgr.GetScheme(),
108-
Recorder: mgr.GetEventRecorderFor("chiaharvester-controller"),
108+
Recorder: mgr.GetEventRecorder("chiaharvester-controller"),
109109
}).SetupWithManager(mgr); err != nil {
110110
setupLog.Error(err, "unable to create controller", "controller", "ChiaHarvester")
111111
os.Exit(1)
112112
}
113113
if err = (&chiaca.ChiaCAReconciler{
114114
Client: mgr.GetClient(),
115115
Scheme: mgr.GetScheme(),
116-
Recorder: mgr.GetEventRecorderFor("chiaca-controller"),
116+
Recorder: mgr.GetEventRecorder("chiaca-controller"),
117117
}).SetupWithManager(mgr); err != nil {
118118
setupLog.Error(err, "unable to create controller", "controller", "ChiaCA")
119119
os.Exit(1)
120120
}
121121
if err = (&chiawallet.ChiaWalletReconciler{
122122
Client: mgr.GetClient(),
123123
Scheme: mgr.GetScheme(),
124-
Recorder: mgr.GetEventRecorderFor("chiawallet-controller"),
124+
Recorder: mgr.GetEventRecorder("chiawallet-controller"),
125125
}).SetupWithManager(mgr); err != nil {
126126
setupLog.Error(err, "unable to create controller", "controller", "ChiaWallet")
127127
os.Exit(1)
128128
}
129129
if err = (&chiatimelord.ChiaTimelordReconciler{
130130
Client: mgr.GetClient(),
131131
Scheme: mgr.GetScheme(),
132-
Recorder: mgr.GetEventRecorderFor("chiatimelord-controller"),
132+
Recorder: mgr.GetEventRecorder("chiatimelord-controller"),
133133
}).SetupWithManager(mgr); err != nil {
134134
setupLog.Error(err, "unable to create controller", "controller", "ChiaTimelord")
135135
os.Exit(1)
136136
}
137137
if err = (&chiaseeder.ChiaSeederReconciler{
138138
Client: mgr.GetClient(),
139139
Scheme: mgr.GetScheme(),
140-
Recorder: mgr.GetEventRecorderFor("chiaseeder-controller"),
140+
Recorder: mgr.GetEventRecorder("chiaseeder-controller"),
141141
}).SetupWithManager(mgr); err != nil {
142142
setupLog.Error(err, "unable to create controller", "controller", "ChiaSeeder")
143143
os.Exit(1)
144144
}
145145
if err = (&chiaintroducer.ChiaIntroducerReconciler{
146146
Client: mgr.GetClient(),
147147
Scheme: mgr.GetScheme(),
148-
Recorder: mgr.GetEventRecorderFor("chiaintroducer-controller"),
148+
Recorder: mgr.GetEventRecorder("chiaintroducer-controller"),
149149
}).SetupWithManager(mgr); err != nil {
150150
setupLog.Error(err, "unable to create controller", "controller", "ChiaIntroducer")
151151
os.Exit(1)
152152
}
153153
if err = (&chiacrawler.ChiaCrawlerReconciler{
154154
Client: mgr.GetClient(),
155155
Scheme: mgr.GetScheme(),
156-
Recorder: mgr.GetEventRecorderFor("chiacrawler-controller"),
156+
Recorder: mgr.GetEventRecorder("chiacrawler-controller"),
157157
}).SetupWithManager(mgr); err != nil {
158158
setupLog.Error(err, "unable to create controller", "controller", "ChiaCrawler")
159159
os.Exit(1)
160160
}
161161
if err = (&chianetwork.ChiaNetworkReconciler{
162162
Client: mgr.GetClient(),
163163
Scheme: mgr.GetScheme(),
164-
Recorder: mgr.GetEventRecorderFor("chianetwork-controller"),
164+
Recorder: mgr.GetEventRecorder("chianetwork-controller"),
165165
}).SetupWithManager(mgr); err != nil {
166166
setupLog.Error(err, "unable to create controller", "controller", "ChiaNetwork")
167167
os.Exit(1)
168168
}
169169
if err = (&chiadatalayer.ChiaDataLayerReconciler{
170170
Client: mgr.GetClient(),
171171
Scheme: mgr.GetScheme(),
172-
Recorder: mgr.GetEventRecorderFor("chiadatalayer-controller"),
172+
Recorder: mgr.GetEventRecorder("chiadatalayer-controller"),
173173
}).SetupWithManager(mgr); err != nil {
174174
setupLog.Error(err, "unable to create controller", "controller", "ChiaDataLayer")
175175
os.Exit(1)
176176
}
177177
if err = (&chiacertificates.ChiaCertificatesReconciler{
178178
Client: mgr.GetClient(),
179179
Scheme: mgr.GetScheme(),
180-
Recorder: mgr.GetEventRecorderFor("chiacertificates-controller"),
180+
Recorder: mgr.GetEventRecorder("chiacertificates-controller"),
181181
}).SetupWithManager(mgr); err != nil {
182182
setupLog.Error(err, "unable to create controller", "controller", "ChiaCertificates")
183183
os.Exit(1)

config/crd/bases/k8s.chia.net_chiacrawlers.yaml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,6 @@ spec:
18771877
procMount denotes the type of proc mount to use for the containers.
18781878
The default value is Default which uses the container runtime defaults for
18791879
readonly paths and masked paths.
1880-
This requires the ProcMountType feature flag to be enabled.
18811880
Note that this field cannot be set when spec.os.name is windows.
18821881
type: string
18831882
readOnlyRootFilesystem:
@@ -2320,7 +2319,6 @@ spec:
23202319
procMount denotes the type of proc mount to use for the containers.
23212320
The default value is Default which uses the container runtime defaults for
23222321
readonly paths and masked paths.
2323-
This requires the ProcMountType feature flag to be enabled.
23242322
Note that this field cannot be set when spec.os.name is windows.
23252323
type: string
23262324
readOnlyRootFilesystem:
@@ -3651,7 +3649,6 @@ spec:
36513649
procMount denotes the type of proc mount to use for the containers.
36523650
The default value is Default which uses the container runtime defaults for
36533651
readonly paths and masked paths.
3654-
This requires the ProcMountType feature flag to be enabled.
36553652
Note that this field cannot be set when spec.os.name is windows.
36563653
type: string
36573654
readOnlyRootFilesystem:
@@ -5007,7 +5004,7 @@ spec:
50075004
A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message.
50085005
The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field.
50095006
The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images.
5010-
The volume will be mounted read-only (ro) and non-executable files (noexec).
5007+
The volume will be mounted read-only (ro).
50115008
Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33.
50125009
The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.
50135010
properties:
@@ -5179,8 +5176,7 @@ spec:
51795176
description: |-
51805177
portworxVolume represents a portworx volume attached and mounted on kubelets host machine.
51815178
Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type
5182-
are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate
5183-
is on.
5179+
are redirected to the pxd.portworx.com CSI driver.
51845180
properties:
51855181
fsType:
51865182
description: |-
@@ -7363,7 +7359,6 @@ spec:
73637359
procMount denotes the type of proc mount to use for the containers.
73647360
The default value is Default which uses the container runtime defaults for
73657361
readonly paths and masked paths.
7366-
This requires the ProcMountType feature flag to be enabled.
73677362
Note that this field cannot be set when spec.os.name is windows.
73687363
type: string
73697364
readOnlyRootFilesystem:
@@ -8719,7 +8714,7 @@ spec:
87198714
A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message.
87208715
The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field.
87218716
The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images.
8722-
The volume will be mounted read-only (ro) and non-executable files (noexec).
8717+
The volume will be mounted read-only (ro).
87238718
Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33.
87248719
The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.
87258720
properties:
@@ -8891,8 +8886,7 @@ spec:
88918886
description: |-
88928887
portworxVolume represents a portworx volume attached and mounted on kubelets host machine.
88938888
Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type
8894-
are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate
8895-
is on.
8889+
are redirected to the pxd.portworx.com CSI driver.
88968890
properties:
88978891
fsType:
88988892
description: |-

config/crd/bases/k8s.chia.net_chiadatalayers.yaml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,7 +1912,6 @@ spec:
19121912
procMount denotes the type of proc mount to use for the containers.
19131913
The default value is Default which uses the container runtime defaults for
19141914
readonly paths and masked paths.
1915-
This requires the ProcMountType feature flag to be enabled.
19161915
Note that this field cannot be set when spec.os.name is windows.
19171916
type: string
19181917
readOnlyRootFilesystem:
@@ -2369,7 +2368,6 @@ spec:
23692368
procMount denotes the type of proc mount to use for the containers.
23702369
The default value is Default which uses the container runtime defaults for
23712370
readonly paths and masked paths.
2372-
This requires the ProcMountType feature flag to be enabled.
23732371
Note that this field cannot be set when spec.os.name is windows.
23742372
type: string
23752373
readOnlyRootFilesystem:
@@ -3387,7 +3385,6 @@ spec:
33873385
procMount denotes the type of proc mount to use for the containers.
33883386
The default value is Default which uses the container runtime defaults for
33893387
readonly paths and masked paths.
3390-
This requires the ProcMountType feature flag to be enabled.
33913388
Note that this field cannot be set when spec.os.name is windows.
33923389
type: string
33933390
readOnlyRootFilesystem:
@@ -4876,7 +4873,6 @@ spec:
48764873
procMount denotes the type of proc mount to use for the containers.
48774874
The default value is Default which uses the container runtime defaults for
48784875
readonly paths and masked paths.
4879-
This requires the ProcMountType feature flag to be enabled.
48804876
Note that this field cannot be set when spec.os.name is windows.
48814877
type: string
48824878
readOnlyRootFilesystem:
@@ -6232,7 +6228,7 @@ spec:
62326228
A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message.
62336229
The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field.
62346230
The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images.
6235-
The volume will be mounted read-only (ro) and non-executable files (noexec).
6231+
The volume will be mounted read-only (ro).
62366232
Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33.
62376233
The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.
62386234
properties:
@@ -6404,8 +6400,7 @@ spec:
64046400
description: |-
64056401
portworxVolume represents a portworx volume attached and mounted on kubelets host machine.
64066402
Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type
6407-
are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate
6408-
is on.
6403+
are redirected to the pxd.portworx.com CSI driver.
64096404
properties:
64106405
fsType:
64116406
description: |-
@@ -8588,7 +8583,6 @@ spec:
85888583
procMount denotes the type of proc mount to use for the containers.
85898584
The default value is Default which uses the container runtime defaults for
85908585
readonly paths and masked paths.
8591-
This requires the ProcMountType feature flag to be enabled.
85928586
Note that this field cannot be set when spec.os.name is windows.
85938587
type: string
85948588
readOnlyRootFilesystem:
@@ -9944,7 +9938,7 @@ spec:
99449938
A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message.
99459939
The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field.
99469940
The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images.
9947-
The volume will be mounted read-only (ro) and non-executable files (noexec).
9941+
The volume will be mounted read-only (ro).
99489942
Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33.
99499943
The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.
99509944
properties:
@@ -10116,8 +10110,7 @@ spec:
1011610110
description: |-
1011710111
portworxVolume represents a portworx volume attached and mounted on kubelets host machine.
1011810112
Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type
10119-
are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate
10120-
is on.
10113+
are redirected to the pxd.portworx.com CSI driver.
1012110114
properties:
1012210115
fsType:
1012310116
description: |-

0 commit comments

Comments
 (0)