Feat add ns generation (#1667)

* feat: add ns generation for k8s

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>

* feat: add ns generation for openshift

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>

* test: add functional tests

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>

* fix: remove some code nits

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>

---------

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
This commit is contained in:
AhmedGrati
2023-07-16 22:59:16 +01:00
committed by GitHub
parent 071451dfdf
commit b6b708b637
14 changed files with 291 additions and 1 deletions
+6
View File
@@ -0,0 +1,6 @@
version: '3'
services:
web:
image: nginx
ports:
- 80:80
+62
View File
@@ -0,0 +1,62 @@
---
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
io.kompose.service: web
name: web
namespace: web
spec:
ports:
- name: "80"
port: 80
targetPort: 80
selector:
io.kompose.service: web
status:
loadBalancer: {}
---
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: web
namespace: web
spec: {}
status: {}
---
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
io.kompose.service: web
name: web
namespace: web
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: web
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
io.kompose.network/namespace-default: "true"
io.kompose.service: web
spec:
containers:
- image: nginx
name: web
ports:
- containerPort: 80
hostPort: 80
protocol: TCP
resources: {}
restartPolicy: Always
status: {}
+104
View File
@@ -0,0 +1,104 @@
---
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
io.kompose.service: web
name: web
namespace: web
spec:
ports:
- name: "80"
port: 80
targetPort: 80
selector:
io.kompose.service: web
status:
loadBalancer: {}
---
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: web
namespace: web
spec: {}
status: {}
---
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
creationTimestamp: null
labels:
io.kompose.service: web
name: web
namespace: web
spec:
replicas: 1
selector:
io.kompose.service: web
strategy:
resources: {}
template:
metadata:
creationTimestamp: null
labels:
io.kompose.network/namespace-default: "true"
io.kompose.service: web
spec:
containers:
- image: ' '
name: web
ports:
- containerPort: 80
hostPort: 80
protocol: TCP
resources: {}
restartPolicy: Always
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- web
from:
kind: ImageStreamTag
name: web:latest
type: ImageChange
status:
availableReplicas: 0
latestVersion: 0
observedGeneration: 0
replicas: 0
unavailableReplicas: 0
updatedReplicas: 0
---
apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
creationTimestamp: null
labels:
io.kompose.service: web
name: web
namespace: web
spec:
lookupPolicy:
local: false
tags:
- annotations: null
from:
kind: DockerImage
name: nginx
generation: null
importPolicy: {}
name: latest
referencePolicy:
type: ""
status:
dockerImageRepository: ""