You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
1.8 KiB
89 lines
1.8 KiB
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: system-deployment
|
|
labels:
|
|
app: system
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: system
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: system
|
|
spec:
|
|
containers:
|
|
- name: system-container
|
|
image: system:1.0-SNAPSHOT
|
|
ports:
|
|
- containerPort: 9080
|
|
# Set the APP_NAME environment variable
|
|
env:
|
|
- name: APP_NAME
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: sys-app-name
|
|
key: name
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: inventory-deployment
|
|
labels:
|
|
app: inventory
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: inventory
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: inventory
|
|
spec:
|
|
containers:
|
|
- name: inventory-container
|
|
image: inventory:1.0-SNAPSHOT
|
|
ports:
|
|
- containerPort: 9080
|
|
# Set the SYSTEM_APP_USERNAME and SYSTEM_APP_PASSWORD environment variables
|
|
env:
|
|
- name: SYSTEM_APP_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sys-app-credentials
|
|
key: username
|
|
- name: SYSTEM_APP_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sys-app-credentials
|
|
key: password
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: system-service
|
|
spec:
|
|
type: NodePort
|
|
selector:
|
|
app: system
|
|
ports:
|
|
- protocol: TCP
|
|
port: 9080
|
|
targetPort: 9080
|
|
nodePort: 31000
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: inventory-service
|
|
spec:
|
|
type: NodePort
|
|
selector:
|
|
app: inventory
|
|
ports:
|
|
- protocol: TCP
|
|
port: 9080
|
|
targetPort: 9080
|
|
nodePort: 32000
|