api-docs deployment

This commit is contained in:
Rajat Soni
2019-08-28 14:56:00 +05:30
parent 82838e5d0c
commit e28c5acc9a
3 changed files with 60 additions and 2 deletions

View File

@@ -179,6 +179,7 @@ e2e_test:
- export DASHBOARD_URL=`sudo kubectl describe svc dashboard | grep Endpoints | cut -d ":" -f 2`
- export HOME_URL=`sudo kubectl describe svc home | grep Endpoints | cut -d ":" -f 2`
- export STATUSPAGE_URL=`sudo kubectl describe svc status-page | grep Endpoints | cut -d ":" -f 2`
- export APIDOCS_URL=`sudo kubectl describe svc api-docs | grep Endpoints | cut -d ":" -f 2`
- echo ACCOUNTS_URL=$ACCOUNTS_URL
- echo BACKEND_URL=$BACKEND_URL
- echo DASHBOARD_URL=$DASHBOARD_URL

View File

@@ -112,6 +112,61 @@ spec:
type: LoadBalancer
---
# Fyipe API docs Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-docs
labels:
app: api-docs
spec:
selector:
matchLabels:
app: api-docs
replicas: 1
template:
metadata:
labels:
app: api-docs
spec:
containers:
- image: localhost:32000/api-docs:master
name: api-docs
imagePullPolicy: Always
env:
- name: FYIPE_HOSTED
value: "true"
- name: HOST
value: "accounts"
- name: BACKEND_HOST
value: "backend"
- name: DASHBOARD_HOST
value: "dashboard"
ports:
- containerPort: 1445
hostPort: 1445
name: api-docs
restartPolicy: Always
imagePullSecrets:
- name: gitlabcredv2
---
# Fyipe API docs Service
apiVersion: v1
kind: Service
metadata:
labels:
app: api-docs
name: api-docs
spec:
ports:
- port: 80
protocol: TCP
targetPort: 1445
selector:
app: api-docs
type: LoadBalancer
---
# Fyipe Backend Deployment
apiVersion: apps/v1
kind: Deployment

View File

@@ -6,5 +6,7 @@ sudo sed -i '/backend/c\' /etc/hosts
echo $BACKEND_URL' backend' | sudo tee -a /etc/hosts
sudo sed -i '/home/c\' /etc/hosts
echo $HOME_URL' home' | sudo tee -a /etc/hosts
sudo sed -i '/statuspage/c\' /etc/hosts
echo $STATUSPAGE_URL' statuspage' | sudo tee -a /etc/hosts
sudo sed -i '/status-page/c\' /etc/hosts
echo $STATUSPAGE_URL' status-page' | sudo tee -a /etc/hosts
sudo sed -i '/api-docs/c\' /etc/hosts
echo $APIDOCS_URL' api-docs' | sudo tee -a /etc/hosts