-
Notifications
You must be signed in to change notification settings - Fork 1
/
struts.yaml
75 lines (75 loc) · 1.32 KB
/
struts.yaml
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
apiVersion: v1
kind: Namespace
metadata:
name: struts
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: struts
namespace: struts
labels:
app: struts
spec:
#podAntiAffinity:
#requiredDuringSchedulingIgnoredDuringExecution:
# - labelSelector:
# matchExpressions:
# - key: app
# operator: In
# values:
# - struts
# topologyKey: "kubernetes.io/hostname"
replicas: 1
selector:
matchLabels:
app: struts
template:
metadata:
labels:
app: struts
spec:
containers:
- name: struts
image: reyl/struts:0.1
ports:
- containerPort: 8080
# resources:
# limits:
# cpu: 500m
# requests:
# cpu: 10m
---
apiVersion: v1
kind: Service
metadata:
name: struts
namespace: struts
spec:
type: NodePort
selector:
app: struts
ports:
- protocol: TCP
port: 8080
targetPort: 8080
---
#apiVersion: autoscaling/v2
#kind: HorizontalPodAutoscaler
#metadata:
# name: struts
# namespace: struts
#spec:
# scaleTargetRef:
# apiVersion: apps/v1
# kind: Deployment
# name: struts
# minReplicas: 1
# maxReplicas: 3
# metrics:
# - type: Resource
# resource:
# name: cpu
# target:
# type: Utilization
# averageUtilization: 50