Skip to content

Commit

Permalink
[k8s] Change the required resources
Browse files Browse the repository at this point in the history
Reducing the required resources, adding a shared redis storate, adding RuntimeError exception to retry for in the query schedd.
  • Loading branch information
cronosnull committed Jun 2, 2020
1 parent 376fb10 commit c8d7fb3
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 7 deletions.
8 changes: 7 additions & 1 deletion k8s/deployments/spider-flower.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ spec:
name: spider-flower
ports:
- containerPort: 8888
resources: {}
resources:
requests:
cpu: 100m
memory: 500Mi
limits:
cpu: 300m
memory: 1Gi
restartPolicy: Always
status: {}
4 changes: 2 additions & 2 deletions k8s/deployments/spider-redis-cp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ spec:
- containerPort: 6379
resources:
requests:
cpu: 500m
cpu: 100m
memory: 500Mi
limits:
cpu: 1000m
memory: 4Gi
memory: 1Gi
volumeMounts:
- mountPath: /data
name: redis-checkpoint-claim0
Expand Down
3 changes: 2 additions & 1 deletion k8s/deployments/spider-redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ spec:
restartPolicy: Always
volumes:
- name: redis-claim0
emptyDir: {}
persistentVolumeClaim:
claimName: redis-cephfs-claim
status: {}
4 changes: 2 additions & 2 deletions k8s/deployments/spider-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ spec:
resources:
requests:
cpu: 100m
memory: 200Mi
memory: 500Mi
limits:
cpu: 2000m
memory: 1Gi
memory: 2Gi
env: &spider_env
- name: AFFILIATION_DIR_LOCATION
value: /cms_shared/affiliation_dir.json
Expand Down
12 changes: 12 additions & 0 deletions k8s/storages/shared_redis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: redis-cephfs-claim
namespace: spider
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1G
storageClassName: meyrin-cephfs
2 changes: 1 addition & 1 deletion src/htcondor_es/celery/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@


# ---Tasks----
@app.task(max_retries=3, serializer="pickle")
@app.task(max_retries=3, autoretry_for=(RuntimeError,) serializer="pickle")
def query_schedd(
schedd_ad,
start_time=None,
Expand Down

0 comments on commit c8d7fb3

Please sign in to comment.