Skip to content

Commit

Permalink
Merge branch 'master' into somechanges
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratap2018 authored Nov 13, 2024
2 parents e515295 + 3c6b632 commit f33f5a7
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 45 deletions.
88 changes: 44 additions & 44 deletions .deploy/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -15,47 +14,47 @@ spec:
app: vault-app
spec:
containers:
- name: vault-app
image: __GOOGLE_ARTIFACT_URL__/__GOOGLE_PROJECT_ID__/__GOOGLE_ARTIFACT_REPO__/vault-service:__LATEST_RELEASE_TAG__
resources:
limits:
memory: "512Mi"
cpu: "250m"
requests:
memory: "512Mi"
cpu: "250m"
ports:
- containerPort: __PORT__
# livenessProbe:
# httpGet:
# path: /api
# port: __PORT__
# initialDelaySeconds: 15
# periodSeconds: 10
env:
- name: HOST
value: __HOST__
- name: SSL
value: "__SSL__"
- name: ABSOLUTE_URL
value: __ABSOLUTE_URL__
- name: DATA_VAULT
value: __DATA_VAULT__
- name: DB_URL
value: "__DB_URL__"
- name: DB_CONFIG
value: "__DB_CONFIG__"
- name: PORT
value: "__PORT__"
- name: LOG_LEVEL
value: "__LOG_LEVEL__"
volumeMounts:
- name: mongo
mountPath: "/data"
volumes:
- name: vault-app
image: __GOOGLE_ARTIFACT_URL__/__GOOGLE_PROJECT_ID__/__GOOGLE_ARTIFACT_REPO__/vault-service:__LATEST_RELEASE_TAG__
resources:
limits:
memory: "3Gi"
cpu: "500m"
requests:
memory: "2Gi"
cpu: "250m"
ports:
- containerPort: __PORT__
# livenessProbe:
# httpGet:
# path: /api
# port: __PORT__
# initialDelaySeconds: 15
# periodSeconds: 10
env:
- name: HOST
value: __HOST__
- name: SSL
value: "__SSL__"
- name: ABSOLUTE_URL
value: __ABSOLUTE_URL__
- name: DATA_VAULT
value: __DATA_VAULT__
- name: DB_URL
value: "__DB_URL__"
- name: DB_CONFIG
value: "__DB_CONFIG__"
- name: PORT
value: "__PORT__"
- name: LOG_LEVEL
value: "__LOG_LEVEL__"
volumeMounts:
- name: mongo
secret:
secretName: mongo
mountPath: "/data"
volumes:
- name: mongo
secret:
secretName: mongo
---
apiVersion: v1
kind: Service
Expand All @@ -69,8 +68,9 @@ spec:
selector:
app: vault-app
ports:
- port: __PORT__
targetPort: __PORT__
protocol: TCP
- port: __PORT__
targetPort: __PORT__
protocol: TCP
---


25 changes: 25 additions & 0 deletions .deploy/hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: vault-app
namespace: hypermine-development
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: vault-app
minReplicas: 1
maxReplicas: 5
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 90
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { json, urlencoded } from 'express';
import { urlencoded,json } from 'express';
import { LogLevel, Logger, ValidationPipe } from '@nestjs/common';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
async function bootstrap() {
Expand Down

0 comments on commit f33f5a7

Please sign in to comment.