Skip to content

Commit

Permalink
v1
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin Oguntoye authored and benjamin Oguntoye committed Aug 30, 2022
1 parent f96da04 commit 8747d33
Show file tree
Hide file tree
Showing 11 changed files with 368 additions and 0 deletions.
9 changes: 9 additions & 0 deletions aws-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: aws-secret
type: Opaque
data:
AWS_USER: YXdzX2FjY2Vzc19rZXlfaWQgPSBBS0lBVDZQM0JOV0JQWEVBMkpGTQphd3Nfc2VjcmV0X2FjY2Vzc19rZXkgPSA1bFFjV2d6eTBvUlhBS1FKbWpZTEVlQTNyUnllSXhselphVnpkTENnCg==
# aws_access_key_id: YXdzX2FjY2Vzc19rZXlfaWQgPSBBS0lBVDZQM0JOV0JQWEVBMkpGTQphd3Nfc2VjcmV0X2FjY2Vz
# aws_secret_access_key: c19rZXkgPSA1bFFjV2d6eTBvUlhBS1FKbWpZTEVlQTNyUnllSXhselphVnpkTENnCg==
14 changes: 14 additions & 0 deletions env-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: env-configmap
labels:
app: env-configmap
data:
POSTGRES_HOST: micro-database-2.cuxfohxmwd2x.us-east-1.rds.amazonaws.com
POSTGRES_DB: postgres
AWS_BUCKET: project3-271646289282-dev
AWS_REGION: us-east-1
AWS_PROFILE: default
JWT_SECRET: testing
URL: http://localhost:8080
9 changes: 9 additions & 0 deletions env-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# {"POSTGRES_USERNAME": "postgres", "POSTGRES_PASSWORD": "joey1234"}
apiVersion: v1
kind: Secret
metadata:
name: env-secret
type: Opaque
data:
POSTGRES_USERNAME: postgres
POSTGRES_PASSWORD: joey1234
72 changes: 72 additions & 0 deletions udagram-api-feed/backend-feed-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: udagram-api-feed
labels:
app: udagram-api-feed
spec:
replicas: 2
selector:
matchLabels:
app: udagram-api-feed
template:
metadata:
labels:
app: udagram-api-feed
spec:
containers:
- name: docker-kubernates
image: jlord31/udagram-api-feed
ports:
- containerPort: 8080
env:
- name: AWS_USER
valueFrom:
secretKeyRef:
name: aws-secret
key: AWS_USER
- name: POSTGRES_USERNAME
valueFrom:
secretKeyRef:
name: env-secret
key: POSTGRES_USERNAME
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: env-secret
key: POSTGRES_PASSWORD
- name: POSTGRES_HOST
valueFrom:
configMapKeyRef:
name: env-configmap
key: POSTGRES_HOST
- name: POSTGRES_DB
valueFrom:
configMapKeyRef:
name: env-configmap
key: POSTGRES_DB
- name: AWS_BUCKET
valueFrom:
configMapKeyRef:
name: env-configmap
key: AWS_BUCKET
- name: AWS_REGION
valueFrom:
configMapKeyRef:
name: env-configmap
key: AWS_REGION
- name: AWS_PROFILE
valueFrom:
configMapKeyRef:
name: env-configmap
key: AWS_PROFILE
- name: JWT_SECRET
valueFrom:
configMapKeyRef:
name: env-configmap
key: JWT_SECRET
- name: URL
valueFrom:
configMapKeyRef:
name: env-configmap
key: URL
12 changes: 12 additions & 0 deletions udagram-api-feed/backend-feed-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: udagram-api-feed
labels:
run: udagram-api-feed
spec:
ports:
- port: 8080
protocol: TCP
selector:
run: udagram-api-feed
72 changes: 72 additions & 0 deletions udagram-api-user/backend-user-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: udagram-user-feed
labels:
app: udagram-user-feed
spec:
replicas: 2
selector:
matchLabels:
app: udagram-user-feed
template:
metadata:
labels:
app: udagram-user-feed
spec:
containers:
- name: docker-kubernates
image: jlord31/udagram-user-feed
ports:
- containerPort: 8080
env:
- name: AWS_USER
valueFrom:
secretKeyRef:
name: aws-secret
key: AWS_USER
- name: POSTGRES_USERNAME
valueFrom:
secretKeyRef:
name: env-secret
key: POSTGRES_USERNAME
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: env-secret
key: POSTGRES_PASSWORD
- name: POSTGRES_HOST
valueFrom:
configMapKeyRef:
name: env-configmap
key: POSTGRES_HOST
- name: POSTGRES_DB
valueFrom:
configMapKeyRef:
name: env-configmap
key: POSTGRES_DB
- name: AWS_BUCKET
valueFrom:
configMapKeyRef:
name: env-configmap
key: AWS_BUCKET
- name: AWS_REGION
valueFrom:
configMapKeyRef:
name: env-configmap
key: AWS_REGION
- name: AWS_PROFILE
valueFrom:
configMapKeyRef:
name: env-configmap
key: AWS_PROFILE
- name: JWT_SECRET
valueFrom:
configMapKeyRef:
name: env-configmap
key: JWT_SECRET
- name: URL
valueFrom:
configMapKeyRef:
name: env-configmap
key: URL
12 changes: 12 additions & 0 deletions udagram-api-user/backend-user-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: udagram-user-feed
labels:
run: udagram-user-feed
spec:
ports:
- port: 8080
protocol: TCP
selector:
run: udagram-user-feed
72 changes: 72 additions & 0 deletions udagram-frontend/frontend-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: udagram-frontend
labels:
app: udagram-frontend
spec:
replicas: 2
selector:
matchLabels:
app: udagram-frontend
template:
metadata:
labels:
app: udagram-frontend
spec:
containers:
- name: docker-kubernates
image: jlord31/udagram-frontend
ports:
- containerPort: 8100
env:
- name: AWS_USER
valueFrom:
secretKeyRef:
name: aws-secret
key: AWS_USER
- name: POSTGRES_USERNAME
valueFrom:
secretKeyRef:
name: env-secret
key: POSTGRES_USERNAME
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: env-secret
key: POSTGRES_PASSWORD
- name: POSTGRES_HOST
valueFrom:
configMapKeyRef:
name: env-configmap
key: POSTGRES_HOST
- name: POSTGRES_DB
valueFrom:
configMapKeyRef:
name: env-configmap
key: POSTGRES_DB
- name: AWS_BUCKET
valueFrom:
configMapKeyRef:
name: env-configmap
key: AWS_BUCKET
- name: AWS_REGION
valueFrom:
configMapKeyRef:
name: env-configmap
key: AWS_REGION
- name: AWS_PROFILE
valueFrom:
configMapKeyRef:
name: env-configmap
key: AWS_PROFILE
- name: JWT_SECRET
valueFrom:
configMapKeyRef:
name: env-configmap
key: JWT_SECRET
- name: URL
valueFrom:
configMapKeyRef:
name: env-configmap
key: URL
12 changes: 12 additions & 0 deletions udagram-frontend/frontend-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: udagram-frontend
labels:
run: udagram-frontend
spec:
ports:
- port: 8100
protocol: TCP
selector:
run: udagram-frontend
72 changes: 72 additions & 0 deletions udagram-reverseproxy/reverseproxy-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: udagram-reverseproxy
labels:
app: udagram-reverseproxy
spec:
replicas: 2
selector:
matchLabels:
app: udagram-reverseproxy
template:
metadata:
labels:
app: udagram-reverseproxy
spec:
containers:
- name: docker-kubernates
image: jlord31/reverseproxy
ports:
- containerPort: 8080
env:
- name: AWS_USER
valueFrom:
secretKeyRef:
name: aws-secret
key: AWS_USER
- name: POSTGRES_USERNAME
valueFrom:
secretKeyRef:
name: env-secret
key: POSTGRES_USERNAME
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: env-secret
key: POSTGRES_PASSWORD
- name: POSTGRES_HOST
valueFrom:
configMapKeyRef:
name: env-configmap
key: POSTGRES_HOST
- name: POSTGRES_DB
valueFrom:
configMapKeyRef:
name: env-configmap
key: POSTGRES_DB
- name: AWS_BUCKET
valueFrom:
configMapKeyRef:
name: env-configmap
key: AWS_BUCKET
- name: AWS_REGION
valueFrom:
configMapKeyRef:
name: env-configmap
key: AWS_REGION
- name: AWS_PROFILE
valueFrom:
configMapKeyRef:
name: env-configmap
key: AWS_PROFILE
- name: JWT_SECRET
valueFrom:
configMapKeyRef:
name: env-configmap
key: JWT_SECRET
- name: URL
valueFrom:
configMapKeyRef:
name: env-configmap
key: URL
12 changes: 12 additions & 0 deletions udagram-reverseproxy/reverseproxy-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: udagram-reverseproxy
labels:
run: udagram-reverseproxy
spec:
ports:
- port: 8080
protocol: TCP
selector:
run: udagram-reverseproxy

0 comments on commit 8747d33

Please sign in to comment.