新增learn-kubernetes(https://github.com/yyong-brs/learn-kubernetes)相关文件
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
@@ -0,0 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: ch10-lab-solution
|
||||
description: Solution to Kiamol ch10 lab
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: 1.0.0
|
||||
@@ -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 }}
|
||||
@@ -0,0 +1,8 @@
|
||||
# environment - Dev, Test or Prod
|
||||
environment: Test
|
||||
# whether the config UI is enabled
|
||||
configControllerEnabled: false
|
||||
# port for the Service:
|
||||
servicePort: 8080
|
||||
# type of the Service:
|
||||
serviceType: LoadBalancer
|
||||
Reference in New Issue
Block a user