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: README.md
+28-13Lines changed: 28 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ This plugin enables frontend UI based on feature flags passed to the backend. Th
7
7
Feature flags should be added to the Feature enum [here](pkg/server/server.go) and to the useFeatures hook [here](web/src/shared/hooks/useFeatures.ts). Whenever a feature is enabled, a set of related feature extension points is included in the plugin-manifest.json served by the backend. These feature extension points are created through the use of [json-patches](https://datatracker.ietf.org/doc/html/rfc6902), such as the `acm-alerting` patch [here](config/acm-alerting.patch.json). The server looks for a patch in the format of `{feature-flag-name}.patch.json` to apply. Some feature flags, such as `acm-alerting` require other flags to be set such as `alertmanager` and `thanos-querier` to instruct the backend how to communicate with the observability signals they utilize
8
8
9
9
| Feature | OCP Version |
10
-
|-------------------|-------------|
10
+
|-----------------|-----------|
11
11
| acm-alerting | 4.14+ |
12
12
| perses-dashboards | 4.14+ |
13
13
| incidents | 4.17+ |
@@ -16,7 +16,6 @@ Feature flags should be added to the Feature enum [here](pkg/server/server.go) a
16
16
| metrics | 5.0+ |
17
17
| targets | 5.0+ |
18
18
19
-
20
19
## monitoring-plugin
21
20
22
21
This section describes knowledge helpful to development of the default monitoring-plugin.
@@ -69,8 +68,8 @@ Install the [devspace](https://www.devspace.sh/docs/getting-started/installation
69
68
70
69
1. Install the frontend dependencies running `make install-frontend`.
71
70
2. Start the frontend `make start-frontend`.
72
-
4. Select the namespace the monitoring-plugin is located in `devspace use namespace openshift-monitoring`.
73
-
5. In a different terminal start the devspace sync `devspace dev`.
71
+
3. Select the namespace the monitoring-plugin is located in `devspace use namespace openshift-monitoring`.
72
+
4. In a different terminal start the devspace sync `devspace dev`.
74
73
75
74
When running the `devspace dev` command, the pipeline will run the `scale_down_cmo` function to prevent CMO from fighting over control of the pod. After CMO has been scaled down, devspace will "take over" the monitoring-plugin pod, grabbing all of the certificates and backend binary and configuration to run in the devspace pod. The backend will stay the same as what is built in the Dockerfile.devspace file, only the frontend changes will be reflected live in cluster.
76
75
@@ -82,6 +81,18 @@ After development you can run `devspace purge` which will cleanup and then call
82
81
83
82
### Local Development
84
83
84
+
#### Editor configuration
85
+
86
+
Some of the lint rules for typescript which we have enabled in our codebase are not supported by prettier and need to be solved by running `eslint --fix` You can configure your code editor to perform this on save/format although some setup is needed:
We recommend running the following eslint rules when formatting:
92
+
93
+
-`import/order`
94
+
-`sort-imports`
95
+
85
96
#### Dependencies
86
97
87
98
1.[Node.js 22+](https://nodejs.org/en/) and [npm](https://www.npmjs.com/) are required
@@ -121,12 +132,13 @@ The application will be running at [localhost:9000](http://localhost:9000/).
121
132
## monitoring-console-plugin (mcp)
122
133
123
134
### Dependencies
135
+
124
136
1.[Local Development Dependencies](README#Dependencies)
125
137
2.[yq](https://github.com/mikefarah/yq) for acm deployment
126
138
3. sed ([gnu-sed](https://formulae.brew.sh/formula/gnu-sed) for mac, with sed being aliased to that gnu-sed)
127
139
128
-
129
140
### Building an image
141
+
130
142
Images for the mcp can be built by running the following command. Due to the limitation of linux/amd64 image builds on Apple Silicon Macs's, some of the changes are run locally and not just in the Dockerfiles. If you are on a Mac, it is not suggested to cancel the exection of this scipt part way through
131
143
132
144
```bash
@@ -153,7 +165,7 @@ Since the store for the `monitoring-plugin` is stored in the `openshift/console`
# Start podman (or Docker) - Linux machines can skip this part
168
+
# Start podman (or Docker) - Linux machines can skip this part
157
169
$ podman machine init
158
170
$ podman machine start
159
171
@@ -173,6 +185,7 @@ $ make start-coo-backend
173
185
`make start-coo-backend` will inject the `alerting,targets,legacy-dashboards,metrics,incidents,perses-dashboards` features.
174
186
175
187
#### Local Development with Perses Proxy
188
+
176
189
The bridge script `start-console.sh` is configured to proxy to a local Perses instance running at port `:8080`. To run the local Perses instance you will need to clone the [perses/perses](https://github.com/perses/perses) repository and follow the start up instructions in [ui/README.md](https://github.com/perses/perses/blob/63601751674403f626d1dea3dec168bdad0ef1c7/ui/README.md) :
1. Install COO through the OpenShift UI > OperatorHub > Cluster Observability Operator
208
+
2. Install UIPlugin > monitoring
195
209
3. oc apply -f <PERSES_DATASOURCE_YAML>
196
-
- See sample yaml [here](https://github.com/observability-ui/development-tools/blob/main/monitoring-plugin/monitoring-console-plugin/perses/thanos-querier-datasource.yaml)
210
+
- See sample yaml [here](https://github.com/observability-ui/development-tools/blob/main/monitoring-plugin/monitoring-console-plugin/perses/thanos-querier-datasource.yaml)
197
211
4. oc apply -f <PERSES_DASHBOARD_YAML>
198
-
- See sample yaml [here](https://github.com/observability-ui/development-tools/blob/main/monitoring-plugin/monitoring-console-plugin/perses/perses-dashboard.yaml)
212
+
- See sample yaml [here](https://github.com/observability-ui/development-tools/blob/main/monitoring-plugin/monitoring-console-plugin/perses/perses-dashboard.yaml)
213
+
214
+
##### Port forward Perses Datasource
199
215
200
-
##### Port forward Perses Datasource
201
-
To use the PERSES_DATASOURCE you deployed above, you'll need to forward it to your local machine then proxy it using the local Perses Instance.
216
+
To use the PERSES_DATASOURCE you deployed above, you'll need to forward it to your local machine then proxy it using the local Perses Instance.
202
217
203
218
```
204
219
# Forward cluster Prometheus Instance to localhost:9090
0 commit comments