-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathopenlibertyapplication-hosts.yaml
84 lines (84 loc) · 2.15 KB
/
openlibertyapplication-hosts.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
apiVersion: apps.openliberty.io/v1
kind: OpenLibertyApplication
metadata:
name: javaee-cafe-aad-ldap-hosts
namespace: open-liberty-demo
spec:
replicas: 3
applicationImage: javaee-cafe-aad-ldap:1.0.0
expose: true
service:
port: 9443
certificateSecretRef: tls-crt-secret
route:
termination: reencrypt
certificateSecretRef: tls-crt-secret
env:
# Set WLP_LOGGING_CONSOLE_FORMAT to SIMPLE to output logs in a human-readable format instead of the default JSON logging format
- name: WLP_LOGGING_CONSOLE_FORMAT
value: SIMPLE
- name: KEY_ALIAS
value: 'defaultkeystore'
- name: LDAP_SERVER_HOST
valueFrom:
secretKeyRef:
name: aad-ldap-secret
key: ldap.server.host
- name: LDAP_SERVER_PORT
valueFrom:
secretKeyRef:
name: aad-ldap-secret
key: ldap.server.port
- name: LDAP_SERVER_BASEDN
valueFrom:
secretKeyRef:
name: aad-ldap-secret
key: ldap.server.baseDN
- name: LDAP_SERVER_BINDDN
valueFrom:
secretKeyRef:
name: aad-ldap-secret
key: ldap.server.bindDN
- name: LDAP_SERVER_BINDPASSWORD
valueFrom:
secretKeyRef:
name: aad-ldap-secret
key: ldap.server.bindPassword
- name: KEYSTORE_NAME
valueFrom:
secretKeyRef:
name: aad-ldap-secret
key: keystore.name
- name: KEYSTORE_PASS
valueFrom:
secretKeyRef:
name: aad-ldap-secret
key: keystore.pass
- name: ADMIN_GROUP_NAME
valueFrom:
secretKeyRef:
name: aad-ldap-secret
key: admin.group.name
initContainers:
- name: add-hostname
image: busybox
command: ['sh', '-c', 'cp /etc/hosts /hostsconfig && echo "${LDAP_SERVER_IP_ADDRESS} ${LDAP_SERVER_HOST}" >> /hostsconfig/hosts']
volumeMounts:
- name: hostsconfig
mountPath: /hostsconfig
volumeMounts:
- name: config
mountPath: /config/${KEYSTORE_NAME}
readOnly: true
subPath: ${KEYSTORE_NAME}
- name: hostsconfig
mountPath: /etc/hosts
readOnly: true
subPath: hosts
volumes:
- name: config
configMap:
defaultMode: 0600
name: keystore-config
- name: hostsconfig
emptyDir: {}