fix(k01): resource requests based on actual usage
build-and-push-harbor / docker-build-push (push) Waiting to run
build-and-push-harbor / docker-build-push (push) Waiting to run
This commit is contained in:
@@ -1058,10 +1058,10 @@ spec:
|
|||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 50m
|
cpu: 30m
|
||||||
memory: 128Mi
|
memory: 20Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 512Mi
|
memory: 120Mi
|
||||||
volumes:
|
volumes:
|
||||||
- name: config
|
- name: config
|
||||||
configMap:
|
configMap:
|
||||||
|
|||||||
+14
-14
@@ -16,12 +16,12 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 30m
|
cpu: 30m
|
||||||
memory: 64Mi
|
memory: 200Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 768Mi
|
memory: 400Mi
|
||||||
jvmOptions:
|
jvmOptions:
|
||||||
-Xms: "192M"
|
-Xms: "128M"
|
||||||
-Xmx: "384M"
|
-Xmx: "320M"
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: kafka.strimzi.io/v1
|
apiVersion: kafka.strimzi.io/v1
|
||||||
@@ -42,12 +42,12 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 50m
|
cpu: 50m
|
||||||
memory: 128Mi
|
memory: 350Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1536Mi
|
memory: 600Mi
|
||||||
jvmOptions:
|
jvmOptions:
|
||||||
-Xms: "256M"
|
-Xms: "192M"
|
||||||
-Xmx: "1024M"
|
-Xmx: "512M"
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: kafka.strimzi.io/v1
|
apiVersion: kafka.strimzi.io/v1
|
||||||
@@ -77,17 +77,17 @@ spec:
|
|||||||
topicOperator:
|
topicOperator:
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 20m
|
cpu: 15m
|
||||||
memory: 80Mi
|
memory: 130Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 256Mi
|
memory: 250Mi
|
||||||
userOperator:
|
userOperator:
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 20m
|
cpu: 15m
|
||||||
memory: 80Mi
|
memory: 130Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 256Mi
|
memory: 250Mi
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: kafka.strimzi.io/v1
|
apiVersion: kafka.strimzi.io/v1
|
||||||
|
|||||||
@@ -31,16 +31,16 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 30m
|
cpu: 30m
|
||||||
memory: 100Mi
|
memory: 80Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 400Mi
|
||||||
- name: mongodb-agent
|
- name: mongodb-agent
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 30m
|
cpu: 20m
|
||||||
memory: 80Mi
|
memory: 35Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 200Mi
|
memory: 100Mi
|
||||||
volumeClaimTemplates:
|
volumeClaimTemplates:
|
||||||
- metadata:
|
- metadata:
|
||||||
name: data-volume
|
name: data-volume
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 30m
|
cpu: 30m
|
||||||
memory: 30Mi
|
memory: 50Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 200Mi
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
@@ -39,9 +39,9 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 30m
|
cpu: 30m
|
||||||
memory: 30Mi
|
memory: 50Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 200Mi
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
@@ -62,9 +62,9 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 30m
|
cpu: 30m
|
||||||
memory: 30Mi
|
memory: 50Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 200Mi
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
@@ -85,9 +85,9 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 30m
|
cpu: 30m
|
||||||
memory: 30Mi
|
memory: 50Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 200Mi
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
@@ -108,9 +108,9 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 30m
|
cpu: 30m
|
||||||
memory: 30Mi
|
memory: 50Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 200Mi
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
@@ -131,9 +131,9 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 30m
|
cpu: 30m
|
||||||
memory: 30Mi
|
memory: 50Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 200Mi
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
@@ -154,9 +154,9 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 30m
|
cpu: 30m
|
||||||
memory: 30Mi
|
memory: 50Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 200Mi
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
@@ -177,9 +177,9 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 30m
|
cpu: 30m
|
||||||
memory: 30Mi
|
memory: 50Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 200Mi
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
@@ -200,9 +200,9 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 30m
|
cpu: 30m
|
||||||
memory: 30Mi
|
memory: 50Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 200Mi
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
@@ -223,9 +223,9 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 30m
|
cpu: 30m
|
||||||
memory: 30Mi
|
memory: 50Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 200Mi
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
@@ -246,6 +246,6 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 30m
|
cpu: 30m
|
||||||
memory: 30Mi
|
memory: 50Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 200Mi
|
||||||
|
|||||||
@@ -61,10 +61,10 @@ spec:
|
|||||||
- containerPort: 6379
|
- containerPort: 6379
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 20m
|
cpu: 10m
|
||||||
memory: 32Mi
|
memory: 10Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 64Mi
|
memory: 60Mi
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
@@ -130,10 +130,10 @@ spec:
|
|||||||
mountPath: /data/ratelimit/config
|
mountPath: /data/ratelimit/config
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 20m
|
cpu: 10m
|
||||||
memory: 64Mi
|
memory: 10Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 256Mi
|
memory: 60Mi
|
||||||
volumes:
|
volumes:
|
||||||
- name: config
|
- name: config
|
||||||
configMap:
|
configMap:
|
||||||
|
|||||||
+36
-36
@@ -10,10 +10,10 @@ spec:
|
|||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 5m
|
||||||
memory: 24Mi
|
memory: 10Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 80Mi
|
||||||
redisSecret:
|
redisSecret:
|
||||||
name: user-redis
|
name: user-redis
|
||||||
key: password
|
key: password
|
||||||
@@ -41,10 +41,10 @@ spec:
|
|||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 5m
|
||||||
memory: 24Mi
|
memory: 10Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 80Mi
|
||||||
redisSecret:
|
redisSecret:
|
||||||
name: player-redis
|
name: player-redis
|
||||||
key: password
|
key: password
|
||||||
@@ -72,10 +72,10 @@ spec:
|
|||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 5m
|
||||||
memory: 24Mi
|
memory: 10Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 80Mi
|
||||||
redisSecret:
|
redisSecret:
|
||||||
name: game-redis
|
name: game-redis
|
||||||
key: password
|
key: password
|
||||||
@@ -103,10 +103,10 @@ spec:
|
|||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 5m
|
||||||
memory: 24Mi
|
memory: 10Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 80Mi
|
||||||
redisSecret:
|
redisSecret:
|
||||||
name: shop-redis
|
name: shop-redis
|
||||||
key: password
|
key: password
|
||||||
@@ -134,10 +134,10 @@ spec:
|
|||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 5m
|
||||||
memory: 24Mi
|
memory: 10Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 80Mi
|
||||||
redisSecret:
|
redisSecret:
|
||||||
name: order-redis
|
name: order-redis
|
||||||
key: password
|
key: password
|
||||||
@@ -165,10 +165,10 @@ spec:
|
|||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 5m
|
||||||
memory: 24Mi
|
memory: 10Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 80Mi
|
||||||
redisSecret:
|
redisSecret:
|
||||||
name: wallet-redis
|
name: wallet-redis
|
||||||
key: password
|
key: password
|
||||||
@@ -196,10 +196,10 @@ spec:
|
|||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 5m
|
||||||
memory: 24Mi
|
memory: 10Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 80Mi
|
||||||
redisSecret:
|
redisSecret:
|
||||||
name: community-redis
|
name: community-redis
|
||||||
key: password
|
key: password
|
||||||
@@ -227,10 +227,10 @@ spec:
|
|||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 5m
|
||||||
memory: 24Mi
|
memory: 10Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 80Mi
|
||||||
redisSecret:
|
redisSecret:
|
||||||
name: review-redis
|
name: review-redis
|
||||||
key: password
|
key: password
|
||||||
@@ -258,10 +258,10 @@ spec:
|
|||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 5m
|
||||||
memory: 24Mi
|
memory: 10Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 80Mi
|
||||||
redisSecret:
|
redisSecret:
|
||||||
name: dispute-redis
|
name: dispute-redis
|
||||||
key: password
|
key: password
|
||||||
@@ -289,10 +289,10 @@ spec:
|
|||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 5m
|
||||||
memory: 24Mi
|
memory: 10Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 80Mi
|
||||||
redisSecret:
|
redisSecret:
|
||||||
name: notification-redis
|
name: notification-redis
|
||||||
key: password
|
key: password
|
||||||
@@ -320,10 +320,10 @@ spec:
|
|||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 5m
|
||||||
memory: 24Mi
|
memory: 10Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 80Mi
|
||||||
redisSecret:
|
redisSecret:
|
||||||
name: search-redis
|
name: search-redis
|
||||||
key: password
|
key: password
|
||||||
@@ -351,10 +351,10 @@ spec:
|
|||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 5m
|
||||||
memory: 24Mi
|
memory: 10Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 80Mi
|
||||||
redisSecret:
|
redisSecret:
|
||||||
name: chat-redis
|
name: chat-redis
|
||||||
key: password
|
key: password
|
||||||
|
|||||||
@@ -80,14 +80,14 @@ kubectl apply -f "${K01_DIR}/base/"
|
|||||||
kubectl apply --server-side --force-conflicts -f \
|
kubectl apply --server-side --force-conflicts -f \
|
||||||
"https://github.com/cloudnative-pg/cloudnative-pg/releases/download/v${CNPG_VERSION}/cnpg-${CNPG_VERSION}.yaml"
|
"https://github.com/cloudnative-pg/cloudnative-pg/releases/download/v${CNPG_VERSION}/cnpg-${CNPG_VERSION}.yaml"
|
||||||
kubectl -n cnpg-system set resources deploy/cnpg-controller-manager \
|
kubectl -n cnpg-system set resources deploy/cnpg-controller-manager \
|
||||||
--requests=cpu=50m,memory=64Mi --limits=cpu=200m,memory=256Mi
|
--requests=cpu=30m,memory=40Mi --limits=cpu=200m,memory=200Mi
|
||||||
|
|
||||||
kubectl create namespace kafka 2>/dev/null || true
|
kubectl create namespace kafka 2>/dev/null || true
|
||||||
curl -sfL "https://github.com/strimzi/strimzi-kafka-operator/releases/download/${STRIMZI_VERSION}/strimzi-cluster-operator-${STRIMZI_VERSION}.yaml" \
|
curl -sfL "https://github.com/strimzi/strimzi-kafka-operator/releases/download/${STRIMZI_VERSION}/strimzi-cluster-operator-${STRIMZI_VERSION}.yaml" \
|
||||||
| sed 's/namespace: .*/namespace: kafka/' \
|
| sed 's/namespace: .*/namespace: kafka/' \
|
||||||
| kubectl apply --server-side --force-conflicts -n kafka -f -
|
| kubectl apply --server-side --force-conflicts -n kafka -f -
|
||||||
kubectl -n kafka set resources deploy/strimzi-cluster-operator \
|
kubectl -n kafka set resources deploy/strimzi-cluster-operator \
|
||||||
--requests=cpu=50m,memory=200Mi --limits=cpu=500m,memory=500Mi
|
--requests=cpu=50m,memory=200Mi --limits=cpu=500m,memory=400Mi
|
||||||
|
|
||||||
helm repo add ot-helm https://ot-container-kit.github.io/helm-charts/ 2>/dev/null || true
|
helm repo add ot-helm https://ot-container-kit.github.io/helm-charts/ 2>/dev/null || true
|
||||||
helm repo add mongodb https://mongodb.github.io/helm-charts 2>/dev/null || true
|
helm repo add mongodb https://mongodb.github.io/helm-charts 2>/dev/null || true
|
||||||
@@ -96,19 +96,19 @@ helm repo update
|
|||||||
helm upgrade --install redis-operator ot-helm/redis-operator \
|
helm upgrade --install redis-operator ot-helm/redis-operator \
|
||||||
--version "${REDIS_OP_VERSION}" \
|
--version "${REDIS_OP_VERSION}" \
|
||||||
--namespace redis-operator --create-namespace \
|
--namespace redis-operator --create-namespace \
|
||||||
--set resources.requests.cpu=50m \
|
--set resources.requests.cpu=20m \
|
||||||
--set resources.requests.memory=100Mi \
|
--set resources.requests.memory=30Mi \
|
||||||
--set resources.limits.cpu=500m \
|
--set resources.limits.cpu=500m \
|
||||||
--set resources.limits.memory=500Mi
|
--set resources.limits.memory=150Mi
|
||||||
|
|
||||||
helm upgrade --install mongodb-kubernetes mongodb/mongodb-kubernetes \
|
helm upgrade --install mongodb-kubernetes mongodb/mongodb-kubernetes \
|
||||||
--version "${MONGODB_OP_VERSION}" \
|
--version "${MONGODB_OP_VERSION}" \
|
||||||
--namespace mongodb-operator --create-namespace \
|
--namespace mongodb-operator --create-namespace \
|
||||||
--set operator.watchNamespace=juwan \
|
--set operator.watchNamespace=juwan \
|
||||||
--set operator.resources.requests.cpu=50m \
|
--set operator.resources.requests.cpu=30m \
|
||||||
--set operator.resources.requests.memory=100Mi \
|
--set operator.resources.requests.memory=50Mi \
|
||||||
--set operator.resources.limits.cpu=500m \
|
--set operator.resources.limits.cpu=500m \
|
||||||
--set operator.resources.limits.memory=300Mi
|
--set operator.resources.limits.memory=200Mi
|
||||||
|
|
||||||
kubectl -n cnpg-system rollout status deploy/cnpg-controller-manager --timeout=300s
|
kubectl -n cnpg-system rollout status deploy/cnpg-controller-manager --timeout=300s
|
||||||
kubectl -n kafka rollout status deploy/strimzi-cluster-operator --timeout=300s
|
kubectl -n kafka rollout status deploy/strimzi-cluster-operator --timeout=300s
|
||||||
|
|||||||
Reference in New Issue
Block a user