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

Feature: Static IP with "podman play kube --network=<network> --ip=<IP>" #8442

Closed
hoonetorg opened this issue Nov 21, 2020 · 15 comments · Fixed by #10043
Closed

Feature: Static IP with "podman play kube --network=<network> --ip=<IP>" #8442

hoonetorg opened this issue Nov 21, 2020 · 15 comments · Fixed by #10043
Assignees
Labels
Good First Issue This issue would be a good issue for a first time contributor to undertake. In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@hoonetorg
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind feature

Description

It would be useful if podman play kube would support using static IP for the generated pod.
The usecase for me is a dhcphelper pod which uses the host network wants to talk to a app pod, which has dnsmasq running in it. Forwarding DHCP requests from dhcphelper pod to app pod with dnsmasq container is easy by using a static IP.

Steps to reproduce the issue:

  1. podman play kube app.yaml --network=app --ip=192.168.2.253

Describe the results you received:

Error: unknown flag: --ip

Describe the results you expected:

Pod:
553d4b...
Containers:
xda643...
381d9f...
y1c49f...
43459c...

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

podman version
Version:      2.1.1
API Version:  2.0.0
Go Version:   go1.14
Built:        Thu Jan  1 01:00:00 1970
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.16.1
  cgroupManager: systemd
  cgroupVersion: v1
  conmon:
    package: 'conmon: /usr/libexec/podman/conmon'
    path: /usr/libexec/podman/conmon
    version: 'conmon version 2.0.20, commit: '
  cpus: 2
  distribution:
    distribution: debian
    version: "10"
  eventLogger: journald
  hostname: youdontneedtoknow
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 4.19.0-12-amd64
  linkmode: dynamic
  memFree: 877731840
  memTotal: 4138450944
  ociRuntime:
    name: runc
    package: 'runc: /usr/sbin/runc'
    path: /usr/sbin/runc
    version: |-
      runc version 1.0.0~rc6+dfsg1
      commit: 1.0.0~rc6+dfsg1-3
      spec: 1.0.1
  os: linux
  remoteSocket:
    path: /run/podman/podman.sock
  rootless: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 0
  swapTotal: 0
  uptime: 188h 3m 58.18s (Approximately 7.83 days)
registries:
  search:
  - docker.io
  - quay.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 7
    paused: 0
    running: 7
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /var/lib/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 258
  runRoot: /var/run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 2.0.0
  Built: 0
  BuiltTime: Thu Jan  1 01:00:00 1970
  GitCommit: ""
  GoVersion: go1.14
  OsArch: linux/amd64
  Version: 2.1.1

Package info (e.g. output of rpm -q podman or apt list podman):

podman/unknown,now 2.1.1~2 amd64 [installed]

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

virtual

@openshift-ci-robot openshift-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 21, 2020
@rhatdan
Copy link
Member

rhatdan commented Nov 23, 2020

Interested in opening a PR to add this functionality?

@hoonetorg
Copy link
Author

@rhatdan: Oh i think my knowledge about go and the code is not good enough for it :)

@rhatdan
Copy link
Member

rhatdan commented Nov 23, 2020

Ok no problem, I just thought I would ask.

@rhatdan rhatdan added the Good First Issue This issue would be a good issue for a first time contributor to undertake. label Nov 23, 2020
@mier85
Copy link

mier85 commented Dec 6, 2020

@rhatdan i would like to take this as my "first issue"

@rhatdan rhatdan added the In Progress This issue is actively being worked by the assignee, please do not work on this at this time. label Dec 7, 2020
@rhatdan
Copy link
Member

rhatdan commented Dec 7, 2020

Thanks @mier85, you got it.

@github-actions
Copy link

github-actions bot commented Jan 7, 2021

A friendly reminder that this issue had no activity for 30 days.

@mier85
Copy link

mier85 commented Jan 7, 2021

@hoonetorg as you requested this feature, there is some question about it here: #8617 (comment)

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Feb 11, 2021

@mier85 What is the scoop on this one?

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Mar 15, 2021

@umohnani8 PTAL

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Apr 15, 2021

@Luap99 any chance you could look at this?

@Luap99
Copy link
Member

Luap99 commented Apr 15, 2021

Sure

@Luap99
Copy link
Member

Luap99 commented Apr 15, 2021

PR #10043

Luap99 pushed a commit to Luap99/libpod that referenced this issue Apr 16, 2021
Add a new --ip flag to podman play kube. This is used to specify a
static IP address which should be used for the pod. This option can be
specified several times because play kube can create more than one pod.

Fixes containers#8442

Signed-off-by: Paul Holzinger <[email protected]>
jmguzik pushed a commit to jmguzik/podman that referenced this issue Apr 26, 2021
Add a new --ip flag to podman play kube. This is used to specify a
static IP address which should be used for the pod. This option can be
specified several times because play kube can create more than one pod.

Fixes containers#8442

Signed-off-by: Paul Holzinger <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Good First Issue This issue would be a good issue for a first time contributor to undertake. In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants