-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanifest.yml
103 lines (103 loc) · 2.49 KB
/
manifest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
apiVersion: v1
kind: Namespace
metadata:
name: '#{APP_NAMESPACE}#'
---
apiVersion: v1
kind: ConfigMap
metadata:
namespace: '#{APP_NAMESPACE}#'
name: '#{APP_LOWER_NAME}#-configmap'
data:
APP_NAME: '#{APP_NAME}#'
APP_VERSION: '#{APP_VERSION}#'
APP_PORT: '#{APP_PORT}#'
API_PREFIX: '#{API_PREFIX}#'
BUCKET_NAME: '#{BUCKET_NAME}#'
BUCKET_ENDPOINT: '#{BUCKET_ENDPOINT}#'
BUCKET_ACCESS_KEY_ID: '#{BUCKET_ACCESS_KEY_ID}#'
BUCKET_SECRET_ACCESS_KEY: '#{BUCKET_SECRET_ACCESS_KEY}#'
IMG_BASE_URL: '#{IMG_BASE_URL}#'
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: '#{APP_LOWER_NAME}#'
namespace: '#{APP_NAMESPACE}#'
spec:
replicas: 2
selector:
matchLabels:
app: '#{APP_LOWER_NAME}#'
template:
metadata:
labels:
app: '#{APP_LOWER_NAME}#'
spec:
containers:
- name: '#{APP_LOWER_NAME}#'
image: '#{DockerRepo}#/#{APP_LOWER_NAME}#:#{APP_VERSION}#'
resources:
limits:
cpu: '600m'
memory: '750Mi'
requests:
cpu: '200m'
memory: '250Mi'
envFrom:
- configMapRef:
name: '#{APP_LOWER_NAME}#-configmap'
ports:
- containerPort: #{APP_PORT}#
livenessProbe:
httpGet:
path: '#{API_PREFIX}#/health/liveness'
port: #{APP_PORT}#
initialDelaySeconds: 5
periodSeconds: 10
failureThreshold: 10
timeoutSeconds: 10
readinessProbe:
httpGet:
path: '#{API_PREFIX}#/health/readiness'
port: #{APP_PORT}#
initialDelaySeconds: 5
periodSeconds: 10
failureThreshold: 10
timeoutSeconds: 10
---
kind: Service
apiVersion: v1
metadata:
name: '#{APP_LOWER_NAME}#'
namespace: '#{APP_NAMESPACE}#'
labels:
app: '#{APP_LOWER_NAME}#'
spec:
type: ClusterIP
ports:
- port: #{APP_PORT}#
name: web
selector:
app: '#{APP_LOWER_NAME}#'
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: '#{APP_LOWER_NAME}#'
namespace: '#{APP_NAMESPACE}#'
annotations:
kubernetes.io/ingress.class: 'nginx'
cert-manager.io/cluster-issuer: letsencrypt
spec:
rules:
- host: '#{DNS_HOST_NAME}#'
http:
paths:
- path: /api
backend:
serviceName: '#{APP_LOWER_NAME}#'
servicePort: #{APP_PORT}#
tls:
- hosts:
- '#{DNS_HOST_NAME}#'