You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developer.md
+57-15Lines changed: 57 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,8 @@ After the installation, issue
10
10
$ minikube start
11
11
```
12
12
13
-
Note: if you are running on a Mac, you may also use Docker for Mac Kubernetes instead of a docker-machine.
13
+
Note: if you are running on a Mac, you may also use Docker for Mac Kubernetes
14
+
instead of a docker-machine.
14
15
15
16
Once you have it started successfully, use [the quickstart
16
17
guide](https://github.com/kubernetes/minikube#quickstart) in order to test your
@@ -79,7 +80,8 @@ cluster.
79
80
80
81
## Connect to PostgreSQL
81
82
82
-
We can use the generated secret of the `postgres` robot user to connect to our `acid-minimal-cluster` master running in Minikube:
83
+
We can use the generated secret of the `postgres` robot user to connect to our
84
+
`acid-minimal-cluster` master running in Minikube:
83
85
84
86
```bash
85
87
$ export HOST_PORT=$(minikube service acid-minimal-cluster --url | sed 's,.*/,,')
@@ -166,8 +168,15 @@ minikube. The following steps will get you the docker image built and deployed.
166
168
167
169
# Code generation
168
170
169
-
The operator employs k8s-provided code generation to obtain deep copy methods and Kubernetes-like APIs for its custom resource definitons, namely the Postgres CRD and the operator CRD. The usage of the code generation follows conventions from the k8s community. Relevant scripts live in the `hack` directory: the `update-codegen.sh` triggers code generation for the APIs defined in `pkg/apis/acid.zalan.do/`,
170
-
the `verify-codegen.sh` checks if the generated code is up-to-date (to be used within CI). The `/pkg/generated/` contains the resultant code. To make these scripts work, you may need to `export GOPATH=$(go env GOPATH)`
171
+
The operator employs k8s-provided code generation to obtain deep copy methods
172
+
and Kubernetes-like APIs for its custom resource definitons, namely the Postgres
173
+
CRD and the operator CRD. The usage of the code generation follows conventions
174
+
from the k8s community. Relevant scripts live in the `hack` directory:
175
+
*`update-codegen.sh` triggers code generation for the APIs defined in `pkg/apis/acid.zalan.do/`,
176
+
*`verify-codegen.sh` checks if the generated code is up-to-date (to be used within CI).
177
+
178
+
The `/pkg/generated/` contains the resultant code. To make these scripts work,
@@ -176,7 +185,12 @@ See comments there for minor issues that can sometimes broke the generation proc
176
185
*[Code Generation for CustomResources](https://blog.openshift.com/kubernetes-deep-dive-code-generation-customresources/) - intro post on the topic
177
186
* Code generation in [Prometheus](https://github.com/coreos/prometheus-operator) and [etcd](https://github.com/coreos/etcd-operator) operators
178
187
179
-
To debug the generated API locally, use the [kubectl proxy](https://kubernetes.io/docs/tasks/access-kubernetes-api/http-proxy-access-api/) and `kubectl --v=8` log level to display contents of HTTP requests (run the operator itself with `--v=8` to log all REST API requests). To attach a debugger to the operator, use the `-outofcluster` option to run the operator locally on the developer's laptop (and not in a docker container).
0 commit comments