Files
svc-api-x/build/microservice.yaml.tmpl
T
2024-11-05 10:21:18 +03:00

122 lines
2.8 KiB
Cheetah

---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: {{ appName }}
stand: {{ stand }}
name: {{ appName }}
namespace: {{ namespace }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ appName }}
stand: {{ stand }}
template:
metadata:
labels:
app: {{ appName }}
stand: {{ stand }}
spec:
containers:
- image: {{ registryUrl }}/{{ registryContainerName }}:{{ version }}
imagePullPolicy: IfNotPresent
name: commandbox-lucee
ports:
- containerPort: {{ appPort }}
protocol: TCP
readinessProbe:
failureThreshold: 3
initialDelaySeconds: 10
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 2
httpGet:
path: /
port: {{ appPort }}
scheme: HTTP
livenessProbe:
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
tcpSocket:
port: {{ appPort }}
resources:
requests:
cpu: 500m
memory: 1024Mi
limits:
cpu: 500m
memory: 1024Mi
envFrom:
- secretRef:
name: envs-secrets-{{ appName }}
# envFrom:
# - secretRef:
# name: deploymentSecrets
volumeMounts:
- name: app-logs
mountPath: /usr/lib/serverHome/logs/
- image: drn.tst.nubes.ru/fluent-bit:2.2.1
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 100m
memory: 256Mi
imagePullPolicy: IfNotPresent
name: sidecar-filebeat
volumeMounts:
- name: app-logs
mountPath: /usr/lib/serverHome/logs/
- name: fluentbit-config
mountPath: /fluent-bit/etc/
volumes:
- name: app-logs
- name: fluentbit-config
configMap:
name: {{ fbConfigMap }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ appName }}
namespace: {{ namespace }}
labels:
app: {{ appName }}
spec:
ports:
- port: {{ appPort }}
protocol: TCP
selector:
app: {{ appName }}
# ---
# apiVersion: networking.k8s.io/v1
# kind: Ingress
# metadata:
# name: {{ appName }}
# namespace: {{ namespace }}
# spec:
# ingressClassName: nginx
# rules:
# - host: {{ domainName }}
# http:
# paths:
# - backend:
# service:
# name: {{ appName }}
# port:
# number: {{ appPort }}
# path: /
# pathType: Prefix
# tls:
# - hosts:
# - {{ domainName }}
# secretName: api-deck-tls