Skip to content

Commit

Permalink
Scheduler helm charts: always create a PVC (dapr#7977)
Browse files Browse the repository at this point in the history
* Always try to create a PVC

Signed-off-by: Elena Kolevska <elena@kolevska.com>

* better empty check

Signed-off-by: Elena Kolevska <elena@kolevska.com>

* Reduce disk size for scheduler

Signed-off-by: Artur Souza <asouza.pro@gmail.com>

Change default storage size of scheduler to 1Gi

Signed-off-by: Artur Souza <asouza.pro@gmail.com>

* Reduce scheduler storageSize again

Signed-off-by: Artur Souza <asouza.pro@gmail.com>

* dapr_scheduler.cluster.storageSize=30Mi

Signed-off-by: Artur Souza <asouza.pro@gmail.com>

* Changing storage size for redis and scheduler.

Signed-off-by: Artur Souza <asouza.pro@gmail.com>

* Reduce volume size for kafka, postgres and rabbitmq

Signed-off-by: Artur Souza <asouza.pro@gmail.com>

* Try to free up more disk space

Signed-off-by: Artur Souza <asouza.pro@gmail.com>

---------

Signed-off-by: Elena Kolevska <elena@kolevska.com>
Signed-off-by: Artur Souza <asouza.pro@gmail.com>
Co-authored-by: Artur Souza <asouza.pro@gmail.com>
  • Loading branch information
elena-kolevska and artursouza authored Aug 11, 2024
1 parent 510444d commit 0fd0468
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 4 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/kind-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,23 @@ jobs:
- name: Free up some diskspace
run: |
docker image prune -a -f
# Clean up some more
echo "Listing 100 largest packages"
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100
df -h
echo "Removing large packages"
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y 'temurin-*'
sudo apt-get remove -y microsoft-edge-stable azure-cli google-chrome-stable firefox powershell mono-devel
sudo apt-get autoremove -y
sudo apt-get clean
df -h
echo "Removing large directories"
# deleting 15GB
rm -rf /usr/share/dotnet/
df -h
- name: Run tests
run: |
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ docker-deploy-k8s: check-docker-env check-arch
--set global.mtls.enabled=${DAPR_MTLS_ENABLED} \
--set dapr_placement.cluster.forceInMemoryLog=$(FORCE_INMEM) \
--set dapr_scheduler.replicaCount=$(DAPR_SCHEDULER_REPLICAS) \
--set dapr_scheduler.cluster.storageSize=100Mi \
$(ADDITIONAL_HELM_SET) $(HELM_CHART_DIR)

################################################################################
Expand Down
2 changes: 1 addition & 1 deletion charts/dapr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ The Helm chart has the follow configuration options that can be supplied:
| `dapr_scheduler.cluster.etcdDataDirPath` | Mount path for persistent volume for log store in unix-like system | `/var/run/data/dapr-scheduler/etcd-data-dir` |
| `dapr_scheduler.cluster.etcdDataDirWinPath` | Mount path for persistent volume for log store in windows | `C:\\etcd-data-dir` |
| `dapr_scheduler.cluster.storageClassName` | When set, uses this class to provision the database storage volume. | |
| `dapr_scheduler.cluster.storageSize` | When `dapr_scheduler.cluster.storageClassName` is set, sets the volume size request | `10Gi` |
| `dapr_scheduler.cluster.storageSize` | When `dapr_scheduler.cluster.storageClassName` is set, sets the volume size request | `1Gi` |
| `dapr_scheduler.securityContext.runAsNonRoot` | Boolean value for `securityContext.runAsNonRoot`. You may have to set this to `false` when running in Minikube | `true` |
| `dapr_scheduler.securityContext.fsGroup` | Integer value for `securityContext.fsGroup`. Useful for adding the Scheduler process to the file system group that can write to the mounted database volume. | `65532` |
| `dapr_scheduler.resources` | Value of `resources` attribute. Can be used to set memory/cpu resources/limits. See the section "Resource configuration" above. Defaults to empty | `{}` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ spec:
selector:
matchLabels:
app: dapr-scheduler-server
{{- if .Values.cluster.storageClassName }}
volumeClaimTemplates:
- metadata:
name: dapr-scheduler-data-dir
spec:
accessModes: [ "ReadWriteOnce" ]
{{- if .Values.cluster.storageClassName }}
storageClassName: {{ .Values.cluster.storageClassName }}
{{- end }}
resources:
requests:
storage: {{ .Values.cluster.storageSize }}
{{- end }}
template:
metadata:
labels:
Expand Down
2 changes: 1 addition & 1 deletion charts/dapr/charts/dapr_scheduler/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cluster:
etcdDataDirPath: /var/run/data/dapr-scheduler
etcdDataDirWinPath: C:\\dapr-scheduler
storageClassName: ""
storageSize: 10Gi
storageSize: 1Gi

etcdSpaceQuota: 2147483648
etcdCompactionMode: periodic
Expand Down
6 changes: 6 additions & 0 deletions tests/dapr_tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ setup-test-env-redis:
--wait \
--timeout 5m0s \
--namespace $(DAPR_TEST_NAMESPACE) \
--set master.persistence.size=1Gi \
-f ./tests/config/redis_override.yaml

delete-test-env-redis:
Expand All @@ -478,6 +479,9 @@ setup-test-env-kafka:
--version 23.0.7 \
-f ./tests/config/kafka_override.yaml \
--namespace $(DAPR_TEST_NAMESPACE) \
--set broker.persistence.size=1Gi \
--set broker.logPersistence.size=1Gi \
--set zookeeper.persistence.size=1Gi \
--timeout 10m0s

# install rabbitmq to the cluster
Expand All @@ -488,6 +492,7 @@ setup-test-env-rabbitmq:
--set auth.username='admin' \
--set auth.password='admin' \
--namespace $(DAPR_TEST_NAMESPACE) \
--set persistence.size=1Gi \
--timeout 10m0s

# install mqtt to the cluster
Expand Down Expand Up @@ -520,6 +525,7 @@ setup-test-env-postgres:
--install dapr-postgres bitnami/postgresql \
--version 12.8.0 \
-f ./tests/config/postgres_override.yaml \
--set primary.persistence.size=1Gi \
--namespace $(DAPR_TEST_NAMESPACE) \
--wait \
--timeout 5m0s
Expand Down

0 comments on commit 0fd0468

Please sign in to comment.