Skip to content

[release-0.14] 🐛 Allow lazy restmapper to work with CRDs created at runtime - #2219

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:release-0.14from
sbueringer:pr-cherry-lazy-restmapper-fix
Mar 1, 2023
Merged

k8s-ci-robot merged 1 commit into
kubernetes-sigs:release-0.14from
sbueringer:pr-cherry-lazy-restmapper-fix

Conversation

@sbueringer

@sbueringer sbueringer commented Mar 1, 2023

Copy link
Copy Markdown
Member

Manual cherry-pick of #2208

There were conflicts in the test file. I just went with the version from main

EDIT: now resolved conflicts in a way that it works :)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 1, 2023
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 1, 2023
@sbueringer

Copy link
Copy Markdown
Member Author

/hold
one moment

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 1, 2023
@sbueringer
sbueringer force-pushed the pr-cherry-lazy-restmapper-fix branch from fffd4f0 to 8337539 Compare March 1, 2023 19:51
@sbueringer

Copy link
Copy Markdown
Member Author

/test pull-controller-runtime-test-release-0-14
flake

@sbueringer

Copy link
Copy Markdown
Member Author

/retest

@sbueringer

Copy link
Copy Markdown
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 1, 2023
Now lazy restmapper fetches all API resources once at start and then
caches them. It prevents it from discovery of new CRDs created after
the controller has started.
This commit allows lazy restmapper to work with such CRDs.
@sbueringer

Copy link
Copy Markdown
Member Author

/assign @vincepri

