238 строки
4.4 KiB
YAML
238 строки
4.4 KiB
YAML
apiVersion: scheduling.k8s.io/v1
|
|
kind: PriorityClass
|
|
metadata:
|
|
name: high-priority
|
|
value: 100
|
|
globalDefault: false
|
|
description: 'High priority (100) for business-critical services'
|
|
---
|
|
apiVersion: scheduling.k8s.io/v1
|
|
kind: PriorityClass
|
|
metadata:
|
|
name: medium-priority
|
|
value: 50
|
|
globalDefault: true
|
|
description: 'Medium priority (50) - dev/test services'
|
|
---
|
|
apiVersion: scheduling.k8s.io/v1
|
|
kind: PriorityClass
|
|
metadata:
|
|
name: low-priority
|
|
value: -100
|
|
globalDefault: false
|
|
description: 'Low priority (-100) - Non-critical microservices'
|
|
---
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: speckle-test
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: pg
|
|
namespace: speckle-test
|
|
labels:
|
|
app: pg
|
|
project: speckle-server
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: pg
|
|
project: speckle-server
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: pg
|
|
project: speckle-server
|
|
spec:
|
|
priorityClassName: high-priority
|
|
|
|
containers:
|
|
- name: main
|
|
image: postgres:14.5-alpine
|
|
|
|
resources:
|
|
limits:
|
|
cpu: 1000m
|
|
memory: 1Gi
|
|
|
|
env:
|
|
- name: POSTGRES_DB
|
|
value: speckle
|
|
- name: POSTGRES_USER
|
|
value: speckle
|
|
- name: POSTGRES_PASSWORD
|
|
value: speckle
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: redis
|
|
namespace: speckle-test
|
|
labels:
|
|
app: redis
|
|
project: speckle-server
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: redis
|
|
project: speckle-server
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: redis
|
|
project: speckle-server
|
|
spec:
|
|
priorityClassName: high-priority
|
|
|
|
containers:
|
|
- name: main
|
|
image: redis:7.0-alpine
|
|
|
|
resources:
|
|
limits:
|
|
cpu: 1000m
|
|
memory: 1Gi
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: minio
|
|
namespace: speckle-test
|
|
labels:
|
|
app: minio
|
|
project: speckle-server
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: minio
|
|
project: speckle-server
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: minio
|
|
project: speckle-server
|
|
spec:
|
|
priorityClassName: high-priority
|
|
|
|
containers:
|
|
- name: main
|
|
image: minio/minio
|
|
args: ['server', '/data', '--console-address', ':9001']
|
|
resources:
|
|
limits:
|
|
cpu: 1000m
|
|
memory: 1Gi
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: pg
|
|
namespace: speckle-test
|
|
labels:
|
|
app: pg
|
|
project: speckle-server
|
|
spec:
|
|
selector:
|
|
app: pg
|
|
project: speckle-server
|
|
ports:
|
|
- protocol: TCP
|
|
name: pg
|
|
port: 5432
|
|
targetPort: 5432
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: redis
|
|
namespace: speckle-test
|
|
labels:
|
|
app: redis
|
|
project: speckle-server
|
|
spec:
|
|
selector:
|
|
app: redis
|
|
project: speckle-server
|
|
ports:
|
|
- protocol: TCP
|
|
name: redis
|
|
port: 6379
|
|
targetPort: 6379
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: minio
|
|
namespace: speckle-test
|
|
labels:
|
|
app: minio
|
|
project: speckle-server
|
|
spec:
|
|
type: NodePort
|
|
selector:
|
|
app: minio
|
|
project: speckle-server
|
|
ports:
|
|
- protocol: TCP
|
|
name: minio1
|
|
port: 9000
|
|
targetPort: 9000
|
|
- protocol: TCP
|
|
name: minio2
|
|
port: 9001
|
|
targetPort: 9001
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: grafana
|
|
spec:
|
|
ingressClassName: nginx
|
|
rules:
|
|
- host: grafana.minikube
|
|
http:
|
|
paths:
|
|
- pathType: Prefix
|
|
path: '/'
|
|
backend:
|
|
service:
|
|
name: kube-prometheus-stack-grafana
|
|
port:
|
|
number: 80
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: prometheus
|
|
spec:
|
|
ingressClassName: nginx
|
|
rules:
|
|
- host: prometheus.minikube
|
|
http:
|
|
paths:
|
|
- pathType: Prefix
|
|
path: '/'
|
|
backend:
|
|
service:
|
|
name: prometheus-operated
|
|
port:
|
|
number: 9090
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: server-vars
|
|
namespace: speckle-test
|
|
stringData:
|
|
postgres_url: postgresql://speckle:speckle@pg/speckle
|
|
redis_url: redis://redis
|
|
session_secret: hello
|
|
email_password: ''
|
|
s3_secret_key: minioadmin
|
|
google_client_secret: ''
|