-
Notifications
You must be signed in to change notification settings - Fork 405
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
Create the migration process between api-server and CRDs in Service Catalog #3779
Comments
Issues to be created:
|
remember that our solution should work both with dedicated etcd (installed by ServiceCatalog chart) and also with scenario where user used already existing etcd. For example, we cannot have assumption that we are not triggering the deletion of the CustomResource because we will always delete the underlying storage. In some cases that could not be true and in restore phase we can have some conflict. |
PoC: manual steps which performs the migration: https://github.com/piotrmiskiewicz/service-catalog/blob/to-crd-migration/contrib/hack/crd/migration.md
Create SC resources Perform backup: kubectl get serviceinstance -o yaml --export --all-namespaces > serviceinstance.yaml
kubectl get servicebinding -o yaml --export --all-namespaces > servicebinding.yaml
kubectl get clusterserviceclass -o yaml --export --all-namespaces > clusterserviceclass.yaml
kubectl get clusterserviceplan -o yaml --export --all-namespaces > clusterserviceplan.yaml
kubectl get clusterservicebroker -o yaml --export --all-namespaces > clusterservicebroker.yaml
kubectl get serviceclass -o yaml --export --all-namespaces > serviceclass.yaml
kubectl get serviceplan -o yaml --export --all-namespaces > serviceplan.yaml
kubectl get servicebroker -o yaml --export --all-namespaces > servicebroker.yaml Delete existing SC: helm delete catalog --purge Install new SC (with CRDs)
Scale down the controller manager kubectl -n kyma-system scale deploy --replicas=0 catalog-catalog-controller-manager Import resources kubectl apply -f serviceinstance.yaml
kubectl apply -f servicebinding.yaml
kubectl apply -f clusterserviceclass.yaml
kubectl apply -f clusterserviceplan.yaml
kubectl apply -f clusterservicebroker.yaml
kubectl apply -f serviceclass.yaml
kubectl apply -f serviceplan.yaml
kubectl apply -f servicebroker.yaml scale up: kubectl -n kyma-system scale deploy --replicas=1 catalog-catalog-controller-manager |
TODOs:
|
Using main ETCD in Minikube:
copy certs and create a proper secret:
install SC:
create resources, then connect directly to etcd and get it, for example:
gives an output: /registry/servicecatalog.k8s.io/clusterservicebrokers/helm-broker
{"kind":"ClusterServiceBroker","apiVersion":"servicecatalog.k8s.io/v1beta1","metadata":{"name":"helm-broker","uid":"07aa039e-869d-11e9-8d41-9242bee4c30c","generation":1,"creationTimestamp":"2019-06-04T07:47:40Z","annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"servicecatalog.k8s.io/v1beta1\",\"kind\":\"ClusterServiceBroker\",\"metadata\":{\"annotations\":{},\"name\":\"helm-broker\"},\"spec\":{\"relistRequests\":1,\"url\":\"http://helm-broker/\"}}\n"},"finalizers":["kubernetes-incubator/service-catalog"]},"spec":{"url":"http://helm-broker/","relistBehavior":"Duration","relistRequests":1},"status":{"conditions":[{"type":"Ready","status":"False","lastTransitionTime":"2019-06-04T07:47:41Z","reason":"ErrorFetchingCatalog","message":"Error fetching catalog.Error getting broker catalog: Get http://helm-broker/v2/catalog: dial tcp: lookup helm-broker on 10.96.0.10:53: no such host"}],"reconciledGeneration":0,"operationStartTime":"2019-06-04T07:47:41Z"}} Because all resource are stored in the same place in ETCD as CDR version does, we cannot apply raw data which were stored in a file (backup). Resources should be applied without "metadata.resourceVersion" after installing ServiceCatalog we can see object in the ETCD: {"apiVersion":"servicecatalog.k8s.io/v1beta1","kind":"ClusterServiceBroker","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"servicecatalog.k8s.io/v1beta1\",\"kind\":\"ClusterServiceBroker\",\"metadata\":{\"annotations\":{},\"creationTimestamp\":\"2019-06-04T09:15:48Z\",\"finalizers\":[\"kubernetes-incubator/service-catalog\"],\"generation\":1,\"name\":\"helm-broker\"},\"spec\":{\"relistBehavior\":\"Duration\",\"relistRequests\":1,\"url\":\"http://helm-broker/\"},\"status\":{\"conditions\":[{\"lastTransitionTime\":\"2019-06-04T09:15:49Z\",\"message\":\"Error fetching catalog.Error getting broker catalog: Get http://helm-broker/v2/catalog: dial tcp: lookup helm-broker on 10.96.0.10:53: no such host\",\"reason\":\"ErrorFetchingCatalog\",\"status\":\"False\",\"type\":\"Ready\"}],\"operationStartTime\":\"2019-06-04T09:15:49Z\",\"reconciledGeneration\":0}}\n"},"creationTimestamp":"2019-06-04T09:15:48Z","finalizers":["kubernetes-incubator/service-catalog"],"generation":1,"name":"helm-broker","resourceVersion":"","selfLink":"","uid":"579dd5c9-86a9-11e9-984c-9242bee4c30c"},"spec":{"relistBehavior":"Duration","relistRequests":1,"url":"http://helm-broker/"},"status":{"conditions":[{"lastTransitionTime":"2019-06-04T09:15:49Z","message":"Error fetching catalog.Error getting broker catalog: Get http://helm-broker/v2/catalog: dial tcp: lookup helm-broker on 10.96.0.10:53: no such host","reason":"ErrorFetchingCatalog","status":"False","type":"Ready"}],"lastConditionState":"ErrorFetchingCatalog","operationStartTime":"2019-06-04T09:15:49Z","reconciledGeneration":0}}```
the `"lastConditionState":"ErrorFetchingCatalog` was added. |
Make Service Catalog CRDs version chart upgradeableProblems encountered when executing helm upgrade against the Service Catalog release with Aggregated API Server
|
Initial Raw scenario:
|
Description
We need to create a migration guide/scripts which will allow clients to do easily migraton from api-server to CRD approach.
AC
The text was updated successfully, but these errors were encountered: