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

feat: Reduce permissions for system-upgrade-controller serviceaccount #288

Merged
merged 1 commit into from Feb 28, 2024

Conversation

SISheogorath
Copy link
Contributor

This patch drastically cuts down the permissions of the system-upgrades-controller from the previous cluster-admin permissions to a tailored set of permissions for the controller.

Copy link
Contributor

@dweomer dweomer left a comment

Choose a reason for hiding this comment

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

LGTM

@SISheogorath
Copy link
Contributor Author

Before we merge that, I had one more thought: Currently the controller installs its own CRDs if they aren't present in the cluster. So maybe it needs some more permissions for creating CRDs? (I install them separately as part of the kustomization, so it wasn't a thing for me.)

@brandond
Copy link
Contributor

How does the controller handle the failure if the CRDs don't exist, or are out of sync, and it doesn't have permission to create or update them? If we're going to remove permission to create CRDs, we probably need a CLI flag to disable managing them.

@SISheogorath
Copy link
Contributor Author

If it can't read crds directly, it just assumes they exist and assumes it's all fine.

We could include the CRD itself into the kustomize output.

@brandond
Copy link
Contributor

Can you rebase this on top of current master so that CI can finish?

@SISheogorath
Copy link
Contributor Author

There we go :)

Copy link
Contributor

@brandond brandond left a comment

Choose a reason for hiding this comment

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

Can you remove the changes to the image/taq kustomization from this PR? I'm not understanding what those have to do with the RBAC; if you want to change that, please open another PR.

This patch drastically cuts down the permissions of the
system-upgrades-controller from the previous cluster-admin permissions
to a tailored set of permissions for the controller.
@SISheogorath
Copy link
Contributor Author

They had nothing to do with the change, just cleaning up along the way. Undid them for now :)

@brandond brandond merged commit 37928ad into rancher:master Feb 28, 2024
1 check passed
@SISheogorath SISheogorath deleted the feat/cut-down-permissions branch February 28, 2024 21:57
lumiere-bot bot added a commit to coolguy1771/home-ops that referenced this pull request Feb 29, 2024
….13.3 ) (patch) (#4296)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[docker.io/rancher/system-upgrade-controller](https://togithub.com/rancher/system-upgrade-controller)
| patch | `v0.13.2` -> `v0.13.3` |
|
[rancher/system-upgrade-controller](https://togithub.com/rancher/system-upgrade-controller)
| patch | `v0.13.2` -> `v0.13.3` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>rancher/system-upgrade-controller
(docker.io/rancher/system-upgrade-controller)</summary>

###
[`v0.13.3`](https://togithub.com/rancher/system-upgrade-controller/releases/tag/v0.13.3)

[Compare
Source](https://togithub.com/rancher/system-upgrade-controller/compare/v0.13.2...v0.13.3)

#### What's Changed

- Propagate labels and annotations from plans to jobs by
[@&#8203;sfackler](https://togithub.com/sfackler) in
[rancher/system-upgrade-controller#286
- Add a Complete condition to plans by
[@&#8203;sfackler](https://togithub.com/sfackler) in
[rancher/system-upgrade-controller#292
- feat: Reduce permissions for system-upgrade-controller serviceaccount
by [@&#8203;SISheogorath](https://togithub.com/SISheogorath) in
[rancher/system-upgrade-controller#288
- Bump mods by [@&#8203;brandond](https://togithub.com/brandond) in
[rancher/system-upgrade-controller#293

#### New Contributors

- [@&#8203;sfackler](https://togithub.com/sfackler) made their first
contribution in
[rancher/system-upgrade-controller#286
- [@&#8203;SISheogorath](https://togithub.com/SISheogorath) made their
first contribution in
[rancher/system-upgrade-controller#288

**Full Changelog**:
rancher/system-upgrade-controller@v0.13.2...v0.13.3

</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 these
updates again.

---

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

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMTkuNyIsInVwZGF0ZWRJblZlciI6IjM3LjIxOS43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: lumiere-bot[bot] <98047013+lumiere-bot[bot]@users.noreply.github.com>
lumiere-bot bot added a commit to coolguy1771/home-ops that referenced this pull request Feb 29, 2024
…v0.13.2 → v0.13.3 ) (#4295)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[docker.io/rancher/system-upgrade-controller](https://togithub.com/rancher/system-upgrade-controller)
| patch | `v0.13.2` -> `v0.13.3` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>rancher/system-upgrade-controller
(docker.io/rancher/system-upgrade-controller)</summary>

###
[`v0.13.3`](https://togithub.com/rancher/system-upgrade-controller/releases/tag/v0.13.3)

[Compare
Source](https://togithub.com/rancher/system-upgrade-controller/compare/v0.13.2...v0.13.3)

#### What's Changed

- Propagate labels and annotations from plans to jobs by
[@&#8203;sfackler](https://togithub.com/sfackler) in
[rancher/system-upgrade-controller#286
- Add a Complete condition to plans by
[@&#8203;sfackler](https://togithub.com/sfackler) in
[rancher/system-upgrade-controller#292
- feat: Reduce permissions for system-upgrade-controller serviceaccount
by [@&#8203;SISheogorath](https://togithub.com/SISheogorath) in
[rancher/system-upgrade-controller#288
- Bump mods by [@&#8203;brandond](https://togithub.com/brandond) in
[rancher/system-upgrade-controller#293

#### New Contributors

- [@&#8203;sfackler](https://togithub.com/sfackler) made their first
contribution in
[rancher/system-upgrade-controller#286
- [@&#8203;SISheogorath](https://togithub.com/SISheogorath) made their
first contribution in
[rancher/system-upgrade-controller#288

**Full Changelog**:
rancher/system-upgrade-controller@v0.13.2...v0.13.3

</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 [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMTkuNyIsInVwZGF0ZWRJblZlciI6IjM3LjIxOS43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: lumiere-bot[bot] <98047013+lumiere-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants