-
Notifications
You must be signed in to change notification settings - Fork 64
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
docs: upgrade path from Operator v1 to v2 #558
Conversation
7d951c2
to
545421b
Compare
3e76923
to
8da9f8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WanzenBug Did a quick review of the documentation. Will perform a test run in the next few days.
8da9f8c
to
6acea5e
Compare
e424275
to
67425e0
Compare
96b7da8
to
ea34acf
Compare
ea34acf
to
322f227
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic! This is a major project.
Bold to do the conversion in bash with 1000 jq calls.
The script itself I only glanced through.
exit 1 | ||
} | ||
|
||
format_patch() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script would be easier to understand and review if these functions documented what they expect on stdin, what they generate on stdout, and what the parameters are. For the last part, naming the parameters with local kind="$1"
would do.
Is it worth it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some documentation. Not sure how helpful it is. I'm kind of amazed that it works at all, but it actually is quite nice to use 😄
if [ "$(jq -r '.items[0].spec.kubeletPath' "$TEMPDIR/linstorcsidrivers.json")" != "/var/lib/kubelet" ]; then | ||
echo "Found non-standard kubelet path" | ||
jq '.items[0].spec.kubeletPath' "$TEMPDIR/linstorcsidrivers.json" \ | ||
| format_patch DaemonSet linstor-csi-node '{"apiVersion": "apps/v1", "kind": "DaemonSet", "metadata": {"name": "linstor-csi-node"}, "spec": {"template": {"spec": {"containers": [{"name": "linstor-csi", "volumeMounts": [{"name": "publish-dir", "mountPath": "/var/lib/kubelet", "$patch": "delete"}, {"name": "publish-dir", "mountPath": ., "mountPropagation": "Bidirectional"}]}]}}}}' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}]}]}}}}
😮 Not bad going.
2d270df
to
4ee9927
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The final 2 commits should really be squashed into the appropriate previous commits. There are a few other details that have slipped into the wrong commit, but that doesn't really matter in this case.
The resulting docs look good to me.
Adds a guide on how to perform a linstor database migration for Operator v1. This is the first step in making the migration from Operator v1 to v2. Signed-off-by: Moritz Wanzenböck <moritz.wanzenboeck@linbit.com>
Add a script that records information about an existing v1 deployment and tries to convert it to the v2 equivalent where it makes sense. Also add a short guide on how to use the script. Signed-off-by: Moritz Wanzenböck <moritz.wanzenboeck@linbit.com>
Signed-off-by: Moritz Wanzenböck <moritz.wanzenboeck@linbit.com>
Signed-off-by: Moritz Wanzenböck <moritz.wanzenboeck@linbit.com>
This index also contains the main changes between the different operator versions. Signed-off-by: Moritz Wanzenböck <moritz.wanzenboeck@linbit.com>
4ee9927
to
47987ba
Compare
At some point I'm going to automate my whole workflow of Fixed the commits to be in some logical order. |
|
This adds a guide for upgrading an existing Piraeus Operator deployment from v1 to v2, along with some necessary changes
and fixes to the helm chart.
Closes #410