@@ -44,6 +44,13 @@ since there's no need to set up a remote GKE/OpenShift cluster.
4444
4545** make dev/up**
4646
47+ Pre-requisite: The command sets up a k3d registry, and to push an image to it, the registry name must resolve to
48+ localhost or 127.0.0.1. Please add the following line to your /etc/hosts file:
49+
50+ ``` shell
51+ 127.0.0.1 registry.localhost
52+ ```
53+
4754This command will get everything set up for you to begin testing out the operator. Specifically it will:
4855
4956* Start a k3d cluster named test (context=k3d-test) with a managed docker registry
@@ -56,6 +63,18 @@ This command will get everything set up for you to begin testing out the operato
5663
5764Tears down the k3d cluster.
5865
66+ [ Existing Cluster & Repo] :
67+
68+ export DEV_REGISTRY="Your_Registry"
69+ ** make k8s/apply**
70+
71+ This command will deploy the operator to an existing cluster. It will build the operator image and push it to the DEV_REGISTRY.
72+ This newly built image will be used to deploy the operator.
73+
74+ ** make k8s/delete**
75+
76+ Tears down the cockroach operator deployment applied on the cluster.
77+
5978## Testing CR Database
6079
6180Notes on how to test an existing CR Database.
@@ -71,6 +90,9 @@ SELECT * FROM bank.accounts;
7190
7291## Developer Install Instructions
7392
93+ Pre-requisite:
94+ 1 . Install kustomize
95+
7496These instructions are for developers only. If you want to try the alpha please use the instructions in the next
7597section.
7698
@@ -79,13 +101,18 @@ Install the operator
79101``` console
80102$ git clone https://github.com/cockroachdb/cockroach-operator.git
81103$ export CLUSTER=test
104+ $ export APP_VERSION=v$( cat version.txt)
105+ $ export DEV_REGISTRY=us.gcr.io/$( gcloud config get-value project)
82106# create a gke cluster
83107$ ./hack/create-gke-cluster.sh -c $CLUSTER
84108
85- $ DEV_REGISTRY=us.gcr.io/$( gcloud config get-value project) \
109+ $ bazel run //hack/crdbversions:crdbversions -- -operator-image ${DEV_REGISTRY} /cockroach-operator \
110+ -operator-version ${APP_VERSION} -crdb-versions $(PWD)/crdb-versions.yaml -repo-root $(PWD)
111+
112+ $ DEV_REGISTRY=${DEV_REGISTRY} \
86113K8S_CLUSTER=$(kubectl config view --minify -o=jsonpath='{.contexts[0].context.cluster}') \
87114bazel run --stamp --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 \
88- //manifests:install_operator .apply
115+ --define APP_VERSION=${APP_VERSION} //config/default:install .apply
89116```
90117
91118There are various examples that can be installed. The files are located in the examples directory.
0 commit comments