Skip to content

Commit 11603fb

Browse files
authored
Merge pull request #117 from openinsight-proj/fix_redis_no_root_bug
use support arm image
2 parents 8e3896e + 70f5217 commit 11603fb

File tree

9 files changed

+107
-107
lines changed

9 files changed

+107
-107
lines changed

.github/actions/setup/action.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ runs:
3131
helm repo add bitnami https://charts.bitnami.com/bitnami
3232
helm repo add redis https://ot-container-kit.github.io/helm-charts
3333
helm dep up charts/openinsight
34-
helm dep up charts/opentelemetry-demo
34+
helm dep up charts/opentelemetry-demo
35+
helm dep up charts/opentelemetry-demo-lite

.github/workflows/demo-lite-lint-chart.yaml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint Charts (Demo lite)
1+
name: Lint and Test Charts (Demo lite)
22

33
on:
44
pull_request:
@@ -20,5 +20,37 @@ jobs:
2020
with:
2121
create-kind-cluster: "false"
2222

23+
- name: Run chart-testing (list-changed)
24+
id: list-changed
25+
run: |
26+
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
27+
if [[ -n "$changed" ]]; then
28+
echo "changed=true" >> "$GITHUB_OUTPUT"
29+
fi
30+
2331
- name: Run chart-testing (lint)
24-
run: ct lint --target-branch main --chart-dirs charts/opentelemetry-demo-lite
32+
if: steps.list-changed.outputs.changed == 'true'
33+
run: ct lint --target-branch ${{ github.event.repository.default_branch }}
34+
35+
# e2e-test:
36+
# runs-on: ubuntu-latest
37+
# needs: lint-test
38+
# steps:
39+
# - name: Checkout
40+
# uses: actions/checkout@v3
41+
# with:
42+
# fetch-depth: 0
43+
# - name: Setup
44+
# uses: ./.github/actions/setup
45+
# with:
46+
# create-kind-cluster: "true"
47+
# - name: Run chart-testing (install)
48+
# run: |
49+
# helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
50+
# helm repo update
51+
# helm install prometheus-community/prometheus-operator-crds --generate-name \
52+
# --kube-context kind-chart-testing
53+
#
54+
# helm install charts/opentelemetry-demo-lite --generate-name \
55+
# --kube-context kind-chart-testing \
56+
# --debug --wait --skip-crds --timeout 30m
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dependencies:
22
- name: opentelemetry-demo
33
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
4-
version: 0.21.1
5-
digest: sha256:b652a9a810b0d0fe25c31859479ce8d58ea77b5d3e4199f5261b9ba0201de15a
6-
generated: "2023-04-21T18:26:11.133267+08:00"
4+
version: 0.22.0
5+
digest: sha256:67f10b8028406356fc10761a3e21df722dc8e646a7f14827f4661f4cdc6ba4e1
6+
generated: "2023-04-28T17:52:50.954009+08:00"
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
apiVersion: v2
22
name: opentelemetry-demo-lite
33
type: application
4-
version: 1.0.7
4+
version: 1.1.0
55
icon: https://opentelemetry.io/img/logos/opentelemetry-logo-nav.png
66
description: A helm chart for openTelemetry community demo application integration with other component(lite version).
77
sources:
88
- https://github.com/openinsight-proj/openinsight-helm-charts
99
maintainers:
1010
- name: JaredTan95
1111
- name: Frapschen
12-
appVersion: "v1.4.0-beta-daocloud"
12+
appVersion: "v1.4.0-daocloud"
1313
keywords:
1414
- opentelemetry
1515
- webstore-demo
1616
dependencies:
1717
- name: opentelemetry-demo
18-
version: 0.21.1
18+
version: 0.22.0
1919
repository: "https://open-telemetry.github.io/opentelemetry-helm-charts"
20-
condition: opentelemetry-demo.enabled
20+
condition: opentelemetry-demo.enabled

charts/opentelemetry-demo-lite/README.md

Lines changed: 31 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# OpenTelemetry Demo Lite Helm Chart
22

