Update
This commit is contained in:
4
kube-manifests/Prod/Backend/1 - namespace.yaml
Normal file
4
kube-manifests/Prod/Backend/1 - namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: prod-mind-sos-ns
|
||||
8
kube-manifests/Prod/Backend/2 - gitea-img.yaml
Normal file
8
kube-manifests/Prod/Backend/2 - gitea-img.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: mind-sos-gitea-img
|
||||
namespace: prod-mind-sos-ns
|
||||
type: kubernetes.io/dockerconfigjson
|
||||
data:
|
||||
.dockerconfigjson: ewogICAgImF1dGhzIjogewogICAgICAgICJodHRwczovL2dpdGVhLnRhcnMudG9vbHMiOiB7CiAgICAgICAgICAgICJ1c2VybmFtZSI6ICJnaXRlYV9wdWxsZXIiLAogICAgICAgICAgICAicGFzc3dvcmQiOiAiTkZ2ZUYzNEdCV1pTYVV2MktXVFlpdz09IiwKICAgICAgICAgICAgImVtYWlsIjogImdpdGVhQHRhcnMuZGV2IiwKICAgICAgICAgICAgImF1dGgiOiAiWjJsMFpXRmZjSFZzYkdWeU9rNUdkbVZHTXpSSFFsZGFVMkZWZGpKTFYxUlphWGM5UFE9PSIKICAgICAgICB9CiAgICB9Cn0K
|
||||
32
kube-manifests/Prod/Backend/3 - deployment-redis.yaml
Normal file
32
kube-manifests/Prod/Backend/3 - deployment-redis.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: prod-redis-sos-dp
|
||||
namespace: prod-mind-sos-ns
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: prod-redis-sos-ap
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: prod-redis-sos-ap
|
||||
spec:
|
||||
containers:
|
||||
- name: prod-redis-sos-pd
|
||||
image: redis:latest
|
||||
imagePullPolicy: Always
|
||||
resources:
|
||||
requests:
|
||||
memory: "100Mi"
|
||||
cpu: "50m"
|
||||
limits:
|
||||
memory: "100Mi"
|
||||
cpu: "50m"
|
||||
ports:
|
||||
- name: redis
|
||||
containerPort: 6379
|
||||
protocol: TCP
|
||||
34
kube-manifests/Prod/Backend/3 - deployment.yaml
Normal file
34
kube-manifests/Prod/Backend/3 - deployment.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: prod-mind-sos-dp
|
||||
namespace: prod-mind-sos-ns
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: prod-mind-sos-ap
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: prod-mind-sos-ap
|
||||
spec:
|
||||
containers:
|
||||
- name: prod-mind-sos-pd
|
||||
image: gitea.tars.tools/mind/help_center:latest
|
||||
imagePullPolicy: Always
|
||||
resources:
|
||||
requests:
|
||||
memory: "500Mi"
|
||||
cpu: "250m"
|
||||
limits:
|
||||
memory: "500Mi"
|
||||
cpu: "250m"
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
imagePullSecrets:
|
||||
- name: mind-sos-gitea-img
|
||||
15
kube-manifests/Prod/Backend/4 - service-redis.yaml
Normal file
15
kube-manifests/Prod/Backend/4 - service-redis.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
# prod-redis-sos-sr.prod-mind-sos-ns.svc.cluster.local
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: prod-redis-sos-sr
|
||||
namespace: prod-mind-sos-ns
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
selector:
|
||||
app: prod-redis-sos-ap
|
||||
type: ClusterIP
|
||||
14
kube-manifests/Prod/Backend/4 - service.yaml
Normal file
14
kube-manifests/Prod/Backend/4 - service.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: prod-mind-sos-sr
|
||||
namespace: prod-mind-sos-ns
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: prod-mind-sos-ap
|
||||
type: ClusterIP
|
||||
25
kube-manifests/Prod/Backend/5 - ingress.yaml
Normal file
25
kube-manifests/Prod/Backend/5 - ingress.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: prod-mind-sos-ig
|
||||
namespace: prod-mind-sos-ns
|
||||
annotations:
|
||||
service.beta.kubernetes.io/do-loadbalancer-enable-proxy-protocol: "true"
|
||||
service.beta.kubernetes.io/do-loadbalancer-internal: "true"
|
||||
service.beta.kubernetes.io/do-loadbalancer-network: "INTERNAL"
|
||||
nginx.ingress.kubernetes.io/enable-access-log: "true"
|
||||
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: sos.bop.local
|
||||
http:
|
||||
paths:
|
||||
- pathType: Prefix
|
||||
path: "/"
|
||||
backend:
|
||||
service:
|
||||
name: prod-mind-sos-sr
|
||||
port:
|
||||
number: 80
|
||||
|
||||
25
kube-manifests/Prod/Backend/6 - hpa.yaml
Normal file
25
kube-manifests/Prod/Backend/6 - hpa.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: prod-mind-sos-hpa
|
||||
namespace: prod-mind-sos-ns
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: prod-mind-sos-dp
|
||||
minReplicas: 1
|
||||
maxReplicas: 10
|
||||
metrics:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 90
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 90
|
||||
Reference in New Issue
Block a user