Skip to content

Commit

Permalink
adding the mongo manifest file
Browse files Browse the repository at this point in the history
  • Loading branch information
Yogesh authored and Yogesh committed Sep 24, 2019
1 parent 8159e83 commit 7b02c1a
Showing 1 changed file with 110 additions and 0 deletions.
110 changes: 110 additions & 0 deletions mongo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
apiVersion: v1
kind: Service
metadata:
name: mongo
namespace: qa
labels:
service: mongo
env: qa
spec:
clusterIP: None
ports:
- name: mongod
port: 27017
targetPort: mongod
publishNotReadyAddresses: true
selector:
service: mongo
env: qa
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
name: mongo-ui
namespace: qa
annotations:
cloud.google.com/load-balancer-type: "Internal"
labels:
service: mongo
env: qa
spec:
externalTrafficPolicy: Cluster
ports:
- name: mongod
nodePort: 30230
port: 27017
targetPort: mongod
selector:
service: mongo
env: qa
type: LoadBalancer
loadBalancerIP: "10.151.0.25"
loadBalancerSourceRanges:
- 10.0.0.0/8
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mongo
namespace: qa
labels:
service: mongo
spec:
serviceName: mongo
replicas: 1
updateStrategy:
type: RollingUpdate
selector:
matchLabels:
service: mongo
env: qa
template:
metadata:
labels:
service: mongo
env: qa
spec:
terminationGracePeriodSeconds: 180
containers:
- name: mongo
image: mongo:3.4
imagePullPolicy: Always
securityContext:
privileged: false
ports:
- name: mongod
containerPort: 27017
env:
- name: MONGO_INITDB_ROOT_USERNAME
value: "root"
# valueFrom:
# secretKeyRef:
# name: mongo-secret
# key: MONGO_INITDB_ROOT_USERNAME
- name: MONGO_INITDB_ROOT_PASSWORD
value: "admin@123"
# valueFrom:
# secretKeyRef:
# name: mongo-secret
# key: MONGO_INITDB_ROOT_PASSWORD
resources:
requests:
memory: "1G"
cpu: "400m"
limits:
memory: "2G"
cpu: "800m"
# volumeMounts:
# - name: mongo-data
# mountPath: /data/db
# volumeClaimTemplates:
# - metadata:
# name: mongo-data
# spec:
# accessModes:
# - ReadWriteOnce
# resources:
# requests:
# storage: 100Gi
# storageClassName: nfs-client

0 comments on commit 7b02c1a

Please sign in to comment.