Merge pull request #5613 from corneil/BAEL-2106

BAEL-2106: Deploy a Spring Boot Application to OpenShift
This commit is contained in:
Loredana Crusoveanu
2018-11-04 15:55:08 +02:00
committed by GitHub
3 changed files with 342 additions and 226 deletions
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: spring-boot-bootstrap
data:
application.properties: |-
spring.datasource.url=jdbc:mysql://baeldung-demo-db:3306/
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,29 @@
spec:
template:
spec:
containers:
- env:
- name: SPRING_PROFILES_ACTIVE
value: mysql,openshift
- name: SPRING_DATASOURCE_USER
valueFrom:
secretKeyRef:
name: baeldung-demo-db
key: database-user
- name: SPRING_DATASOURCE_PASSWORD
valueFrom:
secretKeyRef:
name: baeldung-demo-db
key: database-password
livenessProbe:
httpGet:
path: /actuator/health
port: 8080
scheme: HTTP
initialDelaySeconds: 180
readinessProbe:
httpGet:
path: /actuator/health
port: 8080
scheme: HTTP
initialDelaySeconds: 20