新增learn-kubernetes(https://github.com/yyong-brs/learn-kubernetes)相关文件
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: timecheck
|
||||
labels:
|
||||
kiamol: ch07
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: timecheck
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: timecheck
|
||||
version: v2
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init-config
|
||||
image: kiamol/ch03-sleep
|
||||
command: ['sh', '-c', "cat /config-in/appsettings.json | jq --arg APP_ENV \"$APP_ENVIRONMENT\" '.Application.Environment=$APP_ENV' > /config-out/appsettings.json"]
|
||||
env:
|
||||
- name: APP_ENVIRONMENT
|
||||
value: TEST
|
||||
volumeMounts:
|
||||
- name: config-map
|
||||
mountPath: /config-in
|
||||
- name: config-dir
|
||||
mountPath: /config-out
|
||||
containers:
|
||||
- name: timecheck
|
||||
image: kiamol/ch07-timecheck
|
||||
volumeMounts:
|
||||
- name: config-dir
|
||||
mountPath: /config
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: config-map
|
||||
configMap:
|
||||
name: timecheck-config
|
||||
- name: config-dir
|
||||
emptyDir: {}
|
||||
Reference in New Issue
Block a user