Skip to content

Commit 04b70f9

Browse files
committed
fix agent-based deployment
Signed-off-by: Artem Torubarov <[email protected]>
1 parent e9b39bc commit 04b70f9

16 files changed

Lines changed: 127 additions & 116 deletions

File tree

deploy/chorus/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
apiVersion: v2
22
name: chorus
33
description: Helm chart for Chorus S3 management software.
4-
keywords: ["S3","Backup","Replication","Migration"]
4+
keywords: ["S3", "Backup", "Replication", "Migration"]
55
home: https://github.com/clyso/chorus
66
type: application
77
version: 0.1.2
88
appVersion: "v0.5.14"
99
dependencies:
1010
- name: redis
11-
version: 17.11.3
11+
version: 23.1.3
1212
repository: https://charts.bitnami.com/bitnami
1313
condition: redis.enabled
-89.5 KB
Binary file not shown.
112 KB
Binary file not shown.

deploy/chorus/templates/agent/deployment-agent.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ spec:
3838
name: redis-secret
3939
- name: CFG_REDIS_ADDRESS
4040
value: {{ printf "%s-redis-master:6379" ( .Release.Name ) }}
41+
{{- if empty .Values.agent.config.url }}
42+
- name: CFG_URL
43+
value: {{ printf "http://%s-agent.%s.svc.cluster.local:9672" (include "chorus.fullname" . ) ( .Release.Namespace ) | quote }}
44+
{{- end }}
4145
image: {{ .Values.agent.image.repository }}:{{ .Values.agent.image.tag | default .Chart.AppVersion }}
4246
imagePullPolicy: {{ .Values.agent.image.pullPolicy }}
4347
name: agent

deploy/chorus/templates/agent/service-agent.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v1
33
kind: Service
44
metadata:
5-
name: {{ include "chorus.fullname" . }}-agent-service
5+
name: {{ include "chorus.fullname" . }}-agent
66
labels:
77
app: agent
88
{{- include "chorus.labels" . | nindent 4 }}

deploy/chorus/templates/proxy/deployment-proxy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ spec:
7272
name: secret
7373
subPath: config
7474
{{- end }}
75-
terminationGracePeriodSeconds: 10
75+
terminationGracePeriodSeconds: 60
7676
volumes:
7777
- configMap:
7878
name: {{ include "chorus.fullname" . }}-proxy
@@ -82,4 +82,4 @@ spec:
8282
secretName: {{ .Values.existingSecret | default (printf "%s-secret" (include "chorus.fullname" . ) ) }}
8383
name: secret
8484
{{- end }}
85-
{{- end }}
85+
{{- end }}

deploy/chorus/templates/ui/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ spec:
2929
imagePullPolicy: {{ .Values.ui.image.pullPolicy }}
3030
env:
3131
- name: BACKEND_URL
32-
value: {{ printf "http://%s-rest:%d" .Release.Name ( .Values.worker.restApiService.portRest.port | int) | quote }}
32+
value: {{ printf "http://%s-rest:%d" (include "chorus.fullname" . ) ( .Values.worker.restApiService.portRest.port | int) | quote }}
3333
ports:
3434
- containerPort: 80
3535
name: http

