-
Notifications
You must be signed in to change notification settings - Fork 772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to output conversion to one file. #1539
Comments
IMO,
I've always used |
@OneCricketeer For debugging purposes, you might occasionally need to display all the manifests in one file so that you don't have to switch between them when a problem arises. Therefore, IMO I see that the default behavior should remain the same, and we add the |
After investigating this issue, I found that this functionality already exists, by using the kompose convert -f docker-compose.yaml --out f.yaml But the issue is that the output is not the correct one. In fact, for this docker-compose file: version: "3.8"
services:
front_end:
image: gcr.io/google-samples/gb-frontend:v4
ports:
- "80:80"
environment:
- GET_HOSTS_FROM=dns
labels:
kompose.service.expose: lb
kompose.service.expose.ingress-class-name: nginx we'll have the following output: apiVersion: v1
items:
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: /var/folders/jn/kphqd_553871ydfcs_2_5kbm0000gn/T/go-build1291552472/b001/exe/main convert -f docker-compose.yaml --out f.yaml
kompose.service.expose: lb
kompose.service.expose.ingress-class-name: nginx
kompose.version: 1.26.1 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: front-end
name: front_end
spec:
ports:
- name: "80"
port: 80
targetPort: 80
selector:
io.kompose.service: front-end
status:
loadBalancer: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: /var/folders/jn/kphqd_553871ydfcs_2_5kbm0000gn/T/go-build1291552472/b001/exe/main convert -f docker-compose.yaml --out f.yaml
kompose.service.expose: lb
kompose.service.expose.ingress-class-name: nginx
kompose.version: 1.26.1 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: front-end
name: front-end
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: front-end
strategy: {}
template:
metadata:
annotations:
kompose.cmd: /var/folders/jn/kphqd_553871ydfcs_2_5kbm0000gn/T/go-build1291552472/b001/exe/main convert -f docker-compose.yaml --out f.yaml
kompose.service.expose: lb
kompose.service.expose.ingress-class-name: nginx
kompose.version: 1.26.1 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: front-end
spec:
containers:
- env:
- name: GET_HOSTS_FROM
value: dns
image: gcr.io/google-samples/gb-frontend:v4
name: front-end
ports:
- containerPort: 80
resources: {}
restartPolicy: Always
status: {}
- apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kompose.cmd: /var/folders/jn/kphqd_553871ydfcs_2_5kbm0000gn/T/go-build1291552472/b001/exe/main convert -f docker-compose.yaml --out f.yaml
kompose.service.expose: lb
kompose.service.expose.ingress-class-name: nginx
kompose.version: 1.26.1 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: front-end
name: front-end
spec:
ingressClassName: nginx
rules:
- host: lb
http:
paths:
- backend:
service:
name: front-end
port:
number: 80
path: /
pathType: Prefix
status:
loadBalancer: {}
kind: List
metadata: {}
As you can see, the output file is not in the desired behavior, because we cannot use it directly by |
Yeah, we support that. But what do you mean by 'cannot use it diectly'? |
I mean that we cannot execute |
Yeah, we shouldn't be using With Helm, you can export it and it just adds We should do the same with Kompose. You should be able to generate a single file using |
Agreed. |
/assign |
Mark this as closed, solved by #1541. |
Similar to helm and other k8s tools, we should be able to have the option to output to one file, rather than multiple files.
Or maybe we should make it the default that everything is outputted to one file? What do people think?
The text was updated successfully, but these errors were encountered: