新增learn-kubernetes(https://github.com/yyong-brs/learn-kubernetes)相关文件
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-config
|
||||
labels:
|
||||
kiamol: ch10-lab
|
||||
data:
|
||||
config.json: |-
|
||||
{
|
||||
"ConfigController": {
|
||||
"Enabled" : {{ .Values.configControllerEnabled }}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
labels:
|
||||
kiamol: ch10-lab
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Release.Name }}
|
||||
environment: {{ .Values.environment | lower }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ .Release.Name }}
|
||||
environment: {{ .Values.environment | lower }}
|
||||
spec:
|
||||
containers:
|
||||
- name: web
|
||||
image: kiamol/ch04-todo-list
|
||||
env:
|
||||
- name: ASPNETCORE_ENVIRONMENT
|
||||
value: {{ .Values.environment | title }}
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: "/app/config"
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: {{ .Release.Name }}-config
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
labels:
|
||||
kiamol: ch10-lab
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ .Values.servicePort }}
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: {{ .Release.Name }}
|
||||
environment: {{ .Values.environment | lower }}
|
||||
type: {{ .Values.serviceType }}
|
||||
Reference in New Issue
Block a user