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

Document Podman limitations #6653

Merged

Conversation

feloy
Copy link
Contributor

@feloy feloy commented Mar 10, 2023

What type of PR is this:

Document Podman limitations

Preview: https://deploy-preview-6653--odo-docusaurus-preview.netlify.app/docs/development/architecture/podman-support-limitations

/area documentation
What does this PR do / why we need it:

Which issue(s) this PR fixes:

Fixes #6592

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

@netlify
Copy link

netlify bot commented Mar 10, 2023

Deploy Preview for odo-docusaurus-preview ready!

Name Link
🔨 Latest commit c49150d
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/64180ae1bebc8300084125b3
😎 Deploy Preview https://deploy-preview-6653--odo-docusaurus-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@openshift-ci openshift-ci bot added the area/documentation Issues or PRs related to documentation or the 'odo.dev' website label Mar 10, 2023
@odo-robot
Copy link

odo-robot bot commented Mar 10, 2023

OpenShift Unauthenticated Tests on commit 9732f1a finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 10, 2023

NoCluster Tests on commit 9732f1a finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 10, 2023

Unit Tests on commit 9732f1a finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 10, 2023

Validate Tests on commit 9732f1a finished successfully.
View logs: TXT HTML

@@ -0,0 +1,27 @@
---
title: Podman limitations
Copy link
Member

Choose a reason for hiding this comment

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

This sounds like the document is describing limitation of the podman itself.

How about something like this:?

Suggested change
title: Podman limitations
title: Podman support limitations


The motivation behind the support for the Podman platform is to lower the learning curve
for developers working on containerized applications. As a matter of fact, Podman is simpler
to apprehend, install and maintain than a Kubernetes cluster.
Copy link
Member

Choose a reason for hiding this comment

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

It would be good to also mention that with Podman you have everything locally with much lower overhead (resources)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I'm adding it

@odo-robot
Copy link

odo-robot bot commented Mar 10, 2023

Windows Tests (OCP) on commit 9732f1a finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 10, 2023

Kubernetes Tests on commit 9732f1a finished with errors.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 10, 2023

OpenShift Tests on commit 9732f1a finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 10, 2023

Kubernetes Docs Tests on commit 9816c14 finished successfully.
View logs: TXT HTML

@feloy feloy requested review from rm3l and kadel March 10, 2023 16:46

This command without the `--platform` flag will delete components from both the cluster and Podman. You can use the `--platform` flag to limit the deletion from a specific platform, either `cluster` or `podman`.


Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe you can add a section here instead of directly starting with the limitations. Or convert the section "Commands working with Podman" to a normal list.


Podman is natively not able to forward ports bound to localhost. In this situation, you may have two solutions:
- you can change your application to listen on `0.0.0.0`. This will be necessary for the ports giving access to the application or, in Production, this port would not be available (this port will most probably be exposed through an Ingress or a Route in Production, and these methods need the port to be bound to `0.0.0.0`),
- you can keep the port bound to `localhost`. This is the best choice for the Debug port, to restrict access to this Debug port. In this case, you can use the flag `--forward-localhost` when running `odo dev` on Podman. This way, you keep the Debug port secure on cluster.
Copy link
Contributor

Choose a reason for hiding this comment

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

This part is not very clear to me.

Copy link
Member

Choose a reason for hiding this comment

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

I might have been biased when I read this as I worked on --forward-localhost, but just curious: what did you find not very clear?

Copy link
Contributor

Choose a reason for hiding this comment

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

This will be necessary for the ports giving access to the application or

This. Does it mean that this will be necessary to allow application access on the certain ports?

This is the best choice for the Debug port, to restrict access to this Debug port.

What does it mean to restrict access to this debug port?

Copy link
Member

@rm3l rm3l Mar 20, 2023

Choose a reason for hiding this comment

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

This will be necessary for the ports giving access to the application or

This. Does it mean that this will be necessary to allow application access on the certain ports?

It is more about reaching the port opened by the application from the outside. If you want the port to be reachable from outside of the container/pod, the application needs to bind the port to 0.0.0.0 (or more specifically to an interface that is connected to an outside network).

This is the best choice for the Debug port, to restrict access to this Debug port.

What does it mean to restrict access to this debug port?

Same point, about not making this port accessible from outside of the container/pod. It is generally recommended to restrict access to this Debug port by not exposing it. So here we are saying that --forward-localhost allows users to reach such ports on Podman while still keeping them unreachable on the cluster.

@feloy feloy requested review from rm3l and valaparthvi March 20, 2023 07:27
@sonarcloud
Copy link

sonarcloud bot commented Mar 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@rm3l rm3l left a comment

Choose a reason for hiding this comment

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

LGTM.

/hold

@kadel @valaparthvi Anything else to add to this PR?

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label Mar 20, 2023
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Mar 20, 2023
@rm3l
Copy link
Member

rm3l commented Mar 20, 2023

