diff --git a/helm/osmcha/templates/adiff-service-worker.yaml b/helm/osmcha/templates/adiff-service-worker.yaml new file mode 100644 index 0000000..d329fd8 --- /dev/null +++ b/helm/osmcha/templates/adiff-service-worker.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: osmcha-adiff-service-worker + labels: + app: osmcha-adiff-service-worker + environment: {{ .Values.config.environment }} + release: {{ .Release.Name }} +spec: + replicas: {{ .Values.adiff_service.replicas}} + selector: + matchLabels: + app: osmcha-adiff-service-worker + template: + metadata: + labels: + app: osmcha-adiff-service-worker + spec: + containers: + - name: osmcha-adiff-service-worker + image: {{ .Values.adiff_service.image.repository }}:{{ .Values.adiff_service.image.tag }} + imagePullPolicy: IfNotPresent + command: + - /bin/sh + - -c + - yarn update-queue + env: + - name: AWS_ACCESS_KEY_ID + valueFrom: + secretKeyRef: + name: osmcha-real-changesets-credentials + key: access_key + - name: AWS_SECRET_ACCESS_KEY + valueFrom: + secretKeyRef: + name: osmcha-real-changesets-credentials + key: secret_key + - name: OsmchaAdminToken + valueFrom: + secretKeyRef: + name: osmcha-admin-token + key: osmcha_admin_token + - name: RedisServer + value: {{ .Values.adiff_service.redis_url }} + restartPolicy: Never diff --git a/helm/osmcha/templates/cron.yaml b/helm/osmcha/templates/cron.yaml index 8bc2af6..4afc82f 100644 --- a/helm/osmcha/templates/cron.yaml +++ b/helm/osmcha/templates/cron.yaml @@ -51,48 +51,3 @@ spec: - name: REDIS_URL value: {{ .Values.app.api.redis_url }} restartPolicy: Never - ---- - -apiVersion: batch/v1 -kind: CronJob -metadata: - name: osmcha-adiff-service-cronjob - labels: - app: osmcha - environment: {{ .Values.config.environment }} - release: {{ .Release.Name }} -spec: - schedule: "*/1 * * * *" - concurrencyPolicy: Forbid - jobTemplate: - spec: - template: - spec: - containers: - - name: osmcha-adiff-service-process-replication - image: {{ .Values.adiff_service.image.repository }}:{{ .Values.adiff_service.image.tag }} - imagePullPolicy: IfNotPresent - command: - - /bin/sh - - -c - - timeout 600s yarn update-queue - env: - - name: AWS_ACCESS_KEY_ID - valueFrom: - secretKeyRef: - name: osmcha-real-changesets-credentials - key: access_key - - name: AWS_SECRET_ACCESS_KEY - valueFrom: - secretKeyRef: - name: osmcha-real-changesets-credentials - key: secret_key - - name: OsmchaAdminToken - valueFrom: - secretKeyRef: - name: osmcha-admin-token - key: osmcha_admin_token - - name: RedisServer - value: {{ .Values.adiff_service.redis_url }} - restartPolicy: Never diff --git a/helm/osmcha/values.yaml b/helm/osmcha/values.yaml index af0465b..df690da 100644 --- a/helm/osmcha/values.yaml +++ b/helm/osmcha/values.yaml @@ -126,7 +126,8 @@ app: # OSMCha adiff service adiff_service: + replicas: 2 image: repository: ghcr.io/osmcha/osm-adiff-service - tag: 49c757613671784a53d6066725674a133424310f + tag: 145be426880b33072b1db8300f7d736feb780e97 redis_url: redis://redis-master:6379