forked from LaconicNetwork/kompose
fix: expose container to host only with labels (#1880)
Signed-off-by: ahmed.g <ahmed.g@adjoe.io> Signed-off-by: TessaIO <ahmedgrati1999@gmail.com>
This commit is contained in:
@@ -2,6 +2,8 @@ version: "3.3"
|
||||
|
||||
services:
|
||||
nginx:
|
||||
labels:
|
||||
kompose.container.kompose.controller.port.expose: true
|
||||
ports:
|
||||
- target: 80
|
||||
published: 80
|
||||
|
||||
@@ -13,7 +13,6 @@ spec:
|
||||
selector:
|
||||
io.kompose.service: nginx
|
||||
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
@@ -37,8 +36,6 @@ spec:
|
||||
name: nginx
|
||||
ports:
|
||||
- containerPort: 80
|
||||
hostPort: 80
|
||||
protocol: TCP
|
||||
restartPolicy: Always
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ spec:
|
||||
name: nginx
|
||||
ports:
|
||||
- containerPort: 80
|
||||
hostPort: 80
|
||||
protocol: TCP
|
||||
restartPolicy: Always
|
||||
test: false
|
||||
|
||||
Reference in New Issue
Block a user