Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 46 additions & 7 deletions docs/en/docs/insight/quickstart/install/upgrade-note.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,48 @@ Date: 2024-09-24

This page provides some considerations for upgrading insight-server and insight-agent.

## insight-agent
## insight-server

### Upgrade from v0.28.x (or lower) to v0.29.x
### Upgrade from v0.39.x (or lower) to v0.40.x or higher

Due to the upgrade of the Opentelemetry community operator chart version in v0.29.0, the supported values for `featureGates` in the values file have changed. Therefore, before upgrading, you need to set the value of `featureGates` to empty, as follows:
In version v0.40.0, the Grafana Operator will be upgraded from v4 to v5, introducing significant CRD changes.
The upgrade process will be automatically completed by `helm upgrade`.

```diff
- --set opentelemetry-operator.manager.featureGates="+operator.autoinstrumentation.go,+operator.autoinstrumentation.multi-instrumentation,+operator.autoinstrumentation.nginx" \
+ --set opentelemetry-operator.manager.featureGates=""
If users need to perform a `helm rollback` to a previous version (e.g., from v0.40.0 to v0.39.0),
they must manually clean up the v5 Custom Resources (CRs) using the following commands:
```shell
kubectl delete grafanas.grafana.integreatly.org -n insight-system --selector operator.insight.io/managed-by=insight --ignore-not-found=true
kubectl delete grafanadashboards.grafana.integreatly.org -n insight-system --selector operator.insight.io/managed-by=insight --ignore-not-found=true
kubectl delete grafanadatasources.grafana.integreatly.org -n insight-system --selector operator.insight.io/managed-by=insight --ignore-not-found=true
```
These commands only clean up CRs in the `insight-system` namespace. CRs in other namespaces can be removed using the same approach.

## insight-server
The Grafana Deployment in v0.40.x will include a [dashboard-discover](https://github.com/openinsight-proj/dashboard-discover) sidecar,
which is used to write specific GrafanaDashboard(v4) resources and ConfigMaps from the existing environment into the directory
specified by the Grafana dashboard provider (/var/lib/grafana/plugins/dashboards).


The architecture diagram of dashboard-discover is as follows:

![img](../../image/dashboard-discover.jpg)

The specific rules are as follows:

1. GrafanaDashboard(v4)

The dashboard-discover sidecar will watch for GrafanaDashboard(v4) resources across all namespaces in the cluster that
have the label: `operator.insight.io/managed-by=insight`, and write their JSON content into the `/var/lib/grafana/plugins/dashboards`
directory of the Grafana container.


2. ConfigMap

The dashboard-discover sidecar will watch for ConfigMaps across all namespaces in the cluster that have the labels:
`operator.insight.io/managed-by=insight,operator.insight.io/dashboard=true`, and write all content under their data field
into the `/var/lib/grafana/plugins/dashboards` directory of the Grafana container.

> If you need to store JSON files in a specific folder, you can add the following label to the corresponding resource:
> `operator.insight.io/dashboard-folder=your-folder`

### Upgrade from v0.26.x (or lower) to v0.27.x or higher

Expand Down Expand Up @@ -86,6 +116,15 @@ kubectl apply --server-side -f https://raw.githubusercontent.com/VictoriaMetrics

## insight-agent

### Upgrade from v0.28.x (or lower) to v0.29.x

Due to the upgrade of the Opentelemetry community operator chart version in v0.29.0, the supported values for `featureGates` in the values file have changed. Therefore, before upgrading, you need to set the value of `featureGates` to empty, as follows:

```diff
- --set opentelemetry-operator.manager.featureGates="+operator.autoinstrumentation.go,+operator.autoinstrumentation.multi-instrumentation,+operator.autoinstrumentation.nginx" \
+ --set opentelemetry-operator.manager.featureGates=""
```

### Upgrade from v0.23.x (or lower) to v0.24.x

In v0.24.x, CRDs have been added to the `OTEL operator chart`. However,
Expand Down
16 changes: 10 additions & 6 deletions docs/en/docs/insight/user-guide/dashboard/import-dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,29 @@ By using Grafana CRD, you can incorporate the management and deployment of dashb

1. Log in to the DCE 5.0 platform and go to __Container Management__ . Select the __kpanda-global-cluster__ from the cluster list.

2. Choose __Custom Resources__ from the left navigation bar. Look for the __grafanadashboards.integreatly.org__
2. Choose __Custom Resources__ from the left navigation bar. Look for the __grafana.integreatly.org__
file in the list and click it to view the details.

3. Click __YAML Create__ and use the following template. Replace the dashboard JSON in the __Json__ field.

- __namespace__ : Specify the target namespace.
- __name__ : Provide a name for the dashboard.
- __label__ : Mandatory. Set the label as __operator.insight.io/managed-by: insight__ .
- __namespace__ :填写目标命名空间;
- __name__ :填写仪表盘的名称。
- __spec.allowCrossNamespaceImport__ :必填,值为 __true__ 。
- __spec.instanceSelector.matchLabels__ :必填,__operator.insight.io/managed-by: insight__ 。

```yaml
apiVersion: integreatly.org/v1alpha1
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDashboard
metadata:
labels:
app: insight-grafana-operator
operator.insight.io/managed-by: insight
name: sample-dashboard
namespace: insight-system
spec:
allowCrossNamespaceImport: true
instanceSelector:
matchLabels:
operator.insight.io/managed-by: insight
json: >
{
"id": null,
Expand Down
Binary file added docs/zh/docs/insight/images/upgrade-note01.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/insight/images/upgrade-note02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/insight/images/upgrade-note04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/insight/images/upgrade-note05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 68 additions & 7 deletions docs/zh/docs/insight/quickstart/install/upgrade-note.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,70 @@

本页介绍一些升级 insight-server 和 insight-agent 的注意事项。

## insight-agent
## insight-server

### 从 v0.28.x(或更低版本)升级到 v0.29.x
### 从 v0.39.x(或更低版本)升级到 v0.40.x 或更高版本

由于 v0.29.0 升级了 Opentelemetry 社区的 operator chart 版本,values 中的 featureGates 的支持的值有所变化,因此,在 upgrade 之前,需要将 `featureGates` 的值设置为空, 即:
在 v0.40.0 版本中,grafana operator 会从 v4 升级到 v5 并会引入大量的 CRD 变更。 升级过程会由 `helm upgrade` 自动完成。
如果客户需要 `helm rollback` 回到老版本(比如,v0.40.0 -> v0.39.0)需要是手动清理 v5 的 CR:

```diff
- --set opentelemetry-operator.manager.featureGates="+operator.autoinstrumentation.go,+operator.autoinstrumentation.multi-instrumentation,+operator.autoinstrumentation.nginx" \
+ --set opentelemetry-operator.manager.featureGates=""
```shell
kubectl delete grafanas.grafana.integreatly.org -n insight-system --selector operator.insight.io/managed-by=insight --ignore-not-found=true
kubectl delete grafanadashboards.grafana.integreatly.org -n insight-system --selector operator.insight.io/managed-by=insight --ignore-not-found=true
kubectl delete grafanadatasources.grafana.integreatly.org -n insight-system --selector operator.insight.io/managed-by=insight --ignore-not-found=true
```

## insight-server
这部分命令只清理了 insight-system 命名空间下的 CR, 其他命名空间可以用相同的方式处理。

在 v0.40.x 的 grafana deployment 会添加一个 [dashboard-discover](https://github.com/openinsight-proj/dashboard-discover) sidecar
用于将现有环境中特定的 GrafanaDashboard(v4),ConfigMap 写入到 grafana dashboard provider 指定目录(/var/lib/grafana/plugins/dashboards)中。

架构图如下:

![img](../../images/upgrade-note01.jpg)

具体规则如下:

1. GrafanaDashboard(v4)

dashboard-discover sidecar 会 watch 集群中所用命名空间中带有:`operator.insight.io/managed-by=insight` label 的 GrafanaDashboard(v4)
并将其 Json 内容写入到 Grafana 容器的 `/var/lib/grafana/plugins/dashboards` 中。


2. ConfigMap

dashboard-discover sidecar 会 watch 集群中所用命名空间中带有:`operator.insight.io/managed-by=insight,operator.insight.io/dashboard=true` label 的 ConfigMap
并将其 data 下的所有内容写入到 Grafana 容器的 `/var/lib/grafana/plugins/dashboards` 中。

> 如果需要将 Json 文件存入特定文件夹中,可以在对应资源 label 中添加:`operator.insight.io/dashboard-folder=you-folder`

在 v0.40.0 版本中, grafana 从 9.3.14 升级到 12.1.3。grafana 12.1.3 已完全移除对 AngularJS 的支持,转而优先支持 React。具体可以看[社区说明](https://grafana.com/blog/2025/04/03/angularjs-support-will-be-removed-in-grafana-12-what-you-need-to-know)。

insight 以及兄弟团队维护的仪表盘已经自动迁移,开箱即用。对于客户自己维护的仪表盘,grafana 12.1.3 对部分核心预置(pre-installed)的
AngularJS 面板提供自动迁移支持。在客户首次在 Grafana 12.1.3 打开自定义仪表盘后 grafana 会自动触发迁移, 迁移完成后,务必点击仪表盘的「Save」按钮保存变更,避免每次加载时重复迁移。

若未完成 AngularJS 面板迁移,在 Grafana 12.1.3 后会出现以下问题:

1. 依赖 AngularJS 的插件无法加载,在插件目录中不会显示已安装状态。
2. 已配置的 AngularJS 数据源不会出现在数据源列表中。
3. 仪表盘中原 AngularJS 面板会显示错误提示,如 `Error loading: plugin_name` 或 `Panel plugin not found: plugin_name`; 如下图:

<img src="../../images/upgrade-note02.png" alt="angularjs-deprecation-warning-panel" width="50%" />

可以手动替换类似的面板或插件。

4. 仪表盘中原 Datasource 丢失,如 `Datasource XXX was not found`, 如下图:

<img src="../../images/upgrade-note03.png" alt="datasource-not-found" width="50%" />

可以手动创建一个 Datasource 变量:

<img src="../../images/upgrade-note04.png" alt="grafana-prometheus-ds-var" height="500" />

然后在面板中使用:

<img src="../../images/upgrade-note05.png" alt="grafana-use-prometheus-ds-var" width="30%" />


### 从 v0.26.x(或更低版本)升级到 v0.27.x 或更高版本

Expand Down Expand Up @@ -76,6 +128,15 @@ kubectl apply --server-side -f https://raw.githubusercontent.com/VictoriaMetrics

## insight-agent

### 从 v0.28.x(或更低版本)升级到 v0.29.x

由于 v0.29.0 升级了 Opentelemetry 社区的 operator chart 版本,values 中的 featureGates 的支持的值有所变化,因此,在 upgrade 之前,需要将 `featureGates` 的值设置为空, 即:

```diff
- --set opentelemetry-operator.manager.featureGates="+operator.autoinstrumentation.go,+operator.autoinstrumentation.multi-instrumentation,+operator.autoinstrumentation.nginx" \
+ --set opentelemetry-operator.manager.featureGates=""
```

### 从 v0.23.x(或更低版本)升级到 v0.24.x

由于 0.24.x 版本中 `OTEL operator chart` 中新增了 CRD,但由于 Helm Upgrade 时并不会更新 CRD,因此,需要手动执行以下命令:
Expand Down
12 changes: 8 additions & 4 deletions docs/zh/docs/insight/user-guide/dashboard/import-dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,30 @@

1. 登录 DCE 5.0 平台,进入 __容器管理__ ,在集群列表中选择 __kpanda-global-cluster__ 。

2. 选择左侧导航栏的 __自定义资源__ ,在列表中查找 __grafanadashboards.integreatly.org__ 文件,进入详情。
2. 选择左侧导航栏的 __自定义资源__ ,在列表中查找 __grafana.integreatly.org__ 文件,进入详情。

![导入仪表盘](https://docs.daocloud.io/daocloud-docs-images/docs/insight/images/importboard00.png){ width="1000"}

3. 点击 __Yaml 创建__ ,使用以下模板,在 __Json__ 字段中替换仪表盘 JSON。

- __namespace__ :填写目标命名空间;
- __name__ :填写仪表盘的名称。
- __label__ :必填, __operator.insight.io/managed-by: insight__ 。
- __spec.allowCrossNamespaceImport__ :必填,值为 __true__ 。
- __spec.instanceSelector.matchLabels__ :必填,__operator.insight.io/managed-by: insight__ 。

```yaml
apiVersion: integreatly.org/v1alpha1
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDashboard
metadata:
labels:
app: insight-grafana-operator
operator.insight.io/managed-by: insight
name: sample-dashboard
namespace: insight-system
spec:
allowCrossNamespaceImport: true
instanceSelector:
matchLabels:
operator.insight.io/managed-by: insight
json: >
{
"id": null,
Expand Down
Loading