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:
TessaIO
2024-05-29 16:05:04 -04:00
committed by GitHub
parent 29f6765fc6
commit 3bf98301f7
52 changed files with 19 additions and 163 deletions
+2
View File
@@ -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