@@ -5,11 +5,11 @@ secret:
5
5
6
6
configMap :
7
7
enabled : true
8
- name : " bookstore-adot-rest-api "
8
+ name : " bookstore-adot"
9
9
mountPath : /app/core/config
10
10
readOnly : true
11
11
data :
12
- .app.config.json : |-
12
+ .app.config.json : |-
13
13
{
14
14
"AppName": "GO App",
15
15
"GRPCTimeout": 10,
@@ -18,29 +18,30 @@ configMap:
18
18
"DefaultPageLimit": 3,
19
19
"ClientTimeout": 10
20
20
}
21
- .env : |-
21
+ .env : |-
22
22
export GIN_MODE=release
23
23
24
24
image :
25
- repository : YOUR_AWS_ACCOUNT.dkr.ecr.us-west-2.amazonaws.com/devopscorner/bookstore-adot
25
+ # repository: YOUR_AWS_ACCOUNT.dkr.ecr.us-west-2.amazonaws.com/devopscorner/bookstore-adot
26
+ repository : devopscorner/bookstore-adot
26
27
pullPolicy : Always
27
- tag : " latest "
28
+ tag : " alpine "
28
29
29
30
imagePullSecrets : []
30
31
nameOverride : " "
31
- fullnameOverride : " bookstore-adot-rest "
32
+ fullnameOverride : " bookstore-adot"
32
33
33
34
serviceAccount :
34
35
create : true
35
36
annotations : {}
36
- name : bookstore-adot-rest
37
- namespace : devops-tools
37
+ name : bookstore-adot
38
+ namespace : devopscorner
38
39
39
40
service :
40
- type : ClusterIP
41
+ type : NodePort
41
42
ports :
42
43
- name : http
43
- port : 80
44
+ port : 8080
44
45
targetPort : 8080
45
46
protocol : TCP
46
47
@@ -53,51 +54,232 @@ container:
53
54
ingress :
54
55
enabled : true
55
56
annotations :
56
- nginx.ingress.kubernetes.io/cors-allow-headers : ' * '
57
- nginx.ingress.kubernetes.io/cors-allow-methods : ' * '
58
- nginx.ingress.kubernetes.io/cors-allow-origin : ' * '
57
+ nginx.ingress.kubernetes.io/cors-allow-headers : " * "
58
+ nginx.ingress.kubernetes.io/cors-allow-methods : " * "
59
+ nginx.ingress.kubernetes.io/cors-allow-origin : " * "
59
60
nginx.ingress.kubernetes.io/enable-cors : " true"
60
61
nginx.ingress.kubernetes.io/affinity : cookie
61
62
nginx.ingress.kubernetes.io/from-to-www-redirect : " true"
62
63
kubernetes.io/ingress.class : nginx
63
64
ingress.kubernetes.io/whitelist-source-range : 32.0.0.0/32
64
65
hosts :
65
- # - host: bookstore-adot-rest .awscb.id
66
- - host : bookstore-adot-rest.devops-tools .svc.cluster.local
66
+ # - host: bookstore-adot.awscb.id
67
+ - host : bookstore-adot.devopscorner .svc.cluster.local
67
68
http :
68
69
paths :
69
70
- path : /
71
+ pathType : Prefix # Prefix -or - ImplementationSpecific
70
72
backend :
71
- serviceName : bookstore-adot-rest
72
- servicePort : 80
73
+ service :
74
+ name : bookstore-adot
75
+ port :
76
+ number : 8080
73
77
tls : []
74
78
75
-
76
79
application :
77
80
enabled : true
78
81
env :
79
82
- name : HELM_TEMPLATE_NAME
80
83
value : api
84
+ # ======================== #
85
+ # GIN Mode #
86
+ # ======================== #
87
+ - name : GIN_MODE
88
+ value : release
89
+ # ======================== #
90
+ # App URL & Port #
91
+ # ======================== #
92
+ - name : APP_URL
93
+ value : " http://localhost"
94
+ - name : APP_PORT
95
+ value : " 8080"
96
+ # ======================== #
97
+ # Connection Type #
98
+ # - sqlite #
99
+ # - mysql #
100
+ # - postgres #
101
+ # - dynamo #
102
+ # ======================== #
103
+ - name : DB_CONNECTION
104
+ value : dynamo
105
+ - name : DB_HOST
106
+ value : " http://localhost"
107
+ - name : DB_PORT
108
+ value : " "
109
+ - name : DB_DATABASE
110
+ value : dynamodb-golang-adot
111
+ - name : DB_USERNAME
112
+ valueFrom :
113
+ secretKeyRef :
114
+ name : golang-adot-secret
115
+ key : db_username
116
+ - name : DB_PASSWORD
117
+ valueFrom :
118
+ secretKeyRef :
119
+ name : golang-adot-secret
120
+ key : db_password
121
+ # ======================== #
122
+ # JWT Credentials #
123
+ # ======================== #
124
+ - name : JWT_AUTH_USERNAME
125
+ valueFrom :
126
+ secretKeyRef :
127
+ name : golang-adot-secret
128
+ key : jwt_auth_username
129
+ - name : JWT_AUTH_PASSWORD
130
+ valueFrom :
131
+ secretKeyRef :
132
+ name : golang-adot-secret
133
+ key : jwt_auth_password
134
+ - name : JWT_SECRET
135
+ valueFrom :
136
+ secretKeyRef :
137
+ name : golang-adot-secret
138
+ key : jwt_secret
139
+ # ======================== #
140
+ # LOG Level #
141
+ # ======================== #
142
+ - name : LOG_LEVEL
143
+ value : INFO
144
+ # ======================== #
145
+ # AWS Credentials #
146
+ # ======================== #
147
+ - name : AWS_REGION
148
+ value : us-west-2
149
+ - name : AWS_ACCESS_KEY
150
+ valueFrom :
151
+ secretKeyRef :
152
+ name : golang-adot-secret
153
+ key : aws_access_key
154
+ - name : AWS_SECRET_KEY_ID
155
+ valueFrom :
156
+ secretKeyRef :
157
+ name : golang-adot-secret
158
+ key : aws_secret_key
159
+ # ======================== #
160
+ # OpenSearch Credentials #
161
+ # ======================== #
162
+ - name : OPENSEARCH_ENDPOINT
163
+ value : https://opensearch.us-west-2.es.amazonaws.com
164
+ - name : OPENSEARCH_USERNAME
165
+ valueFrom :
166
+ secretKeyRef :
167
+ name : golang-adot-secret
168
+ key : opensearch_username
169
+ - name : OPENSEARCH_PASSWORD
170
+ valueFrom :
171
+ secretKeyRef :
172
+ name : golang-adot-secret
173
+ key : opensearch_password
174
+ # ======================== #
175
+ # Prometheus #
176
+ # ======================== #
177
+ - name : PROMETHEUS_ENDPOINT
178
+ value : http://localhost:8088
179
+ - name : PROMETHEUS_PORT
180
+ value : " 8088"
181
+ # ======================== #
182
+ # Grafana #
183
+ # ======================== #
184
+ - name : GRAFANA_ENDPOINT
185
+ value : http://localhost:3000
186
+ - name : GRAFANA_API_KEY
187
+ valueFrom :
188
+ secretKeyRef :
189
+ name : golang-adot-secret
190
+ key : grafana_api_key
191
+ # ======================== #
192
+ # OpenTelemetry #
193
+ # ======================== #
194
+ - name : OTEL_INSTRUMENTATION_METRIC_ENABLED
195
+ value : " true"
196
+ - name : OTEL_INSTRUMENTATION_TRACE_ENABLED
197
+ value : " true"
198
+ - name : OTEL_INSTRUMENTATION_LOG_ENABLED
199
+ value : " true"
200
+ # Trace Type: xray / jaeger
201
+ - name : OTEL_INSTRUMENTATION_TRACE_NAME
202
+ value : xray
203
+ - name : OTEL_SERVICE_NAME
204
+ value : bookstore-adot
205
+ - name : OTEL_EXPORTER_OTLP_ENDPOINT
206
+ value : http://localhost:4317
207
+ - name : OTEL_EXPORTER_OTLP_PORT
208
+ value : " 4317"
209
+ - name : OTEL_EXPORTER_OTLP_INSECURE
210
+ value : " true"
211
+ - name : OTEL_EXPORTER_OTLP_HEADERS
212
+ value : " "
213
+ - name : OTEL_RESOURCE_ATTRIBUTES
214
+ value : " "
215
+ # ======================== #
216
+ # Jaeger #
217
+ # ======================== #
218
+ - name : JAEGER_AGENT_PORT
219
+ value : " 6831"
220
+ # Sampler Type: const / probabilistic / rateLimiting / remote
221
+ - name : JAEGER_SAMPLER_TYPE
222
+ value : const
223
+ - name : JAEGER_SAMPLER_PARAM
224
+ value : " 1"
225
+ - name : JAEGER_SAMPLER_MANAGER_HOST_PORT
226
+ value : " 5000"
227
+ - name : JAEGER_REPORTER_LOG_SPANS
228
+ value : " true"
229
+ # Interval in seconds (5*time.Second)
230
+ - name : JAEGER_REPORTER_BUFFER_FLUSH_INTERVAL
231
+ value : " 5*time.Second"
232
+ - name : JAEGER_REPORTER_MAX_QUEUE_SIZE
233
+ value : " 100"
234
+ - name : JAEGER_REPORTER_LOCAL_AGENT_HOST_PORT
235
+ value : " 5001"
236
+ - name : JAEGER_REPORTER_COLLECTOR_ENDPOINT
237
+ value : http://localhost:14268/api/traces
238
+ - name : JAEGER_REPORTER_COLLECTOR_USER
239
+ valueFrom :
240
+ secretKeyRef :
241
+ name : golang-adot-secret
242
+ key : jaeger_reporter_collector_user
243
+ - name : JAEGER_REPORTER_COLLECTOR_PASSWORD
244
+ valueFrom :
245
+ secretKeyRef :
246
+ name : golang-adot-secret
247
+ key : jaeger_reporter_collector_password
248
+ - name : JAEGER_TAGS
249
+ value : " golang,otel,restful,api,bookstore"
250
+ # ======================== #
251
+ # X-Ray #
252
+ # - latest #
253
+ # - 3.x #
254
+ # - 2.x #
255
+ # - 1.x #
256
+ # ======================== #
257
+ - name : XRAY_VERSION
258
+ value : latest
259
+ - name : XRAY_DAEMON_ENDPOINT
260
+ value : http://localhost:2000
261
+ - name : XRAY_DAEMON_PORT
262
+ value : " 2000"
81
263
82
264
resources :
83
265
limits :
84
- cpu : 200m
85
- memory : 300Mi
266
+ cpu : 300m
267
+ memory : 500Mi
86
268
requests :
87
- cpu : 100m
269
+ cpu : 150m
88
270
memory : 150Mi
89
271
90
272
autoscaling :
91
273
enabled : true
92
274
minReplicas : 1
93
- maxReplicas : 4
275
+ maxReplicas : 1
94
276
targetCPUUtilizationPercentage : 80
95
277
targetMemoryUtilizationPercentage : 80
96
278
97
279
nodeSelector :
98
280
enabled : true
99
281
select :
100
- node : " devops-tools "
282
+ node : " goapp-prod "
101
283
102
284
tolerations : []
103
285
0 commit comments