Skip to content
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

Allow providing custom in_pod argument as a global compose file variable #964

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

mokibit
Copy link
Contributor

@mokibit mokibit commented Jun 14, 2024

Default command line argument in_pod was set to True, but this breaks the compose file for users who want to use --userns argument.
This PR sets default in_pod value to None, and later resolves whether to create a pod by checking compose file, as new argument in compose file x-podman is now available (documentation is updated and tests added).
Now it is convenient for users to pass custom in_pod value (True or False) as a compose file argument when command line value of in_pod is not provided.
This PR solves issues: #795, #935, #673, #695, #166.

@deliciouslytyped
Copy link

I forgot how any of this works but shouldn't this be a per-container setting?

@p12tic
Copy link
Collaborator

p12tic commented Jun 20, 2024

I forgot how any of this works but shouldn't this be a per-container setting?

Pod is grouping of containers. At least currently all services in compose file are put in a single pod if this is enabled. Is there use case when some containers are put in a pod and the rest aren't?

podman_compose.py Outdated Show resolved Hide resolved
@mokibit mokibit force-pushed the set-custom-in_pod-in-compose-file branch from d6e3316 to ba2beb2 Compare June 20, 2024 05:12
Default command line argument `in_pod` was set to True, but this breaks
the compose file for users who want to use `--userns` argument. This
commit sets default `in_pod` value to None, and later resolves whether
to create a pod by checking compose file, as new argument in compose
file x-podman is now available. Now it is convenient for users to pass
custom `in_pod` value (True or False) as a compose file argument when
command line value of `in_pod` is not provided.

Signed-off-by: Monika Kairaityte <[email protected]>
@mokibit mokibit force-pushed the set-custom-in_pod-in-compose-file branch from ba2beb2 to 360b85b Compare June 20, 2024 06:42
@p12tic p12tic merged commit 80b2aa6 into containers:main Jun 20, 2024
8 checks passed
@mokibit mokibit deleted the set-custom-in_pod-in-compose-file branch June 20, 2024 10:06
p12tic added a commit to wgnathanael/podman-compose that referenced this pull request Jun 22, 2024
…ompose-file

Allow providing custom in_pod argument as a global compose file variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants