forked from k-space/kube
		
	Initial commit
This commit is contained in:
		
							
								
								
									
										45
									
								
								shared/mongoexpress.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								shared/mongoexpress.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
apiVersion: apps/v1
 | 
			
		||||
kind: Deployment
 | 
			
		||||
metadata:
 | 
			
		||||
  name: mongoexpress
 | 
			
		||||
spec:
 | 
			
		||||
  revisionHistoryLimit: 0
 | 
			
		||||
  replicas: 1
 | 
			
		||||
  selector:
 | 
			
		||||
    matchLabels:
 | 
			
		||||
      app: mongoexpress
 | 
			
		||||
  template:
 | 
			
		||||
    metadata:
 | 
			
		||||
      labels:
 | 
			
		||||
        app: mongoexpress
 | 
			
		||||
    spec:
 | 
			
		||||
      containers:
 | 
			
		||||
        - name: mongoexpress
 | 
			
		||||
          image: mongo-express
 | 
			
		||||
          ports:
 | 
			
		||||
           - name: mongoexpress
 | 
			
		||||
             containerPort: 8081
 | 
			
		||||
          env:
 | 
			
		||||
            - name: ME_CONFIG_MONGODB_URL
 | 
			
		||||
              valueFrom:
 | 
			
		||||
                secretKeyRef:
 | 
			
		||||
                  name: mongodb-application-readwrite
 | 
			
		||||
                  key: connectionString.standard
 | 
			
		||||
---
 | 
			
		||||
apiVersion: networking.k8s.io/v1
 | 
			
		||||
kind: NetworkPolicy
 | 
			
		||||
metadata:
 | 
			
		||||
  name: mongoexpress
 | 
			
		||||
spec:
 | 
			
		||||
  podSelector:
 | 
			
		||||
    matchLabels:
 | 
			
		||||
      app: mongoexpress
 | 
			
		||||
  policyTypes:
 | 
			
		||||
  - Egress
 | 
			
		||||
  egress:
 | 
			
		||||
    - to:
 | 
			
		||||
      - podSelector:
 | 
			
		||||
          matchLabels:
 | 
			
		||||
            app: mongodb-svc
 | 
			
		||||
      ports:
 | 
			
		||||
      - port: 27017
 | 
			
		||||
		Reference in New Issue
	
	Block a user