## test run ``` just hack/kind/reset kubectl cluster-info --context kind-edge kubectl apply -f test/fixtures/crds/gke-managed-certs/networking.gke.io_managedcertificates.yaml && kubectl apply -f test/fixtures/crds/datasync/ kubectl create secret generic couchdb-admin-creds --from-literal=username=foo --from-literal=password=bar -n data-sync-couchdb && kubectl create secret generic couchdb-cookie --from-literal=cookieAuthSecret=baz -n data-sync-couchdb ``` modify these manifests if you want ``` kubectl apply -f tmp.yaml or kubectl apply -f controllers/couchctl/test.yaml ``` run the controller ``` bazel run //cmd/datasync/couchctl:couchctl | jq ``` once the pods come up open a new terminal and forward the ports ``` kubectl port-forward service/data-sync-couchdb 5984:5984 -n data-sync-couchdb ``` ### misc ``` kubectl get pods -n data-sync-couchdb kubectl get secrets -n data-sync-couchdb kubectl -n data-sync-couchdb get secrets/couchdb-admin-creds --template={{.data.username}} | base64 -d && kubectl -n data-sync-couchdb get secrets/couchdb-admin-creds --template={{.data.password}} | base64 -d kubectl -n data-sync-couchdb get secrets/couchdb-admin-creds --template={{.data.username}} | base64 -d && kubectl -n data-sync-couchdb get secrets/couchdb-admin-creds --template={{.data.password}} | base64 -d curl -x PUT http://foo:bar@localhost:5984/_node/_local/_config/admins/AfbQn9LBGISYCDiJGuXI528pBkCmzFFb curl -X PUT http://foo:bar@127.0.0.1:5984/_node/_local/_config/admins/repl7 -d '"secret"' curl -X PUT http://foo:bar@127.0.0.1:5984/_config/admins/repl2 -d '"secret"' curl -i -u RXZOVTYllHI3efwrxuVk8nNAVwKejdXW:PbvIrdURl47OmMOIpvyhTAt0kOzayeWf \ http://localhost:5984/_cluster_setup curl http://RXZOVTYllHI3efwrxuVk8nNAVwKejdXW:PbvIrdURl47OmMOIpvyhTAt0kOzayeWf@localhost:5984/_cluster_setup curl http://leef9vC2Gn2HQinsgvCmVDlaB0tpnPUs:ch5tOZO3YrCGhF1vZhzoTr4PnIF3s7vV@localhost:5984/_users/org.couchdb.user:somename curl http://foo:bar@localhost:5984/_config/admins curl http://foo:bar@localhost:5984/_cluster_setup ```