Skip to content

Commit 06bfecd

Browse files
Bump sigs.k8s.io/controller-runtime from 0.6.4 to 0.7.0 (#139)
Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.6.4 to 0.7.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/kubernetes-sigs/controller-runtime/releases">sigs.k8s.io/controller-runtime's releases</a>.</em></p> <blockquote> <h2>v0.7.0</h2> <h2>Changes since v0.6.4</h2> <h2>:warning: Breaking Changes</h2> <h3>Use <code>client.Object</code> &amp; <code>client.ObjectList</code></h3> <p>A number of methods that previously took <code>runtime.Object</code> &amp; internally type-asserted them to <code>metav1.Object</code> now take <code>client.Object</code> (for non-list objects) or <code>client.ObjectList</code> (for lists). The practical upshot of this is more type-safety and clarity around what's required for particular methods.</p> <p>All concrete API types (anything that implements <code>runtime.Object</code> &amp; has a <code>metadata</code> field) already implement <code>client.Object</code> or <code>client.ObjectList</code>, so practical impact should be limited to folks who pass around <code>runtime.Object</code> values instead of concrete types.</p> <ul> <li>Introduce and use client.Object and client.ObjectList (<a href="https://github-redirect.dependabot.com/kubernetes-sigs/controller-runtime/issues/1195">#1195</a>)</li> <li>Use client.Object for event handlers (<a href="https://github-redirect.dependabot.com/kubernetes-sigs/controller-runtime/issues/1118">#1118</a>)</li> <li>Fakeclient: Allow to pass ObjectLists to constructors (<a href="https://github-redirect.dependabot.com/kubernetes-sigs/controller-runtime/issues/1259">#1259</a>)</li> <li>client.ObjectKeyFromObject now uses client.Object (<a href="https://github-redirect.dependabot.com/kubernetes-sigs/controller-runtime/issues/1224">#1224</a>)</li> <li>Handler: Remove MapObject type and use client.Object directly (<a href="https://github-redirect.dependabot.com/kubernetes-sigs/controller-runtime/issues/1207">#1207</a>)</li> <li>Use client.Object interface in envtest (<a href="https://github-redirect.dependabot.com/kubernetes-sigs/controller-runtime/issues/1200">#1200</a>)</li> </ul> <h3>High-Impact</h3> <ul> <li> <p>pkg/webhook/admission: upgrade v1beta1 admission types to v1 (<a href="https://github-redirect.dependabot.com/kubernetes-sigs/controller-runtime/issues/1284">#1284</a>)</p> <p>Impact: construct <code>v1</code> Go types instead of <code>v1beta1</code>. Both versions are supported on the wire.</p> </li> <li> <p>Change leaderlock from ConfigMap to ConfigMapsLeasesResourceLock (<a href="https://github-redirect.dependabot.com/kubernetes-sigs/controller-runtime/issues/1144">#1144</a>)</p> <p>Impact: New RBAC permissions are needed by default for leaderelection (for the <code>coordination/v1</code> API). The new lock will automatically deal with existing configmap locks (e.g. during upgrades). The can be set to its previous value (&quot;configmaps&quot;) in manager.Options.</p> </li> <li> <p>Propagate context.Context throughout the codebase (<a href="https://github-redirect.dependabot.com/kubernetes-sigs/controller-runtime/issues/1116">#1116</a>)</p> <p>Impact: update various methods to accept a <code>context.Context</code> object, which can be used to structure timeouts and stopping loops/operations in lieu of channels</p> </li> <li> <p>Change default webhook port to 9443 (<a href="https://github-redirect.dependabot.com/kubernetes-sigs/controller-runtime/issues/1076">#1076</a>)</p> <p>Impact: update your deployment configuration to use port 9443, or manually configure the webhook port in manager <code>Options</code>.</p> </li> <li> <p>Remove logs from internal controller (<a href="https://github-redirect.dependabot.com/kubernetes-sigs/controller-runtime/issues/1096">#1096</a>)</p> <p>Impact: automatic logs for &quot;succesful reconcile&quot; no longer exist (it tended to duplicate manual logs that folks had in place).</p> </li> <li> <p>Remove deprecated &quot;--master&quot; flag (<a href="https://github-redirect.dependabot.com/kubernetes-sigs/controller-runtime/issues/1039">#1039</a>)</p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/kubernetes-sigs/controller-runtime/commit/f7a3dc6a7650289b6ca7afca12b97819329b0d06"><code>f7a3dc6</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/kubernetes-sigs/controller-runtime/issues/1293">#1293</a> from estroz/bugfix/webhook-admissionreview-version</li> <li><a href="https://github.com/kubernetes-sigs/controller-runtime/commit/27ef22922946a10336d7fbd08a1ba564650133a4"><code>27ef229</code></a> pkg/webhook/admission: set GVK on AdmissionReview responses</li> <li><a href="https://github.com/kubernetes-sigs/controller-runtime/commit/3410e75b087895ff6cd79b6c28dd31c2145c813d"><code>3410e75</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/kubernetes-sigs/controller-runtime/issues/1289">#1289</a> from timebertt/fix/inject-manager-logger</li> <li><a href="https://github.com/kubernetes-sigs/controller-runtime/commit/b9197efcd514d3d1e012ef73e421e85ba8976356"><code>b9197ef</code></a> 🐛 Inject manager's logger instead of internal one</li> <li><a href="https://github.com/kubernetes-sigs/controller-runtime/commit/43331a6c8f823b497660b368deb4311ae2030206"><code>43331a6</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/kubernetes-sigs/controller-runtime/issues/1288">#1288</a> from vincepri/add-test-unstrucutred-list</li> <li><a href="https://github.com/kubernetes-sigs/controller-runtime/commit/52ba5463f385f408aaa2b47d8dfdeeb1ac579bce"><code>52ba546</code></a> Add test that checks List works on UnstructuredList not in Scheme</li> <li><a href="https://github.com/kubernetes-sigs/controller-runtime/commit/758d2684971b0d824e001098af7cf7e894b4caad"><code>758d268</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/kubernetes-sigs/controller-runtime/issues/1284">#1284</a> from estroz/feature/wh-admissionreview-v1</li> <li><a href="https://github.com/kubernetes-sigs/controller-runtime/commit/8161d1cd5454f753293015dc6172bafccbe65c27"><code>8161d1c</code></a> pkg/webhook/admission: upgrade v1beta1 admission types to v1</li> <li><a href="https://github.com/kubernetes-sigs/controller-runtime/commit/f349d96a9accb8997d162a8b206d7b3ffa7cb369"><code>f349d96</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/kubernetes-sigs/controller-runtime/issues/1281">#1281</a> from vincepri/fake-client-builder</li> <li><a href="https://github.com/kubernetes-sigs/controller-runtime/commit/d915eb1a8c72db5587241cb612b4e901df20d45f"><code>d915eb1</code></a> ✨ Add fake.NewClientBuilder to build new fake clients</li> <li>Additional commits viewable in <a href="https://github.com/kubernetes-sigs/controller-runtime/compare/v0.6.4...v0.7.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sigs.k8s.io/controller-runtime&package-manager=go_modules&previous-version=0.6.4&new-version=0.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
1 parent ceb92c8 commit 06bfecd

7 files changed

+97
-87
lines changed

config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml

+17-21
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,14 @@ spec:
210210
type: string
211211
nodePort:
212212
description: 'The port on each node on which this service is exposed
213-
when type=NodePort or LoadBalancer. Usually assigned by the
214-
system. If specified, it will be allocated to the service if
215-
unused or else creation of the service will fail. Default is
216-
to auto-allocate a port if the ServiceType of this Service requires
217-
one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport'
213+
when type is NodePort or LoadBalancer. Usually assigned by
214+
the system. If a value is specified, in-range, and not in use
215+
it will be used, otherwise the operation will fail. If not
216+
specified, a port will be allocated if this Service requires
217+
one. If this field is specified when creating a Service which
218+
does not need it, creation will fail. This field will be wiped
219+
when updating a Service to no longer need it (e.g. changing
220+
type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport'
218221
format: int32
219222
type: integer
220223
port:
@@ -730,20 +733,15 @@ spec:
730733
type: array
731734
dataSource:
732735
description: 'This field can be used to specify either:
733-
* An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot
734-
- Beta) * An existing PVC (PersistentVolumeClaim)
735-
* An existing custom resource/object that implements
736-
data population (Alpha) In order to use VolumeSnapshot
737-
object types, the appropriate feature gate must
738-
be enabled (VolumeSnapshotDataSource or AnyVolumeDataSource)
739-
If the provisioner or an external controller can
740-
support the specified data source, it will create
741-
a new volume based on the contents of the specified
742-
data source. If the specified data source is not
743-
supported, the volume will not be created and the
744-
failure will be reported as an event. In the future,
745-
we plan to support more data source types and the
746-
behavior of the provisioner may change.'
736+
* An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
737+
* An existing PVC (PersistentVolumeClaim) * An existing
738+
custom resource that implements data population
739+
(Alpha) In order to use custom resource types that
740+
implement data population, the AnyVolumeDataSource
741+
feature gate must be enabled. If the provisioner
742+
or an external controller can support the specified
743+
data source, it will create a new volume based on
744+
the contents of the specified data source.'
747745
properties:
748746
apiGroup:
749747
description: APIGroup is the group for the resource
@@ -1431,8 +1429,6 @@ spec:
14311429
type: object
14321430
type: object
14331431
type: array
1434-
required:
1435-
- sources
14361432
type: object
14371433
quobyte:
14381434
description: Quobyte represents a Quobyte mount on the host that

controllers/opentelemetrycollector_controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler {
107107
// +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/status,verbs=get;update;patch
108108

109109
// Reconcile the current state of an OpenTelemetry collector resource with the desired state
110-
func (r *OpenTelemetryCollectorReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
110+
func (r *OpenTelemetryCollectorReconciler) Reconcile(_ context.Context, req ctrl.Request) (ctrl.Result, error) {
111111
ctx := context.Background()
112112
log := r.log.WithValues("opentelemetrycollector", req.NamespacedName)
113113

controllers/opentelemetrycollector_controller_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func TestNewObjectsOnReconciliation(t *testing.T) {
5353
req := k8sreconcile.Request{
5454
NamespacedName: nsn,
5555
}
56-
_, err = reconciler.Reconcile(req)
56+
_, err = reconciler.Reconcile(context.Background(), req)
5757

5858
// verify
5959
require.NoError(t, err)
@@ -179,7 +179,7 @@ func TestBreakOnUnrecoverableError(t *testing.T) {
179179
req := k8sreconcile.Request{
180180
NamespacedName: nsn,
181181
}
182-
_, err = reconciler.Reconcile(req)
182+
_, err = reconciler.Reconcile(context.Background(), req)
183183

184184
// verify
185185
assert.Equal(t, expectedErr, err)
@@ -213,7 +213,7 @@ func TestSkipWhenInstanceDoesNotExist(t *testing.T) {
213213
req := k8sreconcile.Request{
214214
NamespacedName: nsn,
215215
}
216-
_, err := reconciler.Reconcile(req)
216+
_, err := reconciler.Reconcile(context.Background(), req)
217217

218218
// verify
219219
assert.NoError(t, err)

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
k8s.io/apimachinery v0.20.0
1313
k8s.io/client-go v0.20.0
1414
k8s.io/kubectl v0.20.0
15-
sigs.k8s.io/controller-runtime v0.6.4
15+
sigs.k8s.io/controller-runtime v0.7.0
1616
)
1717

1818
replace (

0 commit comments

Comments
 (0)