Cbopconv issue converting to operator 2.0 -- no namespace flag

Hi All,
I am following the 1.x to 2.o operator conversion docs and things went bad on the part where you convert the couchbase cluster to 2.0 compatibility.

the process fails at step 4:
https://docs.couchbase.com/operator/2.0/howto-operator-upgrade.html#update-resources

The cbopconv tool takes a version 1 CouchbaseCluster and converts it to version 2. Beginning with Operator version 2, data buckets are defined as separate resources, so cbopconv will automatically create these for you. Clusters and buckets will be automatically populated with explicit label selection. The Operator now persists cluster related data in a ConfigMap and cbopconv will create this for you.

Executing ./cbopconv --namespace mynamespace, per the docs, fails with :

$ bin/cbopconv -namespace mynamespace
flag provided but not defined: -namespace
Usage of bin/cbopconv:
  -v	Displays the version and exits

This is an issue since I deployed my Coucbase cluster in a non-default namespace and the tool wont accept a namespace parameter.
Because of this the Operator 2.0 deployment now fails to read my v1 Couchbase deployment with this error:

E0513 22:58:01.298290       1 reflector.go:134] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:126: Failed to list *v2.CouchbaseCluster: v2.CouchbaseClusterList.Items: []v2.CouchbaseCluster: v2.CouchbaseCluster.Spec: v2.ClusterSpec.Buckets: readObjectStart: expect { or n, but found [, error found in #10 byte of ...|buckets":[{"compress|..., bigger context ...|-creds","baseImage":"couchbase/server","buckets":[{"compressionMode":"passive","conflictResolution":|...
E0513 22:58:01.298290       1 reflector.go:134] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:126: Failed to list *v2.CouchbaseCluster: v2.CouchbaseClusterList.Items: []v2.CouchbaseCluster: v2.CouchbaseCluster.Spec: v2.ClusterSpec.Buckets: readObjectStart: expect { or n, but found [, error found in #10 byte of ...|buckets":[{"compress|..., bigger context ...|-creds","baseImage":"couchbase/server","buckets":[{"compressionMode":"passive","conflictResolution":|...
log: exiting because of error: log: cannot create log: open /tmp/couchbase-operator.couchbase-operator-b6496564f-kpjgz.unknownuser.log.ERROR.20200513-225801.1: no such file or directory

Anyone know how to get around this? Feels like I will end up deleting the cluster and redeploying.

Thanks,
Barret

Yea it appears the namespace flag isn’t valid, but it should work if you set the namespace as your kube context?

kubectl config set-context --current --namespace=mynamespace

Will be updating docs there, thanks!

Thanks. always happy to beta test for Couchbase. That worked for namespace but now the next hurdle. I have a felling this one is terminal.
It fails with the error below. is there a problem with verifying self-signed certificates?

failed to verifiy TLS server secret for cluster ezred/cb-cluster-eus2: [
certificate cannot be verified for zone: x509: certificate is valid for *.cb-cluster-eus2.ezred.svc, *.ezred.svc, *.cb-cluster-eus2.mydomain.com, not host.cb-cluster-eus2 
certificate cannot be verified for zone: x509: certificate is valid for *.cb-cluster-eus2.ezred.svc, *.ezred.svc, *.cb-cluster-eus2.mydomain.com, not host.cb-cluster-eus2.ezred 
certificate cannot be verified for zone: x509: certificate is valid for *.cb-cluster-eus2.ezred.svc, *.ezred.svc, *.cb-cluster-eus2.mydomain.com, not cb-cluster-eus2-srv 
certificate cannot be verified for zone: x509: certificate is valid for *.cb-cluster-eus2.ezred.svc, *.ezred.svc, *.cb-cluster-eus2.mydomain.com, not cb-cluster-eus2-srv.ezred 
certificate cannot be verified for zone: x509: certificate is valid for *.cb-cluster-eus2.ezred.svc, *.ezred.svc, *.cb-cluster-eus2.mydomain.com, not localhost]

That’s manageable, but looks like you’ll have to regenerate your certs with the additional domains that have been added to the validation, ie… *.cb-cluster-eus2, *.cb-cluster-eus2.ezred.....

I added a bunch of domains and it worked .
thanks