Skip to content

Instantly share code, notes, and snippets.

@SumindaD
Created May 13, 2019 10:11
Show Gist options
  • Save SumindaD/68ccf1a9fb812b2252dafbaedff29d8c to your computer and use it in GitHub Desktop.
Save SumindaD/68ccf1a9fb812b2252dafbaedff29d8c to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Secret
metadata:
name: sbsecret
type: Opaque
data:
sbconnection: <Base 64 Encoded Service Bus Connection String>
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: catalogapi-deployment
labels:
app: catalogapi
spec:
replicas: 3
selector:
matchLabels:
app: catalogapi
template:
metadata:
labels:
app: catalogapi
spec:
containers:
- name: catalogapi
image: <Your DockerHub Catalog API Image>:<Tag>
imagePullPolicy: Always
env:
- name: DB_SERVER
value: "<DB Server>"
- name: DB_NAME
value: "CatalogDB"
- name: DB_USER
value: "<DB Username>"
- name: DB_PASSWORD
value: "<DB Password>"
- name: QUEUENAME
value: "auditqueue"
- name: SB_CONNECTION
valueFrom:
secretKeyRef:
name: sbsecret
key: sbconnection
---
apiVersion: v1
kind: Service
metadata:
name: catalogapi-service
spec:
selector:
app: catalogapi
ports:
- port: 80
type: LoadBalancer
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: auditapi-deployment
labels:
app: auditapi
spec:
replicas: 3
selector:
matchLabels:
app: auditapi
template:
metadata:
labels:
app: auditapi
spec:
containers:
- name: auditapi
image: <Your DockerHub Audit API Image>:<Tag>
imagePullPolicy: Always
env:
- name: DB_SERVER
value: "<DB Server>"
- name: DB_NAME
value: "AuditDB"
- name: DB_USER
value: "<DB Username>"
- name: DB_PASSWORD
value: "<DB Password>"
---
apiVersion: v1
kind: Service
metadata:
name: auditapi-service
spec:
selector:
app: auditapi
ports:
- port: 80
type: LoadBalancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment