operator: allow custom calico-node run/lib hostPaths for microk8s migration - #5086
operator: allow custom calico-node run/lib hostPaths for microk8s migration#5086locker95 wants to merge 3 commits into
Conversation
|
There are a few other hostpaths in addition to
|
|
/sem-approve |
ee82702 to
4f1f043
Compare
|
Thanks for the review feedback — addressed in the latest push:
Locally |
imo probably worth adding it to this PR to capture the broad intent of "the operator should create resources that don't require host resources to be in specific paths." |
caseydavenport
left a comment
There was a problem hiding this comment.
Let's keep the PRs small for now, we can do those in a follow on. Assuming CI passes here, I'm good to merge this one!
|
For reference on follow-ups, microk8s's daemonset volumes are defined here: https://github.com/canonical/microk8s/blob/master/upgrade-scripts/000-switch-to-calico/resources/calico.yaml#L6367-L6416. Super happy to see this getting merged! 👍 |
|
@caseydavenport @davepgreene Thanks for the approval and the microk8s volume references. Agreed on keeping this PR small. I'll open a follow-up for |
|
/sem-approve |
b7507bf to
b8b47bb
Compare
|
Removing "merge-when-ready" label due to new commits |
|
/sem-approve |
…ration Manifest installs such as microk8s mount Calico state under snap-prefixed host paths (e.g. /var/snap/microk8s/current/var/run/calico). Migration previously required the exact default hostPaths and failed. Add Installation.spec.calicoNodeRunPath and calicoNodeLibPath, capture compatible non-default paths during migration, and render calico-node volumes using those paths. Refs: projectcalico/calico#10733 Signed-off-by: Dean Chen <862469039@qq.com>
Address review feedback on the microk8s migration host path knobs: - rename CalicoNodeRunPath/CalicoNodeLibPath to CalicoRunHostPath/ CalicoLibHostPath for a clearer, future-proof API name - encode defaults with kubebuilder markers and OpenAPI defaults Signed-off-by: Dean Chen <862469039@qq.com>
b8b47bb to
1fc1db9
Compare
|
/sem-approve |
Signed-off-by: Dean Chen <862469039@qq.com>
|
Removing "merge-when-ready" label due to new commits |
|
/sem-approve |
|
(note: I need to sem-approve each new commit, so just let me know if you need to retrigger CI and I can do it manually!) |
|
@caseydavenport thanks — Semaphore is red again after the last re-run (looks environmental / 3 tests). I'd rather not push another empty commit if that just burns another sem-approve. If you have a minute to re-trigger CI from your side when you're around, that'd be great. |
|
@locker95 those failures seem to be consistent across all commits in this PR, so I don't think they're flakes - likely real issues. Do they repro running "make ut" locally? |
Description
Manifest→operator migration fails on microk8s (and similar snap-based installs) with:
even though the volume exists under a snap-prefixed path such as
/var/snap/microk8s/current/var/run/calico(and likewise forvar-lib-calico).This PR:
Installation.spec.calicoNodeRunPathandcalicoNodeLibPath(defaults remain/var/run/calicoand/var/lib/calico);Addresses projectcalico/calico#10733
Release Note
For PR author
make gen-files(CRD YAML updated for the new Installation fields; string fields need no deepcopy changes)make gen-versionsFor PR reviewers
A note for code reviewers - all pull requests must have the following:
kind/bugif this is a bug fix.kind/enhancementif this is a a new feature.enterpriseif this PR applies to Calico Enterprise only.