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: vweb
description: Simple versioned web app
type: application
version: 1.0.0
appVersion: 1.0.0

View File

@@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
labels:
app.kubernetes.io/name: vweb
app.kubernetes.io/instance: {{ .Release.Name }}
kiamol: ch10
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: vweb
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: vweb
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
containers:
- name: web
image: kiamol/ch09-vweb:v1
ports:
- name: http
containerPort: 80

View File

@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}
labels:
app.kubernetes.io/name: vweb
app.kubernetes.io/instance: {{ .Release.Name }}
kiamol: ch10
spec:
ports:
- port: {{ .Values.servicePort }}
targetPort: http
selector:
app.kubernetes.io/name: vweb
app.kubernetes.io/instance: {{ .Release.Name }}
type: LoadBalancer

View File

@@ -0,0 +1,4 @@
# port for the Service to listen on
servicePort: 8090
# number of replicas for the web Pod
replicaCount: 2

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: vweb
description: Simple versioned web app
type: application
version: 2.0.0
appVersion: 2.0.0

View File

@@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
labels:
app.kubernetes.io/name: vweb
app.kubernetes.io/instance: {{ .Release.Name }}
kiamol: ch10
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: vweb
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: vweb
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
containers:
- name: web
image: kiamol/ch09-vweb:v2
ports:
- name: http
containerPort: 80

View File

@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}
labels:
app.kubernetes.io/name: vweb
app.kubernetes.io/instance: {{ .Release.Name }}
kiamol: ch10
spec:
ports:
- port: {{ .Values.servicePort }}
targetPort: http
{{- if eq .Values.serviceType "NodePort" }}
nodePort: {{ .Values.servicePort }}
{{- end }}
selector:
app.kubernetes.io/name: vweb
app.kubernetes.io/instance: {{ .Release.Name }}
type: {{ .Values.serviceType }}

View File

@@ -0,0 +1,6 @@
# port for the Service to listen on
servicePort: 8090
# type of the Service:
serviceType: LoadBalancer
# number of replicas for the web Pod
replicaCount: 2