add kustomize
This commit is contained in:
66
6.Addons/myapp/deployment.yaml
Normal file
66
6.Addons/myapp/deployment.yaml
Normal file
@@ -0,0 +1,66 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: guestbook
|
||||
namespace: dev
|
||||
labels:
|
||||
app: &app frontend
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: *app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: *app
|
||||
spec:
|
||||
containers:
|
||||
- name: guestbook-app
|
||||
image: nginx
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
env:
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: secret
|
||||
key: DB_PASSWORD
|
||||
- name: FRUIT
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: secret
|
||||
key: FRUIT
|
||||
- name: ROUTER_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: secret
|
||||
key: ROUTER_PASSWORD
|
||||
- name: VEGETABLE
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: secret
|
||||
key: VEGETABLE
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /mnt/config/config.ini
|
||||
subPath: config.ini
|
||||
readOnly: true
|
||||
- name: secret
|
||||
mountPath: /mnt/secret
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: config
|
||||
defaultMode: 420
|
||||
- name: secret
|
||||
secret:
|
||||
secretName: secret
|
||||
items:
|
||||
- key: longsecret.txt
|
||||
path: longsecret.txt
|
Reference in New Issue
Block a user