-
Notifications
You must be signed in to change notification settings - Fork 0
/
openlibertyapplication-cluster.yaml
47 lines (47 loc) · 1.54 KB
/
openlibertyapplication-cluster.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
apiVersion: openliberty.io/v1beta1
kind: OpenLibertyApplication
metadata:
# Note:
# - replace "${DB_Type}" with "mssql" for testing DB connection with Azure SQL
# - replace "${DB_Type}" with "postgres" for testing DB connection with Azure Database for PostgreSQL
name: javaee-cafe-cluster-connect-db-${DB_Type}
namespace: open-liberty-demo
spec:
# Note: replace "${REPLICAS}" with number of pods to be created
replicas: ${REPLICAS}
# Note:
# - replace "${Image_Name}" with "javaee-cafe-connect-db-mssql" for testing DB connection with Azure SQL
# - replace "${Image_Name}" with "javaee-cafe-connect-db-postgres" for testing DB connection with Azure Database for PostgreSQL
applicationImage: ${Image_Name}:1.0.0
expose: true
# Note:
# - replace "${DB_Type}" with "mssql" for testing DB connection with Azure SQL
# - replace "${DB_Type}" with "postgres" for testing DB connection with Azure Database for PostgreSQL
env:
- name: SHOW_HOST_NAME
value: 'true'
- name: DB_SERVER_NAME
valueFrom:
secretKeyRef:
name: db-secret-${DB_Type}
key: db.server.name
- name: DB_PORT_NUMBER
valueFrom:
secretKeyRef:
name: db-secret-${DB_Type}
key: db.port.number
- name: DB_NAME
valueFrom:
secretKeyRef:
name: db-secret-${DB_Type}
key: db.name
- name: DB_USER
valueFrom:
secretKeyRef:
name: db-secret-${DB_Type}
key: db.user
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: db-secret-${DB_Type}
key: db.password