Skip to content

Commit

Permalink
Adding production controller file (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shwetabhk authored Sep 23, 2022
1 parent ff155d9 commit 21bb766
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/production_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
KUBERNETES_MANIFEST_FILE_PATH: deployment/production/controller.yml
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/staging_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
KUBERNETES_MANIFEST_FILE_PATH: deployment/staging/controller.yml
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
Expand Down
94 changes: 94 additions & 0 deletions deployment/production/controller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
apiVersion: v1
kind: Service
metadata:
name: quickbooks-api
namespace: integrations
labels:
app: quickbooks-api
spec:
ports:
- port: 8000
selector:
app: quickbooks-api
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: quickbooks-api
namespace: integrations
labels:
app: quickbooks-api
spec:
replicas: 1
selector:
matchLabels:
app: quickbooks-api
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: quickbooks-api
spec:
containers:
- name: quickbooks-api
image: docker.io/{{DOCKERHUB_USERNAME}}/fyle_qbo-api:{{RELEASE_VERSION}}
resources:
limits:
memory: 250Mi
requests:
memory: 250Mi
env:
- name: GET_HOSTS_FROM
value: dns
ports:
- containerPort: 8000
readinessProbe:
httpGet:
path: /api/workspaces/ready/
port: 8000
initialDelaySeconds: 10
timeoutSeconds: 1
envFrom:
- secretRef:
name: quickbooks-api-secrets
imagePullSecrets:
- name: myregistrykey2
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: quickbooks-api-qcluster
namespace: integrations
labels:
app: quickbooks-api-qcluster
spec:
replicas: 1
selector:
matchLabels:
app: quickbooks-api-qcluster
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: quickbooks-api-qcluster
spec:
containers:
- name: quickbooks-api
image: docker.io/{{DOCKERHUB_USERNAME}}/fyle_qbo-api:{{RELEASE_VERSION}}
command: ['/bin/bash', 'start_qcluster.sh']
resources:
limits:
memory: 800Mi
requests:
memory: 800Mi
env:
- name: GET_HOSTS_FROM
value: dns
envFrom:
- secretRef:
name: quickbooks-api-secrets
imagePullSecrets:
- name: myregistrykey2

0 comments on commit 21bb766

Please sign in to comment.