Skip to content

Commit 71bca21

Browse files
committed
Fixing helmtemplate & helm values
1 parent 24efb1a commit 71bca21

File tree

100 files changed

+1035
-311
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+1035
-311
lines changed

_infra/helm/dev/api-rest-values.yml

Lines changed: 205 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ secret:
55

66
configMap:
77
enabled: true
8-
name: "bookstore-adot-rest-api"
8+
name: "bookstore-adot"
99
mountPath: /app/core/config
1010
readOnly: true
1111
data:
12-
.app.config.json : |-
12+
.app.config.json: |-
1313
{
1414
"AppName": "GO App",
1515
"GRPCTimeout": 10,
@@ -18,29 +18,30 @@ configMap:
1818
"DefaultPageLimit": 3,
1919
"ClientTimeout": 10
2020
}
21-
.env : |-
21+
.env: |-
2222
export GIN_MODE=release
2323
2424
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
2627
pullPolicy: Always
27-
tag: "latest"
28+
tag: "alpine"
2829

2930
imagePullSecrets: []
3031
nameOverride: ""
31-
fullnameOverride: "bookstore-adot-rest"
32+
fullnameOverride: "bookstore-adot"
3233

3334
serviceAccount:
3435
create: true
3536
annotations: {}
36-
name: bookstore-adot-rest
37-
namespace: devops-tools
37+
name: bookstore-adot
38+
namespace: devopscorner
3839

3940
service:
40-
type: ClusterIP
41+
type: NodePort
4142
ports:
4243
- name: http
43-
port: 80
44+
port: 8080
4445
targetPort: 8080
4546
protocol: TCP
4647

@@ -53,51 +54,232 @@ container:
5354
ingress:
5455
enabled: true
5556
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: "*"
5960
nginx.ingress.kubernetes.io/enable-cors: "true"
6061
nginx.ingress.kubernetes.io/affinity: cookie
6162
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
6263
kubernetes.io/ingress.class: nginx
6364
ingress.kubernetes.io/whitelist-source-range: 32.0.0.0/32
6465
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
6768
http:
6869
paths:
6970
- path: /
71+
pathType: Prefix # Prefix -or - ImplementationSpecific
7072
backend:
71-
serviceName: bookstore-adot-rest
72-
servicePort: 80
73+
service:
74+
name: bookstore-adot
75+
port:
76+
number: 8080
7377
tls: []
7478

75-
7679
application:
7780
enabled: true
7881
env:
7982
- name: HELM_TEMPLATE_NAME
8083
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"
81263

82264
resources:
83265
limits:
84-
cpu: 200m
85-
memory: 300Mi
266+
cpu: 300m
267+
memory: 500Mi
86268
requests:
87-
cpu: 100m
269+
cpu: 150m
88270
memory: 150Mi
89271

90272
autoscaling:
91273
enabled: true
92274
minReplicas: 1
93-
maxReplicas: 4
275+
maxReplicas: 1
94276
targetCPUUtilizationPercentage: 80
95277
targetMemoryUtilizationPercentage: 80
96278

97279
nodeSelector:
98280
enabled: true
99281
select:
100-
node: "devops-tools"
282+
node: "goapp-prod"
101283

102284
tolerations: []
103285

0 commit comments

Comments
 (0)