This repository has been archived by the owner on Aug 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s_app.yml
129 lines (129 loc) · 2.8 KB
/
k8s_app.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
apiVersion: extensions/v1beta
kind: Ingress
metadata:
name: k8s-sample-ingress
spec:
rules:
- host: k8s.eirini.com
http:
paths:
- backend:
serviceName: k8s-sample
servicePort: 80
---
apiVersion: v1
kind: Service
metadata:
labels:
k8s-app: cfsummit
name: cfsummit
spec:
ports:
- port: 80
targetPort: 8080
selector:
k8s-app: cfsummit
---
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: cfsummit
spec:
minAvailable: 2
selector:
matchLabels:
k8s-app: cfsummit
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
description: Great demo
labels:
k8s-app: cfsummit
name: cfsummit
namespace: default
spec:
progressDeadlineSeconds: 600
replicas: 3
selector:
matchLabels:
k8s-app: cfsummit
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
k8s-app: cfsummit
name: cfsummit
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: k8s-app
operator: In
values:
- cfsummit
topologyKey: "kubernetes.io/hostname"
volumes:
- name: shared-data
emptyDir: {}
- name: secret-volume
secret:
secretName: app-server-secret
initContainers:
- name: run-migration
image: cfsummitdemo/springmusicmigration:v2
command: ["/bin/run_migration.sh"]
containers:
- image: cfsummitdemo/tweet_loader:21fab0554
name: poller
volumeMounts:
- name: shared-data
mountPath: /tweet-info
- image: cfsummitdemo/springmusic:v2
imagePullPolicy: Always
name: cfsummit
env:
- name: SOMETHING
value: value
securityContext:
privileged: false
volumeMounts:
- name: shared-data
mountPath: /data/tweets
readOnly: true
- name: secret-volume
mountPath: "/config"
readOnly: true
readinessProbe:
httpGet:
path: /actuator/health
port: 8080
initialDelaySeconds: 10
periodSeconds: 3
successThreshold: 2
livenessProbe:
httpGet:
path: /actuator/health
port: 8080
initialDelaySeconds: 45
periodSeconds: 3
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
---
apiVersion: v1
kind: Secret
metadata:
name: app-server-certs
type: Opaque
data:
secretJson: eyJwYXNzd29yZCI6Imh1bnRlciJ9Cg==