scripts: add migration script from public operator to cloud operator.#459
scripts: add migration script from public operator to cloud operator.#459
Conversation
2ef1d80 to
c1386ab
Compare
483cd20 to
8ad5f04
Compare
b831b67 to
86e56d4
Compare
prafull01
left a comment
There was a problem hiding this comment.
Changes are working as expected with some modifications. I have left those as comments. After this many comments, I'm half expecting you to blacklist me 😆
86e56d4 to
bc2873a
Compare
Check in a reference implementation for migrating from statesets managed by the public operator to the cloud operator. Note that this process involves some manual steps, and we may want to automate and test it further.
72279d8 to
c7e84bc
Compare
c7e84bc to
87a8b51
Compare
|
|
||
| # Delete public operator resources and crd. | ||
| kubectl delete -f https://raw.githubusercontent.com/cockroachdb/cockroach-operator/v2.17.0/install/crds.yaml | ||
| kubectl delete -f https://raw.githubusercontent.com/cockroachdb/cockroach-operator/v2.17.0/install/operator.yaml |
There was a problem hiding this comment.
I think we need to be careful here, if i set export NAMESPACE=cockroach-operator-system and the above commands will actually try to delete the same namespace, so the next operations won't work.
We need to specify to not set the NAMESPACE to cockroach-operator-system
There was a problem hiding this comment.
Actually this is fair point. If user have the crdbcluster CR in cockroach-operator-system then the statefulset is present in that namespace. This operation will delete the entire namespace and can cause data loss .
We should explicitly specify the resources we want to delete, rather than deleting from this link.
| kubectl apply -f https://raw.githubusercontent.com/cockroachdb/cockroach-operator/v2.17.0/install/operator.yaml | ||
|
|
||
| kubectl apply -f https://raw.githubusercontent.com/cockroachdb/cockroach-operator/v2.17.0/examples/example.yaml | ||
| ``` |
There was a problem hiding this comment.
As we mentioned export NAMESPACE=default, we can explicitly specify here to deploy example.yaml in the same namespace.
Following these commands will install crdbcluster in cockroach-operator-system namespace created while installing operator.
|
|
||
| ``` | ||
| kubectl apply -f manifests/crdbnode-2.yaml | ||
| ``` |
There was a problem hiding this comment.
Can we have a note here, while repeating the process they need decrease replicas and use the respective manifest file.
Check in a reference implementation for migrating from statesets managed by the public operator to the cloud operator. Note that this process involves some manual steps, and we may want to automate and test it further.