iac/rmk/apps/comparisons/deployment-frontend.yaml
emelinda 32d408107f rmk: remove nginx configmaps and hardcoded secrets
- delete configmap-nginx-configmap and its volume/volumeMounts
  in comparisons, django, notes frontends (use image-bundled config)
- clear hardcoded DJANGO_TOKEN and KAFKA_PASSWORD defaults
  in issues/configmap-production-configmap (values come from Vault)
- clear hardcoded Django SECRET_KEY in django/configmap-django-configmap
2026-11-17 19:27:47 +03:00

92 lines
2.4 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
labels:
app: frontend
service: frontend
namespace: comparisons
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
service: frontend
annotations:
proxy.istio.io/config: |
tracing:
sampling: 100
zipkin:
address: signoz-otel-collector-external.signoz.svc.cluster.local:9411
custom_tags:
k8s.pod.name:
environment:
name: POD_NAME
k8s.namespace.name:
environment:
name: POD_NAMESPACE
k8s.pod.ip:
environment:
name: INSTANCE_IP
traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411
spec:
imagePullSecrets:
- name: regcred
nodeSelector:
dedicated: frontend
tolerations:
- key: dedicated
operator: Equal
value: frontend
effect: NoSchedule
containers:
- name: frontend
image: cr.yandex/crp3ccidau046kdj8g9q/comparisons-frontend:latest
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /ping
port: 80
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 10
readinessProbe:
httpGet:
path: /ping
port: 80
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 20
env:
- name: K8S_POD_UID
valueFrom:
fieldRef:
fieldPath: metadata.uid
- name: K8S_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: K8S_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: OTEL_RESOURCE_ATTRIBUTES
value: k8s.pod.uid=$(K8S_POD_UID),k8s.pod.name=$(K8S_POD_NAME),k8s.namespace.name=$(K8S_NAMESPACE)
resources:
requests:
memory: 100Mi
cpu: 25m