@vincepri vincepri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 1, 2023
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer, vincepri

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [sbueringer,vincepri]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
k8s-ci-robot merged commit ffb74e5 into kubernetes-sigs:release-0.14 Mar 1, 2023
@sbueringer
sbueringer deleted the pr-cherry-lazy-restmapper-fix branch March 1, 2023 20:39
renovate Bot referenced this pull request in open-feature/flagd Mar 2, 2023
)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[sigs.k8s.io/controller-runtime](https://togithub.com/kubernetes-sigs/controller-runtime)
| require | patch | `v0.14.4` -> `v0.14.5` |

---

### Release Notes

<details>
<summary>kubernetes-sigs/controller-runtime</summary>

###
[`v0.14.5`](https://togithub.com/kubernetes-sigs/controller-runtime/releases/tag/v0.14.5)

[Compare
Source](https://togithub.com/kubernetes-sigs/controller-runtime/compare/v0.14.4...v0.14.5)

#### What's Changed

- 🐛 Allow to set GracefulShutdownTimeout to -1, disabling timeouts in
[https://github.com/kubernetes-sigs/controller-runtime/pull/2198](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2198)
- 🌱 GVKForObject should handle multiple GVKs in Scheme gracefully in
[https://github.com/kubernetes-sigs/controller-runtime/pull/2202](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2202)
- ✨ Add rest client request duration and size metrics in
[https://github.com/kubernetes-sigs/controller-runtime/pull/2218](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2218)
- 🐛 Allow lazy restmapper to work with CRDs created at runtime in
[https://github.com/kubernetes-sigs/controller-runtime/pull/2219](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2219)

**Full Changelog**:
kubernetes-sigs/controller-runtime@v0.14.4...v0.14.5

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/open-feature/flagd).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNTMuMiIsInVwZGF0ZWRJblZlciI6IjM0LjE1My4yIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
vihangm referenced this pull request in newrelic/newrelic-k8s-operator May 15, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[sigs.k8s.io/controller-runtime](https://togithub.com/kubernetes-sigs/controller-runtime)
| require | patch | `v0.14.1` -> `v0.14.6` |

---

### Release Notes

<details>
<summary>kubernetes-sigs/controller-runtime</summary>

###
[`v0.14.6`](https://togithub.com/kubernetes-sigs/controller-runtime/releases/tag/v0.14.6)

[Compare
Source](https://togithub.com/kubernetes-sigs/controller-runtime/compare/v0.14.5...v0.14.6)

#### What's Changed

- 🐛 Preserve unstructured object GVKs when using \*ByObject cache
options by [@&#8203;joelanford](https://togithub.com/joelanford) in
[https://github.com/kubernetes-sigs/controller-runtime/pull/2249](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2249)

**Full Changelog**:
kubernetes-sigs/controller-runtime@v0.14.5...v0.14.6

###
[`v0.14.5`](https://togithub.com/kubernetes-sigs/controller-runtime/releases/tag/v0.14.5)

[Compare
Source](https://togithub.com/kubernetes-sigs/controller-runtime/compare/v0.14.4...v0.14.5)

#### What's Changed

- 🐛 Allow to set GracefulShutdownTimeout to -1, disabling timeouts in
[https://github.com/kubernetes-sigs/controller-runtime/pull/2198](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2198)
- 🌱 GVKForObject should handle multiple GVKs in Scheme gracefully in
[https://github.com/kubernetes-sigs/controller-runtime/pull/2202](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2202)
- ✨ Add rest client request duration and size metrics in
[https://github.com/kubernetes-sigs/controller-runtime/pull/2218](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2218)
- 🐛 Allow lazy restmapper to work with CRDs created at runtime in
[https://github.com/kubernetes-sigs/controller-runtime/pull/2219](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2219)

**Full Changelog**:
kubernetes-sigs/controller-runtime@v0.14.4...v0.14.5

###
[`v0.14.4`](https://togithub.com/kubernetes-sigs/controller-runtime/releases/tag/v0.14.4)

[Compare
Source](https://togithub.com/kubernetes-sigs/controller-runtime/compare/v0.14.3...v0.14.4)

#### What's Changed

- ✨ Provide a truly lazy restmapper by
[@&#8203;k8s-infra-cherrypick-robot](https://togithub.com/k8s-infra-cherrypick-robot)
in
[https://github.com/kubernetes-sigs/controller-runtime/pull/2179](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2179)

**Full Changelog**:
kubernetes-sigs/controller-runtime@v0.14.3...v0.14.4

###
[`v0.14.3`](https://togithub.com/kubernetes-sigs/controller-runtime/releases/tag/v0.14.3)

[Compare
Source](https://togithub.com/kubernetes-sigs/controller-runtime/compare/v0.14.2...v0.14.3)

#### What's Changed

- ✨ Add additional SubResource\* functions for FieldOwner by
[@&#8203;k8s-infra-cherrypick-robot](https://togithub.com/k8s-infra-cherrypick-robot)
in
[https://github.com/kubernetes-sigs/controller-runtime/pull/2153](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2153)
- 🐛 Update golanci-lint script by
[@&#8203;k8s-infra-cherrypick-robot](https://togithub.com/k8s-infra-cherrypick-robot)
in
[https://github.com/kubernetes-sigs/controller-runtime/pull/2152](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2152)
- 🌱 Bump kubebuilder-release-tools to v0.3.0 by
[@&#8203;k8s-infra-cherrypick-robot](https://togithub.com/k8s-infra-cherrypick-robot)
in
[https://github.com/kubernetes-sigs/controller-runtime/pull/2154](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2154)
- 🌱 \[0.14] Deprecate component configuration package by
[@&#8203;vincepri](https://togithub.com/vincepri) in
[https://github.com/kubernetes-sigs/controller-runtime/pull/2165](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2165)

**Full Changelog**:
kubernetes-sigs/controller-runtime@v0.14.2...v0.14.3

###
[`v0.14.2`](https://togithub.com/kubernetes-sigs/controller-runtime/releases/tag/v0.14.2)

[Compare
Source](https://togithub.com/kubernetes-sigs/controller-runtime/compare/v0.14.1...v0.14.2)

#### What's Changed

- \[release-0.14] 🌱 Bump k8s.io/\* to v0.26.1 by
[@&#8203;sbueringer](https://togithub.com/sbueringer) in
[https://github.com/kubernetes-sigs/controller-runtime/pull/2146](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2146)

**Full Changelog**:
kubernetes-sigs/controller-runtime@v0.14.1...v0.14.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/newrelic/newrelic-k8s-operator).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS43OS4xIiwidXBkYXRlZEluVmVyIjoiMzUuNzkuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants