[DO-1496] add limits and network-policy (!4)
схлопнул networkpolicy limits и namespace в один файл и назвал его так же как namespace Co-authored-by: Rustam Tagaev <rustam.tagaev@avroid.tech> Reviewed-on: https://git.avroid.tech/K8s/k8s-configs/pulls/4 Reviewed-by: Denis Patrakeev <denis.patrakeev@avroid.team> Co-authored-by: Rustam Tagaev <rustam.tagaev@avroid.team> Co-committed-by: Rustam Tagaev <rustam.tagaev@avroid.team>
This commit is contained in:
committed by
Denis Patrakeev
parent
7f14546f78
commit
da6bf80454
@@ -0,0 +1,39 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: msg-messenger-core-api-in
|
||||
namespace: tavro-cloud-dev
|
||||
labels:
|
||||
app.kubernetes.io/managed-by: manual
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: msg-messenger-core-api
|
||||
policyTypes:
|
||||
- Ingress
|
||||
ingress:
|
||||
- ports:
|
||||
- port: 8000
|
||||
protocol: TCP
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: msg-messenger-core-api-out
|
||||
namespace: tavro-cloud-dev
|
||||
labels:
|
||||
app.kubernetes.io/managed-by: manual
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: msg-messenger-core-api
|
||||
policyTypes:
|
||||
- Egress
|
||||
egress:
|
||||
- to:
|
||||
- ipBlock:
|
||||
# pg-db-test.avroid.tech
|
||||
cidr: 10.2.40.5/32
|
||||
ports:
|
||||
- port: 5432
|
||||
protocol: TCP
|
||||
@@ -0,0 +1,39 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: openresty-in
|
||||
namespace: tavro-cloud-dev
|
||||
labels:
|
||||
app.kubernetes.io/managed-by: manual
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: openresty
|
||||
policyTypes:
|
||||
- Ingress
|
||||
ingress:
|
||||
- ports:
|
||||
- port: 8081
|
||||
protocol: TCP
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: openresty-out
|
||||
namespace: tavro-cloud-dev
|
||||
labels:
|
||||
app.kubernetes.io/managed-by: manual
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: openresty
|
||||
policyTypes:
|
||||
- Egress
|
||||
egress:
|
||||
- to:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: msg-messenger-core-api
|
||||
ports:
|
||||
- port: 8000
|
||||
protocol: TCP
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: tavro-cloud-dev
|
||||
labels:
|
||||
name: tavro-cloud-dev
|
||||
app.kubernetes.io/managed-by: manual
|
||||
annotations:
|
||||
scheduler.alpha.kubernetes.io/node-selector: node-role.kubernetes.io/worker=
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ResourceQuota
|
||||
metadata:
|
||||
name: tavro-cloud-dev
|
||||
labels:
|
||||
app.kubernetes.io/managed-by: manual
|
||||
spec:
|
||||
hard:
|
||||
requests.cpu: "8"
|
||||
requests.memory: 24Gi
|
||||
limits.cpu: "16"
|
||||
limits.memory: 32Gi
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: tavro-cloud-dev
|
||||
labels:
|
||||
name: tavro-cloud-dev
|
||||
app.kubernetes.io/managed-by: manual
|
||||
annotations:
|
||||
scheduler.alpha.kubernetes.io/node-selector: "nodetype=worker"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ResourceQuota
|
||||
metadata:
|
||||
name: tavro-cloud-dev
|
||||
namespace: tavro-cloud-dev
|
||||
labels:
|
||||
app.kubernetes.io/managed-by: manual
|
||||
spec:
|
||||
hard:
|
||||
configmaps: "100"
|
||||
limits.cpu: "5"
|
||||
limits.memory: 13Gi
|
||||
persistentvolumeclaims: "1"
|
||||
pods: "100"
|
||||
requests.cpu: "3"
|
||||
requests.memory: "10Gi"
|
||||
requests.storage: "2Gi"
|
||||
resourcequotas: "1"
|
||||
secrets: "100"
|
||||
services: "100"
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: tavro-cloud-dev-common
|
||||
namespace: tavro-cloud-dev
|
||||
spec:
|
||||
podSelector: {}
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
ingress: []
|
||||
egress:
|
||||
- to:
|
||||
- ipBlock:
|
||||
# vault.avroid.tech
|
||||
cidr: 10.18.3.7/32
|
||||
ports:
|
||||
- port: 443
|
||||
protocol: TCP
|
||||
- ports:
|
||||
- port: 53
|
||||
protocol: TCP
|
||||
- port: 53
|
||||
protocol: UDP
|
||||
Reference in New Issue
Block a user