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

Make it possible to use pod's network #725

Merged
merged 1 commit into from
Mar 1, 2021
Merged

Conversation

seriv
Copy link
Contributor

@seriv seriv commented Feb 24, 2021

To use pod's network in a container, it shuld have --pod argument
and should not have --net.
The latter was always being added to the docker run command, if
not provided to the class as a parameter, then defaults to 'bridge'.
If empty or empty arrar - added as '' which also breaks networking
for the container in the pod.

With this fix, if a network is not defined, the whole argument will
be omitted in the docker run / docker create flags. This is the
same as providing previous default 'bridge' if container is created
or started without '--pod', and is not breaking compatibility with
podman create/run command without explicit '--net' argument.

To use pod's network in a container, it shuld have --pod argument
and should not have --net.
The latter was always being added to the docker run command, if
not provided to the class as a parameter, then defaults to 'bridge'.
If empty or empty arrar - added as '' which also breaks networking
for the container in the pod.

With this fix, if a network is not defined, the whole argument will
be omitted in the docker run / docker create flags. This is the
same as providing previous default 'bridge' if container is created
or started without '--pod', and is not breaking compatibility with
podman create/run command without explicit '--net' argument.
@seriv seriv requested a review from a team as a code owner February 24, 2021 22:28
@CLAassistant
Copy link

CLAassistant commented Feb 24, 2021

CLA assistant check
All committers have signed the CLA.

@puppet-community-rangefinder
Copy link

docker_run_flags is a function

Breaking changes to this file WILL impact these 1 modules (exact match):
Breaking changes to this file MAY impact these 6 modules (near match):

docker::run is a type

Breaking changes to this file WILL impact these 6 modules (exact match):
Breaking changes to this file MAY impact these 21 modules (near match):

This module is declared in 6 of 576 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

Copy link
Contributor

@adrianiurca adrianiurca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @seriv, thank you for your contribution.

kind regards,
@adrianiurca

@adrianiurca adrianiurca merged commit 9abbe30 into puppetlabs:main Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants