Skip to content

Commit

Permalink
YAML deployment files for 4-finish sample project
Browse files Browse the repository at this point in the history
  • Loading branch information
majguo committed Jul 5, 2020
1 parent 131a75a commit d64183e
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 0 deletions.
11 changes: 11 additions & 0 deletions 4-finish/aad-oidc-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Secret
metadata:
name: aad-oidc-secret
namespace: open-liberty-demo
type: Opaque
stringData:
client.id: ${CLIENT_ID}
client.secret: ${CLIENT_SECRET}
tenant.id: ${TENANT_ID}
admin.group.id: ${ADMIN_GROUP_ID}
12 changes: 12 additions & 0 deletions 4-finish/db-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Secret
metadata:
name: db-secret-postgres
namespace: open-liberty-demo
type: Opaque
stringData:
db.server.name: ${DB_SERVER_NAME}
db.port.number: "${DB_PORT_NUMBER}"
db.name: ${DB_NAME}
db.user: ${DB_USER}
db.password: ${DB_PASSWORD}
65 changes: 65 additions & 0 deletions 4-finish/openlibertyapplication.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
apiVersion: openliberty.io/v1beta1
kind: OpenLibertyApplication
metadata:
name: javaee-cafe-all-in-one
namespace: open-liberty-demo
spec:
replicas: 1
# NOTE:
# - replace "${Your_DockerHub_Account}" with your Docker Hub account name
applicationImage: docker.io/${Your_DockerHub_Account}/javaee-cafe-all-in-one:latest
expose: true
service:
port: 9443
certificateSecretRef: tls-crt-secret
route:
termination: reencrypt
certificateSecretRef: tls-crt-secret
env:
- name: KEY_ALIAS
value: 'defaultkeystore'
- name: CLIENT_ID
valueFrom:
secretKeyRef:
name: aad-oidc-secret
key: client.id
- name: CLIENT_SECRET
valueFrom:
secretKeyRef:
name: aad-oidc-secret
key: client.secret
- name: TENANT_ID
valueFrom:
secretKeyRef:
name: aad-oidc-secret
key: tenant.id
- name: ADMIN_GROUP_ID
valueFrom:
secretKeyRef:
name: aad-oidc-secret
key: admin.group.id
- name: DB_SERVER_NAME
valueFrom:
secretKeyRef:
name: db-secret-postgres
key: db.server.name
- name: DB_PORT_NUMBER
valueFrom:
secretKeyRef:
name: db-secret-postgres
key: db.port.number
- name: DB_NAME
valueFrom:
secretKeyRef:
name: db-secret-postgres
key: db.name
- name: DB_USER
valueFrom:
secretKeyRef:
name: db-secret-postgres
key: db.user
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: db-secret-postgres
key: db.password
11 changes: 11 additions & 0 deletions 4-finish/tls-crt-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Secret
metadata:
name: tls-crt-secret
namespace: open-liberty-demo
type: kubernetes.io/tls
data:
ca.crt: ${CA_CRT}
destCA.crt: ${DEST_CA_CRT}
tls.crt: ${TLS_CRT}
tls.key: ${TLS_KEY}

0 comments on commit d64183e

Please sign in to comment.