Verify exact production traces and record rollout
This commit is contained in:
@@ -0,0 +1,292 @@
|
||||
{{- if .Values.observability.enabled }}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ include "medical-chatbot.fullname" . }}-prometheus
|
||||
labels:
|
||||
{{- include "medical-chatbot.labels" . | nindent 4 }}
|
||||
spec:
|
||||
accessModes: [ReadWriteOnce]
|
||||
resources:
|
||||
requests: { storage: {{ .Values.observability.prometheus.storage }} }
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "medical-chatbot.fullname" . }}-prometheus
|
||||
labels:
|
||||
{{- include "medical-chatbot.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: prometheus
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: prometheus
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: prometheus
|
||||
spec:
|
||||
securityContext: { fsGroup: 65534 }
|
||||
containers:
|
||||
- name: prometheus
|
||||
image: {{ .Values.observability.prometheus.image }}
|
||||
args:
|
||||
- --config.file=/etc/prometheus/prometheus.yml
|
||||
- --storage.tsdb.path=/prometheus
|
||||
- --storage.tsdb.retention.time={{ .Values.observability.prometheus.retention }}
|
||||
- --enable-feature=exemplar-storage
|
||||
ports:
|
||||
- { name: http, containerPort: 9090 }
|
||||
readinessProbe:
|
||||
httpGet: { path: /-/ready, port: http }
|
||||
livenessProbe:
|
||||
httpGet: { path: /-/healthy, port: http }
|
||||
initialDelaySeconds: 15
|
||||
resources:
|
||||
{{- toYaml .Values.observability.prometheus.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- { name: config, mountPath: /etc/prometheus }
|
||||
- { name: data, mountPath: /prometheus }
|
||||
volumes:
|
||||
- name: config
|
||||
configMap: { name: {{ include "medical-chatbot.fullname" . }}-prometheus-config }
|
||||
- name: data
|
||||
persistentVolumeClaim: { claimName: {{ include "medical-chatbot.fullname" . }}-prometheus }
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "medical-chatbot.fullname" . }}-prometheus
|
||||
labels:
|
||||
{{- include "medical-chatbot.labels" . | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: prometheus
|
||||
ports:
|
||||
- { name: http, port: 9090, targetPort: http }
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ include "medical-chatbot.fullname" . }}-tempo
|
||||
labels:
|
||||
{{- include "medical-chatbot.labels" . | nindent 4 }}
|
||||
spec:
|
||||
accessModes: [ReadWriteOnce]
|
||||
resources:
|
||||
requests: { storage: {{ .Values.observability.tempo.storage }} }
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "medical-chatbot.fullname" . }}-tempo
|
||||
labels:
|
||||
{{- include "medical-chatbot.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: tempo
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: tempo
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: tempo
|
||||
spec:
|
||||
securityContext: { fsGroup: 10001 }
|
||||
containers:
|
||||
- name: tempo
|
||||
image: {{ .Values.observability.tempo.image }}
|
||||
args: ["-config.file=/etc/tempo/tempo.yml"]
|
||||
ports:
|
||||
- { name: http, containerPort: 3200 }
|
||||
- { name: otlp-grpc, containerPort: 4317 }
|
||||
readinessProbe:
|
||||
httpGet: { path: /ready, port: http }
|
||||
initialDelaySeconds: 5
|
||||
livenessProbe:
|
||||
httpGet: { path: /ready, port: http }
|
||||
initialDelaySeconds: 20
|
||||
resources:
|
||||
{{- toYaml .Values.observability.tempo.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- { name: config, mountPath: /etc/tempo }
|
||||
- { name: data, mountPath: /var/tempo }
|
||||
volumes:
|
||||
- name: config
|
||||
configMap: { name: {{ include "medical-chatbot.fullname" . }}-tempo-config }
|
||||
- name: data
|
||||
persistentVolumeClaim: { claimName: {{ include "medical-chatbot.fullname" . }}-tempo }
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "medical-chatbot.fullname" . }}-tempo
|
||||
labels:
|
||||
{{- include "medical-chatbot.labels" . | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: tempo
|
||||
ports:
|
||||
- { name: http, port: 3200, targetPort: http }
|
||||
- { name: otlp-grpc, port: 4317, targetPort: otlp-grpc }
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "medical-chatbot.fullname" . }}-otel-collector
|
||||
labels:
|
||||
{{- include "medical-chatbot.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: otel-collector
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: otel-collector
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: otel-collector
|
||||
spec:
|
||||
containers:
|
||||
- name: otel-collector
|
||||
image: {{ .Values.observability.collector.image }}
|
||||
args: ["--config=/etc/otelcol/collector.yml"]
|
||||
ports:
|
||||
- { name: otlp-grpc, containerPort: 4317 }
|
||||
- { name: otlp-http, containerPort: 4318 }
|
||||
- { name: health, containerPort: 13133 }
|
||||
readinessProbe:
|
||||
httpGet: { path: /, port: health }
|
||||
livenessProbe:
|
||||
httpGet: { path: /, port: health }
|
||||
initialDelaySeconds: 10
|
||||
resources:
|
||||
{{- toYaml .Values.observability.collector.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- { name: config, mountPath: /etc/otelcol }
|
||||
volumes:
|
||||
- name: config
|
||||
configMap: { name: {{ include "medical-chatbot.fullname" . }}-otel-config }
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "medical-chatbot.fullname" . }}-otel-collector
|
||||
labels:
|
||||
{{- include "medical-chatbot.labels" . | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: otel-collector
|
||||
ports:
|
||||
- { name: otlp-grpc, port: 4317, targetPort: otlp-grpc }
|
||||
- { name: otlp-http, port: 4318, targetPort: otlp-http }
|
||||
- { name: health, port: 13133, targetPort: health }
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ include "medical-chatbot.fullname" . }}-grafana
|
||||
labels:
|
||||
{{- include "medical-chatbot.labels" . | nindent 4 }}
|
||||
spec:
|
||||
accessModes: [ReadWriteOnce]
|
||||
resources:
|
||||
requests: { storage: {{ .Values.observability.grafana.storage }} }
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "medical-chatbot.fullname" . }}-grafana
|
||||
labels:
|
||||
{{- include "medical-chatbot.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: grafana
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: grafana
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: grafana
|
||||
spec:
|
||||
securityContext: { fsGroup: 472 }
|
||||
containers:
|
||||
- name: grafana
|
||||
image: {{ .Values.observability.grafana.image }}
|
||||
ports:
|
||||
- { name: http, containerPort: 3000 }
|
||||
env:
|
||||
- { name: GF_SECURITY_ADMIN_USER, value: admin }
|
||||
- name: GF_SECURITY_ADMIN_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "medical-chatbot.secretName" . }}
|
||||
key: grafana-admin-password
|
||||
- name: GF_AUTH_ANONYMOUS_ENABLED
|
||||
value: {{ .Values.observability.grafana.anonymousAdmin | quote }}
|
||||
- name: GF_AUTH_ANONYMOUS_ORG_ROLE
|
||||
value: Admin
|
||||
- name: GF_AUTH_DISABLE_LOGIN_FORM
|
||||
value: {{ .Values.observability.grafana.anonymousAdmin | quote }}
|
||||
readinessProbe:
|
||||
httpGet: { path: /api/health, port: http }
|
||||
initialDelaySeconds: 10
|
||||
livenessProbe:
|
||||
httpGet: { path: /api/health, port: http }
|
||||
initialDelaySeconds: 30
|
||||
resources:
|
||||
{{- toYaml .Values.observability.grafana.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- { name: datasource, mountPath: /etc/grafana/provisioning/datasources }
|
||||
- { name: dashboard-provider, mountPath: /etc/grafana/provisioning/dashboards }
|
||||
- { name: dashboards, mountPath: /var/lib/grafana/dashboards }
|
||||
- { name: data, mountPath: /var/lib/grafana }
|
||||
volumes:
|
||||
- name: datasource
|
||||
configMap:
|
||||
name: {{ include "medical-chatbot.fullname" . }}-grafana-provisioning
|
||||
items: [{ key: datasources.yml, path: datasources.yml }]
|
||||
- name: dashboard-provider
|
||||
configMap:
|
||||
name: {{ include "medical-chatbot.fullname" . }}-grafana-provisioning
|
||||
items: [{ key: dashboards.yml, path: dashboards.yml }]
|
||||
- name: dashboards
|
||||
configMap:
|
||||
name: {{ include "medical-chatbot.fullname" . }}-grafana-provisioning
|
||||
items: [{ key: dashboard.json, path: dashboard.json }]
|
||||
- name: data
|
||||
persistentVolumeClaim: { claimName: {{ include "medical-chatbot.fullname" . }}-grafana }
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "medical-chatbot.fullname" . }}-grafana
|
||||
labels:
|
||||
{{- include "medical-chatbot.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.observability.grafana.service.type }}
|
||||
selector:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: grafana
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.observability.grafana.service.port }}
|
||||
targetPort: http
|
||||
{{- if and (eq .Values.observability.grafana.service.type "NodePort") .Values.observability.grafana.service.nodePort }}
|
||||
nodePort: {{ .Values.observability.grafana.service.nodePort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user