This commit is contained in:
2024-02-20 17:15:27 +08:00
committed by huty
parent 6706e1a633
commit 34158042ad
1529 changed files with 177765 additions and 0 deletions

View File

@@ -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/

View File

@@ -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

View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-config
labels:
kiamol: ch10-lab
data:
config.json: |-
{
"ConfigController": {
"Enabled" : {{ .Values.configControllerEnabled }}
}
}

View File

@@ -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

View File

@@ -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 }}

View File

@@ -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