-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkube.template.yml
68 lines (67 loc) · 1.28 KB
/
kube.template.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .app }}
labels:
app: {{ .app }}
spec:
replicas: {{ .replicas }}
selector:
matchLabels:
app: {{ .app }}
template:
metadata:
labels:
app: {{ .app }}
spec:
containers:
- name: {{ .app }}
image: {{ .image }}
ports:
- containerPort: 80
resources:
limits:
cpu: 10m
memory: 20Mi
requests:
cpu: 10m
memory: 20Mi
imagePullSecrets:
- name: ghcrcred
---
apiVersion: v1
kind: Service
metadata:
name: {{ .app }}
spec:
type: ClusterIP
selector:
app: {{ .app }}
ports:
- protocol: TCP
port: 80
targetPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .app }}
annotations:
kubernetes.io/ingress.class: nginx
# cert-manager.io/cluster-issuer: letsencrypt
spec:
rules:
- host: {{ .domain }}
http:
paths:
- backend:
service:
name: {{ .app }}
port:
number: 80
path: /
pathType: ImplementationSpecific
tls:
- hosts:
- {{ .domain }}
secretName: {{ .app }}-ingress-cert