This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spec: | |
containers: | |
- image: invoices_svc:v2 | |
imagePullPolicy: IfNotPresent | |
name: invoices-svc | |
env: | |
- name: EXPECTED_DATE_URI | |
value: http://expected-date-svc.default.svc.cluster.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spec: | |
containers: | |
- image: invoices_svc:v2 | |
imagePullPolicy: IfNotPresent | |
name: invoices-svc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express") | |
const request = require("request-promise") | |
const app = express() | |
const addExpectedDate = async invoice => { | |
try { | |
const { expectedDate } = await request(`${process.env.EXPECTED_DATE_URI}/api/expected-date/${invoice.id}`, { | |
json: true | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
run: expected-date-svc | |
name: expected-date-svc | |
namespace: default | |
spec: | |
replicas: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express") | |
const moment = require("moment") | |
const app = express() | |
app.get("/api/expected-date/:invoiceId", (req, res) => { | |
const invoiceId = parseInt(req.params.invoiceId) | |
// ¯\_(ツ)_/¯ | |
const bump = Math.floor(Math.random() * 10) + 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
run: auth-svc | |
name: auth-svc | |
namespace: default | |
spec: | |
replicas: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express") | |
const app = express() | |
app.use((req, res) => { | |
if (req.get('authorization') === process.env.TOKEN) { | |
res.json({ | |
ok: true | |
}) | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
run: invoices-svc | |
name: invoices-svc | |
namespace: default | |
annotations: | |
getambassador.io/config: | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
service: ambassador-admin | |
name: ambassador-admin | |
spec: | |
type: NodePort | |
ports: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
run: invoices-svc | |
name: invoices-svc | |
namespace: default | |
spec: | |
replicas: 3 |
NewerOlder