3-
这个 Chart 是官方 [OpenTelemetry Demo](https://github.com/open-telemetry/opentelemetry-demo)
4-
[OpenTelemetry Demo Chart](https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-demo)
5-
的扩展。
3+
This chart is an extension of [OpenTelemetry Demo](https://github.com/open-telemetry/opentelemetry-demo) and
4+
[OpenTelemetry Demo Chart](https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-demo).
65

7-
## 架构
6+
## Architecture
87

9-
这个 Chart 在保证购物主流程正常的情况下缩减了其他服务。以下是 OpenTelemetry Demo Lite 的架构图:
8+
This chart only retains those core services to ensure the shopping flow. Below is the current service diagram:
109

1110
```mermaid
1211
graph TD
@@ -77,68 +76,57 @@ classDef rust fill:#dea584,color:black;
7776
classDef typescript fill:#e98516,color:black;
7877
```
7978

80-
## 涉及的改动
79+
## Changelog
8180

82-
我们对官方的 Demo 做了一定的改造,以下是具体的改造细节。
81+
We have made certain modifications to the official demo, and the following are the specific details of the modifications.
8382

84-
### 重写的组件
83+
### Re-implement components
8584

8685
#### [Adservice](https://github.com/openinsight-proj/opentelemetry-demo/tree/daocloud/src/adservice-v2#note-the-overall-helm-chart)
8786

88-
这个组件在重写后增加了以下功能:
89-
- 服务接入 nacos
90-
- 服务接入 sentinel
91-
- 支持 grpcurl 请求
92-
- [暴露 Prometheus 指标](https://github.com/openinsight-proj/adservice#metrics)
93-
- [延时模拟](https://github.com/openinsight-proj/adservice#mock-latency)
94-
- [50% 的请求错误率](https://github.com/openinsight-proj/adservice#mock-error)
95-
- 从 Dataservice 获取 Ad 数据
87+
- integrate nacos
88+
- integrate sentinel
89+
- support grpcurl
90+
- [expose Prometheus metrics](https://github.com/openinsight-proj/adservice#metrics)
91+
- [mock latency](https://github.com/openinsight-proj/adservice#mock-latency)
92+
- [50% error rate](https://github.com/openinsight-proj/adservice#mock-error)
93+
- call Dataservice to get Ad data
9694

97-
#### [checkoutservice](https://github.com/openinsight-proj/opentelemetry-demo/tree/daocloud/src/checkoutservice-v2#checkout-service)
95+
#### [Checkoutservice](https://github.com/openinsight-proj/opentelemetry-demo/tree/daocloud/src/checkoutservice-v2#checkout-service)
9896

99-
具体的改动:
97+
- doesn't depend Emailservice
98+
- doesn't depend Currencyservice
99+
- doesn't depend Kafka
100100

101-
- 不再调用 Emailservice
102-
- 不再调用 Currencyservice
103-
- 不再依赖 Kafka
104-
105-
### 增加的组件
101+
### Added components
106102

107103
#### [Dataservice](https://github.com/openinsight-proj/opentelemetry-demo/tree/daocloud/src/dataservice)
108104

109-
这个组件只被 Adservice 调用,在收到请求后,它会去 Mysql 中获取相关的数据并返回给 Adservice
105+
This service only used by Adservice. It will accept Adservice's http request then response Ad data from mysql.
110106

111-
### 官方 chart 参数改造
107+
### Official chart re-configuration
112108

113-
1. 我们关闭了所有非业务组件,比如: Opentelemetry collector, Prometheus, Jaeger, Grafana等,在我们的版本中不需要用它们展示数据。
114-
业务的观测性数据传输路径变成了:`Components --> Insight-agent OTel collector`
109+
1. Close all none business services, such as Opentelemetry collector, Prometheus, Jaeger, Grafana,
110+
all service's telemetry data will fellow this data flow: `Components --> Insight-agent OTel collector`
115111

116-
2. 支持通过 Redis operator 拉起 Redis 实例(保证 Redis operator 已经安装并正常工作)。
117-
默认情况下使用官方的方式创建 Redis(`--set .global.middleware.redis.deployBy=builtin`),
118-
你可以通过 `--set .global.middleware.redis.deployBy=redisCR` 下发 Redis CR, 最后由 Redis operator 拉起 Redis 实例。
112+
2. Support deploying Redis instance from a Redis operator(Make sure Redis operator already works).
119113

120-
## 安装
114+
## Install
121115

122-
_前提条件:请保证 Insight agent 已经安装并就绪(在 `--set .global.middleware.redis.deployBy=redisCR` 时请求保证 Redis operator
123-
已经安装并正常工作)_
116+
_Note:make sure Insight agent already works(If`--set .global.middleware.redis.deployBy=redisCR`, make sure Redis
117+
operator already works)_
124118

125119
```shell
126120
helm repo add open-insight https://openinsight-proj.github.io/openinsight-helm-charts
127121

128122
helm install webstore-demo open-insight/opentelemetry-demo-lite -n webstore-demo --create-namespace
129123
```
130124

131-
## 常见参数
132-
133-
| 参数位置 | 参数说明 |
134-
| -------- |-------------------------------------------------------------------------------------------------------------------------------------------------|
135-
|adservice.enabled| 为 true 时部署adservice |
136-
|microservices.nacos.enabled| 改为 true,将会额外部署两个服务:dataservice, mysql, dataservice 会从 mysql 中获取广告数据,adservice 会向 dataservice 请求广告数据。此外,adservice, dataservice两个服务会被注册到nacos注册中心 |
137-
|microservices.nacos.registryAddr| 请修改为集群内nacos的可解析的域名,注意要带namespace |
138-
139-
更多的参数配置可以将 `values.schema.json` 文件中的内容复制到[ json schema editor ](https://form.lljj.me/#/demo?ui=VueElementForm&type=Test)
140-
进行实时配置编辑,用[ json-to-yaml ](https://codebeautify.org/json-to-yaml)将编辑的j结果转成 yaml。
125+
## Common chart param
141126

127+
Please use `values.schema.json` to get to know how to control the deployment behavior of this chart(use
128+
[json schema editor](https://form.lljj.me/#/demo?ui=VueElementForm&type=Test) to parse the schema and use
129+
[json-to-yaml](https://codebeautify.org/json-to-yaml) to generate values.yaml).
142130

143131

144132

charts/opentelemetry-demo-lite/templates/cartservice/redis.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ spec:
7070
limits:
7171
cpu: "0.5"
7272
memory: 512Mi
73+
securityContext:
74+
runAsUser: 999
75+
runAsGroup: 1000
76+
runAsNonRoot: true
7377
---
7478
apiVersion: v1
7579
kind: Service

charts/opentelemetry-demo-lite/templates/serviceMonitor/adservice-service-monitor.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.

charts/opentelemetry-demo-lite/templates/springCloudGateway/spring-cloud-gateway.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
spec:
2020
containers:
2121
- name: spring-cloud-gateway
22-
image: "{{ .Values.extensions.springCloudGateway.image.repository }}:{{ .Values.extensions.springCloudGateway.image.tag | default .Chart.AppVersion }}"
22+
image: "{{ .Values.extensions.springCloudGateway.image.registry }}/{{ .Values.extensions.springCloudGateway.image.repository }}:{{ .Values.extensions.springCloudGateway.image.tag | default .Chart.AppVersion }}"
2323
imagePullPolicy: Always
2424
ports:
2525
- name: http

0 commit comments

Comments
 (0)