File tree Expand file tree Collapse file tree 7 files changed +427
-140
lines changed
platforms/kubernetes/postgres-operator Expand file tree Collapse file tree 7 files changed +427
-140
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ operator-yaml: operator-image
34
34
cp jq-template.awk platforms/kubernetes/postgres-operator/deploy/jq-template.awk
35
35
cd platforms/kubernetes/postgres-operator/deploy/; awk -f jq-template.awk postgres-operator.yaml.template > postgres-operator.yaml
36
36
exporter-image :
37
+ cp exporterversions.json image/exporter/versions.json
37
38
cd image/exporter; ./generate_image.sh
38
39
39
40
format :
Original file line number Diff line number Diff line change
1
+ {
2
+ "image" : " radondb-postgres-exporter:v0.9.0"
3
+ }
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ RUN set -eux; \
114
114
sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list; \
115
115
sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list; \
116
116
apt update; \
117
- apt install -y --no-install-recommends vim sysstat inetutils-ping procps net-tools ssh sshpass ; \
117
+ apt install -y --no-install-recommends vim sysstat inetutils-ping procps net-tools ssh sshpass curl ; \
118
118
apt install -y --no-install-recommends gosu locales ; \
119
119
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 ; \
120
120
apt-get clean; \
Original file line number Diff line number Diff line change 99
99
enum :
100
100
- true
101
101
- false
102
+ volume_type :
103
+ type : string
104
+ enum :
105
+ - ' local'
106
+ - ' cloud'
107
+ antiaffinity :
108
+ type : object
109
+ x-kubernetes-preserve-unknown-fields : true
110
+ properties :
111
+ policy :
112
+ type : string
113
+ enum :
114
+ - ' preferred'
115
+ - ' required'
116
+ podAntiAffinityTerm :
117
+ type : string
118
+ enum :
119
+ - ' none'
120
+ - ' autofailover-readwrite'
121
+ - ' autofailover-readwrite-readonly'
122
+ topologyKey :
123
+ type : string
102
124
services :
103
125
type : array
104
126
items :
Original file line number Diff line number Diff line change 12
12
podAntiAffinityTerm : autofailover-readwrite # none/autofailover-readwrite/autofailover-readwrite-readonly
13
13
topologyKey : " kubernetes.io/hostname" # when policy is required, only allow "kubernetes.io/hostname"
14
14
services :
15
+ - selector : autofailover # autofailover/primary/standby/readonly/standby-readonly
16
+ metadata :
17
+ name : autofailover
18
+ spec :
19
+ type : ClusterIP
20
+ ports :
21
+ - name : exporter # cant' change the name
22
+ port : 9187 # targetPort: 9187
15
23
- selector : primary # autofailover/primary/standby/readonly/standby-readonly
16
24
metadata :
17
25
name : readwrite
20
28
ports :
21
29
- name : prime # cant' change the name
22
30
port : 5432
31
+ - name : exporter # cant' change the name
32
+ port : 9187
23
33
- selector : standby-readonly
24
34
metadata :
25
35
name : standby-readonly
28
38
ports :
29
39
- name : prime # cant' change the name
30
40
port : 5432
41
+ - name : exporter # cant' change the name
42
+ port : 9187
31
43
autofailover :
32
44
hbas :
33
45
- host all all all md5
46
58
limits :
47
59
memory : " 200Mi"
48
60
cpu : " 0.2"
61
+ - image : radondb-postgres-exporter:v0.9.0
62
+ imagePullPolicy : IfNotPresent
63
+ name : exporter # can't change the name
64
+ resources :
65
+ limits :
66
+ memory : " 100Mi"
67
+ cpu : " 0.1"
49
68
volumeClaimTemplates :
50
69
- metadata :
51
70
name : data
59
78
admin :
60
79
- name : root
61
80
password : root
62
- maintenance :
63
- - name : maintenance
64
- password : maintenance
65
81
normal :
66
82
- name : lzzhang
67
83
password : lzzhang
@@ -87,6 +103,13 @@ spec:
87
103
limits :
88
104
memory : " 200Mi"
89
105
cpu : " 0.2"
106
+ - image : radondb-postgres-exporter:v0.9.0
107
+ imagePullPolicy : IfNotPresent
108
+ name : exporter # can't change the name
109
+ resources :
110
+ limits :
111
+ memory : " 100Mi"
112
+ cpu : " 0.1"
90
113
volumeClaimTemplates :
91
114
- metadata :
92
115
name : data
@@ -111,6 +134,13 @@ spec:
111
134
limits :
112
135
memory : " 200Mi"
113
136
cpu : " 0.2"
137
+ - image : radondb-postgres-exporter:v0.9.0
138
+ imagePullPolicy : IfNotPresent
139
+ name : exporter # can't change the name
140
+ resources :
141
+ limits :
142
+ memory : " 100Mi"
143
+ cpu : " 0.1"
114
144
volumeClaimTemplates :
115
145
- metadata :
116
146
name : data
Original file line number Diff line number Diff line change 19
19
CONTAINERS = "containers"
20
20
CONTAINER_NAME = "name"
21
21
PODSPEC_CONTAINERS_POSTGRESQL_CONTAINER = "postgresql"
22
+ PODSPEC_CONTAINERS_EXPORTER_CONTAINER = "exporter"
22
23
PRIME_SERVICE_PORT_NAME = "prime"
24
+ EXPORTER_SERVICE_PORT_NAME = "exporter"
23
25
HBAS = "hbas"
24
26
CONFIGS = "configs"
25
27
REPLICAS = "replicas"
142
144
- ./pgenv
143
145
command:
144
146
- auto_failover
147
+ %s:
148
+ container_name: %s
149
+ image: ${exporterimage}
150
+ network_mode: host
151
+ restart: always
152
+ env_file:
153
+ - ./exporterenv
145
154
'''
146
155
147
156
# .env
150
159
image={0}
151
160
host_name={1}
152
161
pgdata={2}
162
+ exporterimage={3}
153
163
'''
154
164
155
165
# env_file
156
166
DOCKER_COMPOSE_ENVFILE = "pgenv"
167
+ DOCKER_COMPOSE_EXPORTER_ENVFILE = "exporterenv"
157
168
158
169
# docker-compose data dirctory
159
170
DOCKER_COMPOSE_DIR = "docker_compose"
You can’t perform that action at this time.
0 commit comments