diff --git a/helm/transfer/templates/_activate-job-ondemand.yaml b/helm/transfer/templates/_activate-job-ondemand.yaml index 5138185a..bb32cb08 100644 --- a/helm/transfer/templates/_activate-job-ondemand.yaml +++ b/helm/transfer/templates/_activate-job-ondemand.yaml @@ -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}} @@ -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 }} diff --git a/helm/transfer/templates/_activate-job.yaml b/helm/transfer/templates/_activate-job.yaml index 8ef07510..81834693 100644 --- a/helm/transfer/templates/_activate-job.yaml +++ b/helm/transfer/templates/_activate-job.yaml @@ -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 }} diff --git a/helm/transfer/templates/_replication-statefulset.yaml b/helm/transfer/templates/_replication-statefulset.yaml index 01d53921..6f1e7ba5 100644 --- a/helm/transfer/templates/_replication-statefulset.yaml +++ b/helm/transfer/templates/_replication-statefulset.yaml @@ -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 }} diff --git a/helm/transfer/templates/_transfer_spec.yaml b/helm/transfer/templates/_transfer_spec.yaml index 024878b2..c812b616 100644 --- a/helm/transfer/templates/_transfer_spec.yaml +++ b/helm/transfer/templates/_transfer_spec.yaml @@ -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 }} @@ -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 }} @@ -27,7 +41,6 @@ containers: memory: {{ .Values.resources.limits.memory }} cpu: {{ .Values.resources.limits.cpu }} -restartPolicy: Never volumes: - name: config-volume configMap: diff --git a/helm/transfer/values.yaml b/helm/transfer/values.yaml index 9ca0c053..950d4660 100644 --- a/helm/transfer/values.yaml +++ b/helm/transfer/values.yaml @@ -1,4 +1,4 @@ -image: ghcr.io/doublecloud/transfer:latest +image: ghcr.io/doublecloud/transfer:v0.0.0-rc7 resources: requests: @@ -39,3 +39,7 @@ coordinator: env: NO_KEY: NO_VALUE + +log: + level: info # ("panic", "fatal", "error", "warning", "info", "debug") + config: minimal # ("console", "json", "minimal")