Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix helm-chart replication only #92

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion helm/transfer/templates/_activate-job-ondemand.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: transfer-{{ .Values.transferSpec.id }}-on-demand-snapshot
name: transfer-{{ .Values.transferSpec.id }}-adhoc
spec:
suspend: {{.Values.transferSpec.regular_snapshot.enabled}}
schedule: {{.Values.transferSpec.regular_snapshot.cron_expression}}
Expand All @@ -12,6 +12,12 @@ spec:
completionMode: Indexed
backoffLimit: 6
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: '9091'
prometheus.io/scrape: 'true'
spec:
restartPolicy: Never
{{- include "transfer.spec" (dict "commandType" "activate" "Values" .Values) | nindent 10 }}

6 changes: 6 additions & 0 deletions helm/transfer/templates/_activate-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@ spec:
completionMode: Indexed
backoffLimit: 6
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: '9091'
prometheus.io/scrape: 'true'
spec:
restartPolicy: Never
{{- include "transfer.spec" (dict "commandType" "activate" "Values" .Values) | nindent 6 }}
14 changes: 13 additions & 1 deletion helm/transfer/templates/_replication-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,20 @@ kind: StatefulSet
metadata:
name: transfer-{{ .Values.transferSpec.id }}-replication
spec:
selector:
matchLabels:
name: transfer-{{ .Values.transferSpec.id }}-replication
serviceName: transfer-{{ .Values.transferSpec.id }}-replication
replicas: {{ .Values.replication.worker_count }}
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: '9091'
prometheus.io/scrape: 'true'
checksum/config: '{{ .Values.transferSpec.src.params | toJson | sha256sum }}-{{ .Values.transferSpec.dst.params | toJson | sha256sum }}'
labels:
name: transfer-{{ .Values.transferSpec.id }}-replication
spec:
{{- include "transfer.spec" (dict "commandType" "replication" "Values" .Values) | nindent 6 }}
restartPolicy: Always
{{- include "transfer.spec" (dict "commandType" "replicate" "Values" .Values) | nindent 6 }}
15 changes: 14 additions & 1 deletion helm/transfer/templates/_transfer_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ containers:
- "{{.Values.coordinator.type}}"
- "--coordinator-s3-bucket"
- "{{.Values.coordinator.bucket}}"
- "--log-level"
- "{{.Values.log.level}}"
- "--log-config"
- "{{.Values.log.config}}"
env:
{{- range $name, $value := .Values.env }}
- name: {{ $name }}
Expand All @@ -19,6 +23,16 @@ containers:
- name: config-volume
mountPath: /var/config/config.yaml
subPath: config.yaml
ports:
- name: prometheus
protocol: TCP
containerPort: 9091
- name: pprof
protocol: TCP
containerPort: 8080
- name: health
protocol: TCP
containerPort: 3000
resources:
requests:
memory: {{ .Values.resources.requests.memory }}
Expand All @@ -27,7 +41,6 @@ containers:
memory: {{ .Values.resources.limits.memory }}
cpu: {{ .Values.resources.limits.cpu }}

restartPolicy: Never
volumes:
- name: config-volume
configMap:
Expand Down
6 changes: 5 additions & 1 deletion helm/transfer/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: ghcr.io/doublecloud/transfer:latest
image: ghcr.io/doublecloud/transfer:v0.0.0-rc7

resources:
requests:
Expand Down Expand Up @@ -39,3 +39,7 @@ coordinator:

env:
NO_KEY: NO_VALUE

log:
level: info # ("panic", "fatal", "error", "warning", "info", "debug")
config: minimal # ("console", "json", "minimal")
Loading