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: website/content/en/docs/building-operators/golang/migration.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -182,7 +182,8 @@ func main() {
182
182
log.Error(err, "")
183
183
os.Exit(1)
184
184
}
185
-
..
185
+
...
186
+
}
186
187
```
187
188
188
189
In order to use the previous one ensure that you have the [operator-lib][operator-lib] as a dependency of your project.
@@ -202,6 +203,7 @@ func main() {
202
203
LeaderElectionID: "f1c5ece8.example.com",
203
204
})
204
205
...
206
+
}
205
207
```
206
208
207
209
- Ensure that you copy all customizations made in `cmd/manager/main.go` to `main.go`. You’ll also need to ensure that all needed schemes have been registered, if you have been using third-party API's (i.e Route Api from OpenShift).
@@ -244,7 +246,7 @@ If not, you can install Prometheus via [kube-prometheus](https://github.com/core
- Now uncomment the line `- ../prometheus` in the `config/default/kustomization.yaml` file. It creates the `ServiceMonitor` resource which enables exporting the metrics:
247
-
```sh
249
+
```yaml
248
250
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
@@ -294,15 +296,15 @@ The Dockerfile image also changes and now it is a `multi-stage`, `distroless` an
294
296
295
297
See that, you might need to port some customizations made in your old Dockerfile as well. Also, if you wish to still using the previous UBI image replace:
296
298
297
-
```sh
299
+
```docker
298
300
# Use distroless as minimal base image to package the manager binary
299
301
# Refer to https://github.com/GoogleContainerTools/distroless for more details
300
302
FROM gcr.io/distroless/static:nonroot
301
303
```
302
304
303
305
With:
304
306
305
-
```sh
307
+
```docker
306
308
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
0 commit comments