deploy/chorus/values.yaml

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ proxy:
66
pullPolicy: Always
77
replicas: 2
88
resources:
9-
limits:
10-
cpu: 100m
11-
memory: 300Mi
12-
requests:
13-
cpu: 50m
14-
memory: 150Mi
9+
# limits:
10+
# cpu: 100m
11+
# memory: 300Mi
12+
# requests:
13+
# cpu: 50m
14+
# memory: 150Mi
1515
proxyService:
1616
portHttp:
1717
port: 9669
@@ -49,12 +49,12 @@ worker:
4949
tag: "" # Chart appVersion will be used if empty
5050
pullPolicy: Always
5151
resources:
52-
limits:
53-
cpu: 100m
54-
memory: 300Mi
55-
requests:
56-
cpu: 50m
57-
memory: 150Mi
52+
# limits:
53+
# cpu: 100m
54+
# memory: 300Mi
55+
# requests:
56+
# cpu: 50m
57+
# memory: 150Mi
5858
restApiService:
5959
portRest:
6060
port: 9671
@@ -76,7 +76,7 @@ worker:
7676
endpoint: # url to Jaeger or other open trace provider
7777
rclone:
7878
memoryLimit:
79-
enabled: true
79+
enabled: false
8080
limit: 300M # Max RAM memory for file copy. Possible values: 50M <= mem <= (total app RAM - 50M). More memory -> faster s3 replication. # For example: if worker container resources.memory.limit = 500M, then mem = 450M
8181
retryMin: 2s
8282
retryMax: 20s
@@ -89,7 +89,7 @@ worker:
8989
retryMin: 2s
9090
retryMax: 20s
9191
globalFileLimit:
92-
enabled: true
92+
enabled: false
9393
limit: 3
9494
retryMin: 2s
9595
retryMax: 20s
@@ -120,8 +120,6 @@ commonConfig:
120120
tagging: true
121121
acl: true
122122
storage:
123-
createRouting: true # create roting rules to route proxy requests to main storage
124-
createReplication: false # create replication rules to replicate data from main to other storages
125123
defaultRegion: "us-east-1" # fallback region. Will be used if origin region is not supported by replication destination
126124
storages:
127125
# one:
@@ -164,8 +162,12 @@ agent:
164162
enabled: false
165163
endpoint: # url to Jaeger or other open trace provider
166164
port: 9673 # agent port to listen incoming notifications
167-
url: http://localhost:9673 # REQUIRED: url to be used by s3 storage to send notifications. The URL should be reachable for s3 storage.
168-
fromStorage: "" # REQUIRED: notifications source storage name from Chorus config. Normally name of the main storage from storage config.
165+
# REQUIRED: url to be used by s3 storage to send notifications. The URL should be reachable for s3 storage.
166+
# set empty to use k8s service URL if fromStorage is in the same k8s cluster
167+
# http://<helm_release>-agent.<release_ns>.svc.cluster.local:9672
168+
url: ""
169+
# REQUIRED: notifications source storage name from Chorus config. Normally name of the main storage from storage config.
170+
fromStorage: ""
169171
existingSecret: "" # set name of existing secret with storage credentials or
170172
secret: "" # set storage credentials here to create secret:
171173
# Example
@@ -199,6 +201,22 @@ secret: "" # set storage credentials here to create secret:
199201
redis:
200202
enabled: true
201203
architecture: standalone
204+
# uncomment to enable redis persistence. Required for production setup
205+
# master:
206+
# persistence:
207+
# enabled: true
208+
# size: 64Gi # conservative estimate
209+
# storageClass: "" # Use default storage class or specify (e.g., "gp2")
210+
# reesources: {} # Redis requests/limits.
211+
# commonConfiguration: |-
212+
# appendonly yes
213+
# appendfsync everysec
214+
# metrics: # enable redis metrics
215+
# enabled: true
216+
# serviceMonitor:
217+
# enabled: true
218+
# additionalLabels:
219+
# release: kube-prometheus-stack
202220
auth:
203221
existingSecret: redis-secret
204222
existingSecretPasswordKey: password

docker-compose/s3-credentials.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
storage:
2-
createRouting: true # create roting rules to route proxy requests to main storage
3-
createReplication: false # create replication rules to replicate data from main to other storages
42
defaultRegion: "us-east-1" # fallback region. Will be used if origin region is not supported by replication destination
53
storages:
64
main: # yaml key with some handy storage name

go.mod

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ replace github.com/hibiken/asynq => github.com/clyso/asynq v0.0.0-20250821155534
77
require (
88
github.com/alicebob/miniredis/v2 v2.35.0
99
github.com/aws/aws-sdk-go v1.55.7
10-
github.com/aws/aws-sdk-go-v2 v1.37.2
11-
github.com/aws/aws-sdk-go-v2/credentials v1.18.3
12-
github.com/aws/aws-sdk-go-v2/service/sns v1.22.2
10+
github.com/aws/aws-sdk-go-v2 v1.39.2
11+
github.com/aws/aws-sdk-go-v2/credentials v1.18.16
12+
github.com/aws/aws-sdk-go-v2/service/sns v1.38.5
1313
github.com/bsm/redislock v0.9.4
1414
github.com/go-redis/redis_rate/v10 v10.0.1
1515
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
@@ -111,23 +111,23 @@ require (
111111
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
112112
github.com/ashanbrown/forbidigo/v2 v2.1.0 // indirect
113113
github.com/ashanbrown/makezero/v2 v2.0.1 // indirect
114-
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0 // indirect
115-
github.com/aws/aws-sdk-go-v2/config v1.30.3 // indirect
116-
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.2 // indirect
117-
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.3 // indirect
118-
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.2 // indirect
119-
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.2 // indirect
114+
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.1 // indirect
115+
github.com/aws/aws-sdk-go-v2/config v1.31.12 // indirect
116+
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 // indirect
117+
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.19.12 // indirect
118+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 // indirect
119+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 // indirect
120120
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
121-
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.2 // indirect
122-
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 // indirect
123-
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.2 // indirect
124-
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.2 // indirect
125-
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.2 // indirect
126-
github.com/aws/aws-sdk-go-v2/service/s3 v1.86.0 // indirect
127-
github.com/aws/aws-sdk-go-v2/service/sso v1.27.0 // indirect
128-
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.32.0 // indirect
129-
github.com/aws/aws-sdk-go-v2/service/sts v1.36.0 // indirect
130-
github.com/aws/smithy-go v1.22.5 // indirect
121+
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.9 // indirect
122+
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 // indirect
123+
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.0 // indirect
124+
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 // indirect
125+
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.9 // indirect
126+
github.com/aws/aws-sdk-go-v2/service/s3 v1.88.4 // indirect
127+
github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 // indirect
128+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 // indirect
129+
github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 // indirect
130+
github.com/aws/smithy-go v1.23.0 // indirect
131131
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
132132
github.com/beorn7/perks v1.0.1 // indirect
133133
github.com/bkielbasa/cyclop v1.2.3 // indirect

0 commit comments

Comments
 (0)