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,12 @@
apiVersion: v1
kind: Service
metadata:
name: numbers-api
labels:
kiamol: ch07
spec:
ports:
- port: 80
selector:
app: numbers-api
type: ClusterIP

View File

@@ -0,0 +1,18 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: numbers-api
labels:
kiamol: ch07
spec:
selector:
matchLabels:
app: numbers-api
template:
metadata:
labels:
app: numbers-api
spec:
containers:
- name: api
image: kiamol/ch03-numbers-api

View File

@@ -0,0 +1,47 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: numbers-web
labels:
kiamol: ch07
spec:
selector:
matchLabels:
app: numbers-web
template:
metadata:
labels:
app: numbers-web
version: v2
spec:
initContainers:
- name: init-version
image: kiamol/ch03-sleep
command: ['sh', '-c', "echo v2 > /config-out/version.txt"]
env:
- name: APP_ENVIRONMENT
value: TEST
volumeMounts:
- name: config-dir
mountPath: /config-out
readOnly: true
containers:
- name: web
image: kiamol/ch03-numbers-web:v2
env:
- name: http_proxy
value: http://localhost:1080
- name: RngApi__Url
value: http://localhost/api
- name: proxy
image: kiamol/ch07-simple-proxy
env:
- name: Proxy__Port
value: "1080"
- name: Proxy__Request__UriMap__Source
value: http://localhost/api
- name: Proxy__Request__UriMap__Target
value: http://numbers-api/sixeyed/kiamol/master/ch03/numbers/rng
volumes:
- name: config-dir
emptyDir: {}

View File

@@ -0,0 +1,33 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: numbers-web
labels:
kiamol: ch07
spec:
selector:
matchLabels:
app: numbers-web
template:
metadata:
labels:
app: numbers-web
spec:
containers:
- name: web
image: kiamol/ch03-numbers-web
env:
- name: http_proxy
value: http://localhost:1080
- name: RngApi__Url
value: http://localhost/api
- name: proxy
image: kiamol/ch07-simple-proxy
env:
- name: Proxy__Port
value: "1080"
- name: Proxy__Request__UriMap__Source
value: http://localhost/api
- name: Proxy__Request__UriMap__Target
value: http://numbers-api/sixeyed/kiamol/master/ch03/numbers/rng

View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: numbers-web
labels:
kiamol: ch07
spec:
ports:
- port: 8090
targetPort: 80
selector:
app: numbers-web
type: LoadBalancer

View File

@@ -0,0 +1,18 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: numbers-web
labels:
kiamol: ch07
spec:
selector:
matchLabels:
app: numbers-web
template:
metadata:
labels:
app: numbers-web
spec:
containers:
- name: web
image: kiamol/ch03-numbers-web