• [FAILED] [0.776 seconds]
odo delete command tests [BeforeEach]
/go/odo_1/tests/integration/cmd_delete_test.go:25
  when a component is bootstrapped
  /go/odo_1/tests/integration/cmd_delete_test.go:160
    when the component is deployed in DEV mode and dev mode stopped
    /go/odo_1/tests/integration/cmd_delete_test.go:228
      when the component is deleted using its name (and namespace) from another directory (running-in="")
      /go/odo_1/tests/integration/cmd_delete_test.go:255
        when odo delete command is run again with nothing deployed on the cluster
        /go/odo_1/tests/integration/cmd_delete_test.go:292
          should output that there are no resources to be deleted
          /go/odo_1/tests/integration/cmd_delete_test.go:299

  Begin Captured GinkgoWriter Output >>
    Created dir: /tmp/3770631462
    Created dir: /tmp/3142201452
    Setting KUBECONFIG=/tmp/3142201452/config
    Creating a new project: cmd-delete-test299ueb
    Running kubectl with args [kubectl create namespace cmd-delete-test299ueb] and odo env: []
    [kubectl] Error from server (AlreadyExists): namespaces "cmd-delete-test299ueb" already exists
    Deleting project: cmd-delete-test670jna
    Running kubectl with args [kubectl delete namespaces cmd-delete-test670jna --wait=false] and odo env: []
    [kubectl] Error from server (NotFound): namespaces "cmd-delete-test670jna" not found
  << End Captured GinkgoWriter Output

  No future change is possible.  Bailing out early - after 0.443s.
  Running kubectl with args [kubectl create namespace cmd-delete-test299ueb] and odo env: []
  Expected
      <int>: 1
  to match exit code:
      <int>: 0
  In [BeforeEach] at: /go/odo_1/tests/helper/helper_cmd_wrapper.go:101

  There were additional failures detected after the initial failure.  Here's a summary - for full details run Ginkgo in verbose mode:
    [FAILED] in [AfterEach] at /go/odo_1/tests/helper/helper_cmd_wrapper.go:101

This is not the first time I stumbled upon this issue with namespaces/projects. Something to keep an eye on..

Overriding it for now since this is only a doc PR.

/override Kubernetes-Integration-Tests/Kubernetes-Integration-Tests

@openshift-ci
Copy link

openshift-ci bot commented Mar 20, 2023

@rm3l: Overrode contexts on behalf of rm3l: Kubernetes-Integration-Tests/Kubernetes-Integration-Tests

In response to this:

• [FAILED] [0.776 seconds]
odo delete command tests [BeforeEach]
/go/odo_1/tests/integration/cmd_delete_test.go:25
 when a component is bootstrapped
 /go/odo_1/tests/integration/cmd_delete_test.go:160
   when the component is deployed in DEV mode and dev mode stopped
   /go/odo_1/tests/integration/cmd_delete_test.go:228
     when the component is deleted using its name (and namespace) from another directory (running-in="")
     /go/odo_1/tests/integration/cmd_delete_test.go:255
       when odo delete command is run again with nothing deployed on the cluster
       /go/odo_1/tests/integration/cmd_delete_test.go:292
         should output that there are no resources to be deleted
         /go/odo_1/tests/integration/cmd_delete_test.go:299

 Begin Captured GinkgoWriter Output >>
   Created dir: /tmp/3770631462
   Created dir: /tmp/3142201452
   Setting KUBECONFIG=/tmp/3142201452/config
   Creating a new project: cmd-delete-test299ueb
   Running kubectl with args [kubectl create namespace cmd-delete-test299ueb] and odo env: []
   [kubectl] Error from server (AlreadyExists): namespaces "cmd-delete-test299ueb" already exists
   Deleting project: cmd-delete-test670jna
   Running kubectl with args [kubectl delete namespaces cmd-delete-test670jna --wait=false] and odo env: []
   [kubectl] Error from server (NotFound): namespaces "cmd-delete-test670jna" not found
 << End Captured GinkgoWriter Output

 No future change is possible.  Bailing out early - after 0.443s.
 Running kubectl with args [kubectl create namespace cmd-delete-test299ueb] and odo env: []
 Expected
     <int>: 1
 to match exit code:
     <int>: 0
 In [BeforeEach] at: /go/odo_1/tests/helper/helper_cmd_wrapper.go:101

 There were additional failures detected after the initial failure.  Here's a summary - for full details run Ginkgo in verbose mode:
   [FAILED] in [AfterEach] at /go/odo_1/tests/helper/helper_cmd_wrapper.go:101

This is not the first time I stumbled upon this issue with existing namespaces/projects. Something to keep an eye on..

Overriding it for now since this is only a doc PR.

/override Kubernetes-Integration-Tests/Kubernetes-Integration-Tests

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@valaparthvi
Copy link
Contributor

LGTM.

/hold

@kadel @valaparthvi Anything else to add to this PR?

I am fine with merging this PR. Thank you for documenting this, Philippe.

@rm3l
Copy link
Member

rm3l commented Mar 21, 2023

I am fine with merging this PR. Thank you for documenting this, Philippe.

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label Mar 21, 2023
@openshift-merge-robot openshift-merge-robot merged commit f543afa into redhat-developer:main Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Issues or PRs related to documentation or the 'odo.dev' website lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move podman out of Experimental Mode
5 participants