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

Add Volume Mounts #195

Merged
merged 2 commits into from Apr 27, 2022
Merged

Add Volume Mounts #195

merged 2 commits into from Apr 27, 2022

Conversation

luthermonson
Copy link
Contributor

@luthermonson luthermonson commented Apr 21, 2022

Add's a new Volume struct which we use to add pod/container volumes. When we get them in the SUC we can then loop over and attach to all containers in the pod which will allow to let the plan decide what it needs for volumes. This will be used by the windows wins upgrade plan to mount the wins npipe socket into the container so we can break out and run wins commands.

rancher/rancher#37020

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.

As discussed in Slack:

I think what we need here is a new VolumeSpec (or MountSpec or even BindSpec) sub-type, akin to our custom SecretSpec, that references a host location/source (i.e. HostPath or Source) to mount into the containers, e.g.:

type MountSpec struct {
	Name     string `json:"name,omitempty"`
	Path     string `json:"path,omitempty"`
	HostPath string `json:"path,omitempty"`
}

You could use such in a plan to give you enough information to specify both the volumes for the pod and the references to such for individual containers (assuming you need to reference them: maybe we just mount any volumes specified for all containers?).

@dweomer
Copy link
Contributor

dweomer commented Apr 21, 2022

As discussed in Slack:

I think what we need here is a new VolumeSpec (or MountSpec or even BindSpec) sub-type, akin to our custom SecretSpec, that references a host location/source (i.e. HostPath or Source) to mount into the containers, e.g.:

type MountSpec struct {
	Name     string `json:"name,omitempty"`
	Path     string `json:"path,omitempty"`
	HostPath string `json:"path,omitempty"`
}

You could use such in a plan to give you enough information to specify both the volumes for the pod and the references to such for individual containers (assuming you need to reference them: maybe we just mount any volumes specified for all containers?).

I need to think about it more to decide if I am comfortable with adding general purpose volumes to plans. 🤔

@luthermonson
Copy link
Contributor Author

ya i agree, there is more to this than just volume mounts... le sigh

@luthermonson luthermonson force-pushed the vol-mounts branch 2 times, most recently from 7a24d25 to f390858 Compare April 26, 2022 23:00
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.

Looks good (minus the nit/suggestion hinting at stylistic divergence).

pkg/upgrade/job/job.go Outdated Show resolved Hide resolved
@dweomer dweomer merged commit c0583b3 into rancher:master Apr 27, 2022
@luthermonson luthermonson deleted the vol-mounts branch April 27, 2022 22:16
coolguy1771 pushed a commit to coolguy1771/home-ops that referenced this pull request Nov 17, 2022
….10.0 (#2097)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[rancher/system-upgrade-controller](https://togithub.com/rancher/system-upgrade-controller)
| | minor | `v0.9.1` -> `v0.10.0` |
|
[rancher/system-upgrade-controller](https://togithub.com/rancher/system-upgrade-controller)
| Kustomization | minor | `v0.9.1` -> `v0.10.0` |

---

### Release Notes

<details>
<summary>rancher/system-upgrade-controller</summary>

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

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

##### What's Changed

- Remove failure:ignore instruction in .drone.yml by
[@&#8203;Anarkis](https://togithub.com/Anarkis) in
[rancher/system-upgrade-controller#190
- Bump golang.org/x/crypto by
[@&#8203;macedogm](https://togithub.com/macedogm) in
[rancher/system-upgrade-controller#194
- fix for docker/distribution checksum mismatch by
[@&#8203;dweomer](https://togithub.com/dweomer) in
[rancher/system-upgrade-controller#196
- Migrate to SLE BCI images by
[@&#8203;thomasferrandiz](https://togithub.com/thomasferrandiz) in
[rancher/system-upgrade-controller#193
- Add Volume Mounts by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[rancher/system-upgrade-controller#195
- enable fossa scanning by
[@&#8203;paraglade](https://togithub.com/paraglade) in
[rancher/system-upgrade-controller#192
- Fix drone by [@&#8203;brandond](https://togithub.com/brandond) in
[rancher/system-upgrade-controller#211
- add columns to plan crd by
[@&#8203;Robbilie](https://togithub.com/Robbilie) in
[rancher/system-upgrade-controller#210

##### New Contributors

- [@&#8203;Anarkis](https://togithub.com/Anarkis) made their first
contribution in
[rancher/system-upgrade-controller#190
- [@&#8203;macedogm](https://togithub.com/macedogm) made their first
contribution in
[rancher/system-upgrade-controller#194
- [@&#8203;paraglade](https://togithub.com/paraglade) made their first
contribution in
[rancher/system-upgrade-controller#192
- [@&#8203;Robbilie](https://togithub.com/Robbilie) made their first
contribution in
[rancher/system-upgrade-controller#210

**Full Changelog**:
rancher/system-upgrade-controller@v0.9.1...v0.10.0

</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:eyJjcmVhdGVkSW5WZXIiOiIzNC4yNi4yIiwidXBkYXRlZEluVmVyIjoiMzQuMjYuMiJ9-->

Co-authored-by: lumiere-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

2 participants