Skip to content

Commit

Permalink
Add generator replicas configuration and update deployment strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
michitaro committed Dec 3, 2024
1 parent 27634c5 commit 192b0f8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
1 change: 1 addition & 0 deletions applications/fov-quicklook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Full focal plane viewer
| db_storage_class | string | `nil` | Storage class to use for the database |
| frontend.resources.limits | object | `{"cpu":"8000m","memory":"256Mi"}` | Resource limits for the frontend |
| frontend.resources.requests | object | `{"cpu":"100m","memory":"256Mi"}` | Resource requests for the frontend |
| generator.replicas | int | `8` | Number of replicas for the generator |
| generator.resources.limits | object | `{"cpu":"16000m","memory":"32Gi"}` | Resource limits for the generator |
| generator.resources.requests | object | `{"cpu":"100m","memory":"32Gi"}` | Resource requests for the generator |
| generator.workdir.medium | string | `"Memory"` | Work directory type for the generator |
Expand Down
19 changes: 13 additions & 6 deletions applications/fov-quicklook/templates/generator.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
apiVersion: apps/v1
kind: DaemonSet
kind: Deployment
metadata:
name: fov-quicklook-generator
labels:
app: fov-quicklook-generator
spec:
updateStrategy:
replicas: {{ .Values.generator.replicas }}
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 100%
selector:
matchLabels:
app: fov-quicklook-generator
Expand All @@ -17,8 +16,16 @@ spec:
labels:
app: fov-quicklook-generator
spec:
nodeSelector:
quicklook: "true"
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- fov-quicklook-generator
topologyKey: "kubernetes.io/hostname"
containers:
- name: fov-quicklook-generator
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
6 changes: 5 additions & 1 deletion applications/fov-quicklook/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,13 @@
}
},
"required": ["medium"]
},
"replicas": {
"type": "integer",
"minimum": 1
}
},
"required": ["resources", "workdir"]
"required": ["resources", "workdir", "replicas"]
}
},
"required": [
Expand Down
2 changes: 2 additions & 0 deletions applications/fov-quicklook/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,5 @@ generator:
workdir:
# -- Work directory type for the generator
medium: Memory
# -- Number of replicas for the generator
replicas: 8

0 comments on commit 192b0f8

Please sign in to comment.