-
Notifications
You must be signed in to change notification settings - Fork 77
/
petclinic.yaml
122 lines (121 loc) · 2.85 KB
/
petclinic.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
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: petclinic-backend
labels:
app: petclinic-backend
spec:
replicas: 1
selector:
matchLabels:
app: petclinic-backend
template:
metadata:
labels:
app: petclinic-backend
spec:
containers:
- name: petclinic-backend
image: "datastaxdevs/petclinic-backend"
#command: ["tail"]
#args: ["-f", "/dev/null"]
env:
- name: CASSANDRA_USER
valueFrom:
secretKeyRef:
name: k8ssandra-superuser
key: username
- name: CASSANDRA_PASSWORD
valueFrom:
secretKeyRef:
name: k8ssandra-superuser
key: password
- name: LISTENING_PORT
value: "9966"
- name: MONITORING_ENABLED
value: "true"
- name: MONITORING_PROMETHEUS
value: "true"
- name: MONITORING_METRICS
value: "true"
- name: MONITORING_LISTENING_PORT
value: "9967"
- name: DISTRIBUTED_TRACING_ENABLED
value: "true"
- name: DISTRIBUTED_TRACING_URL
value: "http://tracing-server:9411"
- name: CASSANDRA_CONTACT_POINTS
value: "k8ssandra-dc1-service:9042"
- name: CASSANDRA_LOCAL_DC
value: "dc1"
- name: CASSANDRA_KEYSPACE_CREATE
value: "true"
- name: CASSANDRA_KEYSPACE_NAME
value: "spring_petclinic"
- name: CASSANDRA_KEYSPACE_CQL
value: "CREATE KEYSPACE IF NOT EXISTS spring_petclinic WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };"
---
kind: Service
apiVersion: v1
metadata:
name: petclinic-backend
spec:
#type: NodePort
selector:
app: petclinic-backend
ports:
# Default port used by the image
- port: 9966
#targetPort: 9966
#nodePort: 30000
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: petclinic-frontend
labels:
app: petclinic-frontend
spec:
replicas: 1
selector:
matchLabels:
app: petclinic-frontend
template:
metadata:
labels:
app: petclinic-frontend
spec:
containers:
- name: petclinic-frontend
image: "datastaxdevs/petclinic-frontend"
#command: ["tail"]
#args: ["-f", "/dev/null"]
---
kind: Service
apiVersion: v1
metadata:
name: petclinic-frontend
spec:
selector:
app: petclinic-frontend
ports:
- port: 8081
targetPort: 8080
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: petclinic-ingress
spec:
rules:
- http:
paths:
- path: /
backend:
serviceName: petclinic-frontend
servicePort: 8081
- path: /petclinic/api
backend:
serviceName: petclinic-backend
servicePort: 9966
---