@@ -44,6 +44,13 @@ since there's no need to set up a remote GKE/OpenShift cluster.
44
44
45
45
** make dev/up**
46
46
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
+
47
54
This command will get everything set up for you to begin testing out the operator. Specifically it will:
48
55
49
56
* 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
56
63
57
64
Tears down the k3d cluster.
58
65
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
+
59
78
## Testing CR Database
60
79
61
80
Notes on how to test an existing CR Database.
@@ -71,6 +90,9 @@ SELECT * FROM bank.accounts;
71
90
72
91
## Developer Install Instructions
73
92
93
+ Pre-requisite:
94
+ 1 . Install kustomize
95
+
74
96
These instructions are for developers only. If you want to try the alpha please use the instructions in the next
75
97
section.
76
98
@@ -79,13 +101,18 @@ Install the operator
79
101
``` console
80
102
$ git clone https://github.com/cockroachdb/cockroach-operator.git
81
103
$ export CLUSTER=test
104
+ $ export APP_VERSION=v$( cat version.txt)
105
+ $ export DEV_REGISTRY=us.gcr.io/$( gcloud config get-value project)
82
106
# create a gke cluster
83
107
$ ./hack/create-gke-cluster.sh -c $CLUSTER
84
108
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} \
86
113
K8S_CLUSTER=$(kubectl config view --minify -o=jsonpath='{.contexts[0].context.cluster}') \
87
114
bazel 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
89
116
```
90
117
91
118
There are various examples that can be installed. The files are located in the examples directory.
0 commit comments