File tree 18 files changed +195
-56
lines changed
standalone/docker-compose
18 files changed +195
-56
lines changed Original file line number Diff line number Diff line change 69
69
GOARCH : ${{ matrix.goarch }}
70
70
DOCKER_TAG : ${{ steps.get_version.outputs.VERSION }}
71
71
run : |
72
- cd deploy /docker/prometheus
72
+ cd release/standalone /docker/prometheus
73
73
ls -lstrh
74
74
bash build_docker_prom.sh ${DOCKER_TAG}
Original file line number Diff line number Diff line change @@ -54,3 +54,7 @@ build: ## Build binary and tarball.
54
54
.PHONY : build-docker
55
55
build-docker : # # Build polaris-server docker images.
56
56
bash ./release/build_docker.sh $(IMAGE_TAG )
57
+
58
+ .PHONY : clean
59
+ clean : # # Clean polaris-server make data.
60
+ @rm -rf polaris-server-release_*
Original file line number Diff line number Diff line change @@ -50,4 +50,4 @@ if [ ${pre_release} == 0 ]; then
50
50
extra_tags=" -t ${docker_repository} /polaris-server:latest"
51
51
fi
52
52
53
- docker buildx build --network=host -t ${docker_repository} /polaris-server:${docker_tag} ${extra_tags} --platform ${platforms} --push ./
53
+ docker buildx build -f ./release/Dockerfile - -network=host -t ${docker_repository} /polaris-server:${docker_tag} ${extra_tags} --platform ${platforms} --push ./
Original file line number Diff line number Diff line change @@ -15,19 +15,47 @@ data:
15
15
mode: "release"
16
16
listenIP: "0.0.0.0"
17
17
listenPort: {{ .Values.service.webPort }}
18
+ jwt:
19
+ secretKey: "polarismesh@2021"
20
+ expired: 1800
18
21
namingV1URL: "/naming/v1"
19
22
namingV2URL: "/naming/v2"
20
23
authURL: "/core/v1"
21
- requestURL: "/naming/v1"
22
24
configURL: "/config/v1"
23
25
monitorURL: "/api/v1"
24
26
webPath: "web/dist/"
25
27
polarisServer:
26
28
address: "127.0.0.1:{{ .Values.service.httpPort }}"
27
- polarisToken: "polaris@12345678 "
29
+ polarisToken: "nu/0WRA4EqSR1FagrjRj0fZwPXuGlMpX+zCuWu4uMqy8xr1vRjisSbA25aAC3mtU8MeeRsKhQiDAynUR09I= "
28
30
monitorServer:
29
31
address: "polaris-prometheus:9090"
30
- oaAuthority:
31
- enableOAAuth: false
32
- hrData:
33
- enableHrData: false
32
+ # eventServer:
33
+ # requestUrl:
34
+ # timeout: 5s
35
+ # operationServer:
36
+ # requestUrl:
37
+ # timeout: 5s
38
+ # 存储配置
39
+ store:
40
+ {{- if eq .Values.global.mode "cluster" }}
41
+ # 数据库存储插件
42
+ {{- with .Values.polaris.storage.db.console }}
43
+ name: defaultStore
44
+ option:
45
+ master:
46
+ dbType: mysql
47
+ dbUser: {{ .user }}
48
+ dbPwd: {{ .password }}
49
+ dbAddr: {{ .address }}
50
+ dbName: {{ .name }}
51
+ maxOpenConns: -1
52
+ maxIdleConns: -1
53
+ connMaxLifetime: 300 # 单位秒
54
+ txIsolationLevel: 2 #LevelReadCommitted
55
+ {{- end }}
56
+ {{- else }}
57
+ # 单机文件存储插件
58
+ name: boltdbStore
59
+ option:
60
+ path: ./polaris.bolt
61
+ {{- end }}
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ data:
121
121
- stderr
122
122
discoverEventLocal:
123
123
rotateOutputPath: log/event/polaris-discoverevent.log
124
- errorRotateOutputPath: log/polaris-discoverevent-error.log
124
+ errorRotateOutputPath: log/event/ polaris-discoverevent-error.log
125
125
rotationMaxSize: 100
126
126
rotationMaxBackups: 10
127
127
rotationMaxAge: 7
@@ -253,14 +253,6 @@ data:
253
253
openConnLimit: false
254
254
maxConnPerHost: 128
255
255
maxConnLimit: 10240
256
- - name: prometheus-sd
257
- option:
258
- listenIP: "0.0.0.0"
259
- listenPort: {{ .Values.service.prometheusPort }}
260
- connLimit:
261
- openConnLimit: false
262
- maxConnPerHost: 128
263
- maxConnLimit: 10240
264
256
# - name: service-l5
265
257
# option:
266
258
# listenIP: 0.0.0.0
@@ -371,7 +363,7 @@ data:
371
363
store:
372
364
{{- if eq .Values.global.mode "cluster" }}
373
365
# 数据库存储插件
374
- {{- with .Values.polaris.storage.db }}
366
+ {{- with .Values.polaris.storage.db.server }}
375
367
name: defaultStore
376
368
option:
377
369
master:
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : ConfigMap
3
+ metadata :
4
+ name : polaris-prometheus-config
5
+ namespace : {{ .Values.installation.namespace }}
6
+ data :
7
+ prometheus.yaml : |-
8
+ # my global config
9
+ global:
10
+ scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
11
+ evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
12
+ # scrape_timeout is set to the global default (10s).
13
+
14
+ # Alertmanager configuration
15
+ alerting:
16
+ alertmanagers:
17
+ - static_configs:
18
+ - targets:
19
+ - 127.0.0.1:9093
20
+
21
+ # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
22
+ rule_files:
23
+ # - "first_rules.yml"
24
+ # - "second_rules.yml"
25
+ - "/data/prom_rules/prom-alarm-rules.yml"
26
+
27
+ # A scrape configuration containing exactly one endpoint to scrape:
28
+ # Here it's Prometheus itself.
29
+ scrape_configs:
30
+ # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
31
+ - job_name: "prometheus"
32
+ # metrics_path defaults to '/metrics'
33
+ # scheme defaults to 'http'.
34
+ static_configs:
35
+ - targets: ["localhost:9090"]
36
+ http_sd_configs:
37
+ - url: http://polaris:8090/prometheus/v1/clients
38
+ honor_labels: true
39
+ - job_name: "push-metrics"
40
+ static_configs:
41
+ - targets: ["localhost:9091"]
Original file line number Diff line number Diff line change 27
27
- port : {{ .Values.service.eurekaPort }}
28
28
name : service-eureka
29
29
targetPort : {{ .Values.service.eurekaPort }}
30
- - port : {{ .Values.service.prometheusPort }}
31
- name : prometheus-sd
32
- targetPort : {{ .Values.service.prometheusPort }}
33
30
selector :
34
31
app : polaris
35
32
---
Original file line number Diff line number Diff line change @@ -46,10 +46,17 @@ spec:
46
46
- image : {{ .Values.prometheus.image.repository }}:{{ .Values.prometheus.image.tag }}
47
47
imagePullPolicy : {{ .Values.prometheus.image.pullPolicy }}
48
48
name : polaris-prometheus
49
+ args :
50
+ - ' --config.file=/etc/prometheus/prometheus.yaml'
51
+ - ' --web.enable-lifecycle'
49
52
resources :
50
53
limits :
51
54
cpu : " 500m"
52
55
memory : 1000Mi
56
+ volumeMounts :
57
+ - mountPath : /etc/prometheus/prometheus.yaml
58
+ name : polaris-prometheus-config
59
+ subPath : prometheus.yaml
53
60
- image : {{ .Values.prometheus.pushgateway.image.repository }}:{{ .Values.prometheus.pushgateway.image.tag }}
54
61
imagePullPolicy : {{ .Values.prometheus.pushgateway.image.pullPolicy }}
55
62
name : polaris-pushgateway
58
65
cpu : " 500m"
59
66
memory : 1000Mi
60
67
restartPolicy : Always
68
+ volumes :
69
+ - configMap :
70
+ defaultMode : 420
71
+ name : polaris-prometheus-config
72
+ name : polaris-prometheus-config
Original file line number Diff line number Diff line change @@ -37,10 +37,16 @@ polaris:
37
37
clientOpen : false
38
38
storage :
39
39
db :
40
- address : localhost:3306
41
- name : polaris_server
42
- user : root
43
- password : polaris@123456
40
+ server :
41
+ address : localhost:3306
42
+ name : polaris_server
43
+ user : root
44
+ password : polaris@123456
45
+ console :
46
+ address : localhost:3306
47
+ name : polaris_console
48
+ user : root
49
+ password : polaris@123456
44
50
redis :
45
51
address : localhost:6379
46
52
# ACL user from redis v6.0, remove it if ACL is not available
@@ -67,7 +73,6 @@ service:
67
73
serviceGrpcPort : 8091
68
74
xdsv3Port : 15010
69
75
configGrpcPort : 8093
70
- prometheusPort : 9000
71
76
limiterHttpPort : 8100
72
77
limiterGrpcPort : 8101
73
78
Original file line number Diff line number Diff line change 11
11
mode: "release"
12
12
listenIP: "0.0.0.0"
13
13
listenPort: 8080
14
+ jwt:
15
+ secretKey: "polarismesh@2021"
16
+ expired: 1800
14
17
namingV1URL: "/naming/v1"
15
18
namingV2URL: "/naming/v2"
16
19
authURL: "/core/v1"
@@ -23,10 +26,11 @@ data:
23
26
polarisToken: "polaris@12345678"
24
27
monitorServer:
25
28
address: "polaris-prometheus:9090"
26
- oaAuthority:
27
- enableOAAuth: false
28
- hrData:
29
- enableHrData: false
29
+ store:
30
+ # 单机文件存储插件
31
+ name: boltdbStore
32
+ option:
33
+ path: ./polaris.bolt
30
34
kind : ConfigMap
31
35
metadata :
32
36
name : polaris-console-config
Original file line number Diff line number Diff line change @@ -247,14 +247,6 @@ data:
247
247
openConnLimit: false
248
248
maxConnPerHost: 128
249
249
maxConnLimit: 10240
250
- - name: prometheus-sd
251
- option:
252
- listenIP: "0.0.0.0"
253
- listenPort: 9000
254
- connLimit:
255
- openConnLimit: false
256
- maxConnPerHost: 128
257
- maxConnLimit: 10240
258
250
# - name: service-l5
259
251
# option:
260
252
# listenIP: 0.0.0.0
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : ConfigMap
3
+ metadata :
4
+ name : polaris-prometheus-config
5
+ namespace : polaris-system
6
+ data :
7
+ prometheus.yaml : |-
8
+ # my global config
9
+ global:
10
+ scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
11
+ evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
12
+ # scrape_timeout is set to the global default (10s).
13
+
14
+ # Alertmanager configuration
15
+ alerting:
16
+ alertmanagers:
17
+ - static_configs:
18
+ - targets:
19
+ - 127.0.0.1:9093
20
+
21
+ # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
22
+ rule_files:
23
+ # - "first_rules.yml"
24
+ # - "second_rules.yml"
25
+ - "/data/prom_rules/prom-alarm-rules.yml"
26
+
27
+ # A scrape configuration containing exactly one endpoint to scrape:
28
+ # Here it's Prometheus itself.
29
+ scrape_configs:
30
+ # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
31
+ - job_name: "prometheus"
32
+ # metrics_path defaults to '/metrics'
33
+ # scheme defaults to 'http'.
34
+ static_configs:
35
+ - targets: ["localhost:9090"]
36
+ http_sd_configs:
37
+ - url: http://polaris:8090/prometheus/v1/clients
38
+ honor_labels: true
39
+ - job_name: "push-metrics"
40
+ static_configs:
41
+ - targets: ["localhost:9091"]
Original file line number Diff line number Diff line change @@ -46,10 +46,17 @@ spec:
46
46
- image : polarismesh/polaris-prometheus:##POLARIS_PROMETHEUS_VERSION##
47
47
imagePullPolicy : Always
48
48
name : polaris-prometheus
49
+ args :
50
+ - ' --config.file=/etc/prometheus/prometheus.yaml'
51
+ - ' --web.enable-lifecycle'
49
52
resources :
50
53
limits :
51
54
cpu : " 500m"
52
55
memory : 1000Mi
56
+ volumeMounts :
57
+ - mountPath : /etc/prometheus/prometheus.yaml
58
+ name : polaris-prometheus-config
59
+ subPath : prometheus.yaml
53
60
- image : prom/pushgateway:latest
54
61
imagePullPolicy : Always
55
62
name : polaris-pushgateway
58
65
cpu : " 500m"
59
66
memory : 1000Mi
60
67
restartPolicy : Always
68
+ volumes :
69
+ - configMap :
70
+ defaultMode : 420
71
+ name : polaris-prometheus-config
72
+ name : polaris-prometheus-config
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -23,19 +23,38 @@ webServer:
23
23
mode : " release"
24
24
listenIP : " 0.0.0.0"
25
25
listenPort : 8080
26
+ jwt :
27
+ secretKey : " polarismesh@2021"
28
+ expired : 1800
26
29
namingV1URL : " /naming/v1"
27
30
namingV2URL : " /naming/v2"
28
31
authURL : " /core/v1"
29
- requestURL : " /naming/v1"
30
32
configURL : " /config/v1"
31
33
monitorURL : " /api/v1"
32
34
webPath : " web/dist/"
33
35
polarisServer :
34
- address : " polaris-server :8090"
35
- polarisToken : " polaris@12345678 "
36
+ address : " 127.0.0.1 :8090"
37
+ polarisToken : " nu/0WRA4EqSR1FagrjRj0fZwPXuGlMpX+zCuWu4uMqy8xr1vRjisSbA25aAC3mtU8MeeRsKhQiDAynUR09I= "
36
38
monitorServer :
37
- address : " polaris-prometheus:9090"
38
- oaAuthority :
39
- enableOAAuth : false
40
- hrData :
41
- enableHrData : false
39
+ address : " 127.0.0.1:9090"
40
+ # eventServer:
41
+ # requestUrl:
42
+ # timeout: 5s
43
+ # operationServer:
44
+ # requestUrl:
45
+ # timeout: 5s
46
+ # 存储配置
47
+ store :
48
+ # 数据库存储插件
49
+ name : defaultStore
50
+ option :
51
+ master :
52
+ dbType : mysql
53
+ dbName : polaris_console
54
+ dbUser : root
55
+ dbPwd : polaris
56
+ dbAddr : mysql:3306
57
+ maxOpenConns : 300
58
+ maxIdleConns : 50
59
+ connMaxLifetime : 300 # 单位秒
60
+ txIsolationLevel : 2 # LevelReadCommitted
Original file line number Diff line number Diff line change @@ -16,5 +16,5 @@ scrape_configs:
16
16
static_configs :
17
17
- targets : [ "polaris-pushgateway:9091" ]
18
18
- job_name : " polaris-server"
19
- static_configs :
20
- - targets : [ "polaris-server:9090" ]
19
+ http_sd_configs :
20
+ - url : " polaris-server:8090/prometheus/v1/clients "
You can’t perform that action at this time.
0 commit comments