diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e3288d7aa429f74af9041451535a89e51fc938ef..46cf101774f62baaa0ce728980befab23abb6808 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -252,8 +252,8 @@ Build Calqul Git-lfs: variables: CALQUL_ACTION: "compute-factors" MEM_REQUEST: "2000Mi" - CPU_REQUEST: "1500m" - MEM_LIMIT: "2000Mi" + CPU_REQUEST: "2000m" + MEM_LIMIT: "4000Mi" CPU_LIMIT: "2000m" 4. Compute Indices: diff --git a/deployment/pods/db-calqul.yml b/deployment/pods/db-calqul.yml index 7c40ac3796dcc3ffdb6dfac3d2084a8b7ff2c8bd..115903de0e8aa6afea85da950c6a280ec8c684fc 100644 --- a/deployment/pods/db-calqul.yml +++ b/deployment/pods/db-calqul.yml @@ -1,73 +1,73 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: calqul-db-__NAMESPACE_ENV__ - namespace: __NAMESPACE__ - labels: - apps: calqul-db-__NAMESPACE_ENV__ -spec: - replicas: 1 - selector: - matchLabels: - app: calqul-db-__NAMESPACE_ENV__ - role: primary - tier: database - template: - metadata: - labels: - app: calqul-db-__NAMESPACE_ENV__ - role: primary - tier: database - spec: - imagePullSecrets: - - name: forge-secret - volumes: - - name: arb-data - persistentVolumeClaim: - claimName: pvc-01-__NAMESPACE__-claim - containers: - - name: calqul-db-__NAMESPACE_ENV__ - image: registry.forge.grandlyon.com/erasme/script-recalcul-calque/calqul-db-__NAMESPACE_ENV__ - imagePullPolicy: Always - ports: - - containerPort: 5432 - protocol: TCP - readinessProbe: - tcpSocket: - port: 5432 - initialDelaySeconds: 15 - periodSeconds: 10 - livenessProbe: - tcpSocket: - port: 5432 - initialDelaySeconds: 15 - periodSeconds: 20 - resources: - limits: - cpu: 400m - memory: 500Mi - requests: - cpu: 200m - memory: 256Mi - env: - - name: POSTGRES_DB - value: "__POSTGRES_DB__" - - name: POSTGRES_PASSWORD - value: "__POSTGRES_PASSWORD__" - - name: POSTGRES_PORT - value: "__POSTGRES_PORT__" - - name: POSTGRES_SERVER - value: "__POSTGRES_SERVER__" - - name: POSTGRES_USER - value: "__POSTGRES_USER__" - - name: POSTGRES_SCHEMA - value: "__POSTGRES_SCHEMA__" - # need to define PGDATA env var because not using the default /var/lib/postgresql/data, but a subpath under it. - - name: PGDATA - value: /arb-data/pgdata - volumeMounts: - # need a subpath as postgres wants an empty folder (the mounted folder `$PGDATA` has a `lost+found` directory) - # see https://stackoverflow.com/questions/51168558/how-to-mount-a-postgresql-volume-using-aws-ebs-in-kubernete - - name: arb-data - mountPath: "/arb-data" - subpath: pgdata +apiVersion: apps/v1 +kind: Deployment +metadata: + name: calqul-db-__NAMESPACE_ENV__ + namespace: __NAMESPACE__ + labels: + apps: calqul-db-__NAMESPACE_ENV__ +spec: + replicas: 1 + selector: + matchLabels: + app: calqul-db-__NAMESPACE_ENV__ + role: primary + tier: database + template: + metadata: + labels: + app: calqul-db-__NAMESPACE_ENV__ + role: primary + tier: database + spec: + imagePullSecrets: + - name: forge-secret + volumes: + - name: arb-data + persistentVolumeClaim: + claimName: pvc-01-__NAMESPACE__-claim + containers: + - name: calqul-db-__NAMESPACE_ENV__ + image: registry.forge.grandlyon.com/erasme/script-recalcul-calque/calqul-db-__NAMESPACE_ENV__ + imagePullPolicy: Always + ports: + - containerPort: 5432 + protocol: TCP + readinessProbe: + tcpSocket: + port: 5432 + initialDelaySeconds: 15 + periodSeconds: 10 + livenessProbe: + tcpSocket: + port: 5432 + initialDelaySeconds: 15 + periodSeconds: 20 + resources: + limits: + cpu: 400m + memory: 500Mi + requests: + cpu: 400m + memory: 500Mi + env: + - name: POSTGRES_DB + value: "__POSTGRES_DB__" + - name: POSTGRES_PASSWORD + value: "__POSTGRES_PASSWORD__" + - name: POSTGRES_PORT + value: "__POSTGRES_PORT__" + - name: POSTGRES_SERVER + value: "__POSTGRES_SERVER__" + - name: POSTGRES_USER + value: "__POSTGRES_USER__" + - name: POSTGRES_SCHEMA + value: "__POSTGRES_SCHEMA__" + # need to define PGDATA env var because not using the default /var/lib/postgresql/data, but a subpath under it. + - name: PGDATA + value: /arb-data/pgdata + volumeMounts: + # need a subpath as postgres wants an empty folder (the mounted folder `$PGDATA` has a `lost+found` directory) + # see https://stackoverflow.com/questions/51168558/how-to-mount-a-postgresql-volume-using-aws-ebs-in-kubernete + - name: arb-data + mountPath: "/arb-data" + subpath: pgdata