forked from LaconicNetwork/kompose
* feat: add the host port to containers * test(unit): add unit tests for host port and protocol * test(functional): add functional tests of host port and protocol * test(functional): add functional tests of host port and protocol for openshift
67 lines
1.2 KiB
YAML
67 lines
1.2 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: nginx
|
|
name: nginx
|
|
spec:
|
|
ports:
|
|
- name: "80"
|
|
port: 80
|
|
targetPort: 80
|
|
selector:
|
|
io.kompose.service: nginx
|
|
status:
|
|
loadBalancer: {}
|
|
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: nginx
|
|
name: nginx
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
io.kompose.service: nginx
|
|
strategy: {}
|
|
template:
|
|
metadata:
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.network/host-port-protocol-default: "true"
|
|
io.kompose.service: nginx
|
|
spec:
|
|
containers:
|
|
- image: nginx
|
|
name: nginx
|
|
ports:
|
|
- containerPort: 80
|
|
hostPort: 80
|
|
protocol: TCP
|
|
resources: {}
|
|
restartPolicy: Always
|
|
status: {}
|
|
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
creationTimestamp: null
|
|
name: host-port-protocol-default
|
|
spec:
|
|
ingress:
|
|
- from:
|
|
- podSelector:
|
|
matchLabels:
|
|
io.kompose.network/host-port-protocol-default: "true"
|
|
podSelector:
|
|
matchLabels:
|
|
io.kompose.network/host-port-protocol-default: "true"
|
|
|