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

Add missing reserved annotation support to play #19208

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

jakecorrenti
Copy link
Member

@jakecorrenti jakecorrenti commented Jul 12, 2023

Adds any required "wiring" to ensure the reserved annotations are supported by podman kube play.

Addtionally fixes a bug where, when inspected, containers created using the --publish-all flag had a field .HostConfig.PublishAllPorts whose value was only evaluated as false.

Associated with: #19102
Adding reserved annotations with kube generate: #19211

Does this PR introduce a user-facing change?

Adds support to `podman kube play` for the use of reserved annotations in the generated YAML. Fixes a bug where `.HostConfig.PublishAllPorts` always evaluates to `false` when inspecting a container created with `--publish-all`

@github-actions github-actions bot added the kind/api-change Change to remote API; merits scrutiny label Jul 12, 2023
@rhatdan
Copy link
Member

rhatdan commented Jul 12, 2023

Can you splt these into two pull requests?

@jakecorrenti
Copy link
Member Author

Sure thing

@jakecorrenti
Copy link
Member Author

jakecorrenti commented Jul 12, 2023

generate changes can be found here: #19211

@github-actions github-actions bot removed the kind/api-change Change to remote API; merits scrutiny label Jul 12, 2023
@jakecorrenti jakecorrenti changed the title Add --add-reserved flag to generate and play Add missing reserved annotation support to play Jul 12, 2023
@jakecorrenti jakecorrenti force-pushed the add-reserved-flag branch 2 times, most recently from b151915 to fb62299 Compare July 17, 2023 12:56
@rhatdan
Copy link
Member

rhatdan commented Jul 17, 2023

Should be --podman-only here?

@jakecorrenti
Copy link
Member Author

Yep, forgot to update the PR comment. The code should be --podman-only

@rhatdan
Copy link
Member

rhatdan commented Jul 17, 2023

Actually I am now thinking this should be automatic. No option needed or at least set --podman-only to true by default. If I have a json file that has advanced annotations, we should not make users figure out to use a special flag.

@jakecorrenti
Copy link
Member Author

It is automatic. I didn't add any flags to kube play. This attempts to add the underlying support for annotations that are generated with the podman kube generate --podman-only command

@rhatdan
Copy link
Member

rhatdan commented Jul 17, 2023

LGTM
@containers/podman-maintainers PTAL

Copy link
Member

@edsantiago edsantiago left a comment

Choose a reason for hiding this comment

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

Suggestions for more reliable tests

test/e2e/play_kube_test.go Outdated Show resolved Hide resolved
test/e2e/play_kube_test.go Show resolved Hide resolved
test/e2e/play_kube_test.go Outdated Show resolved Hide resolved
Adds any required "wiring" to ensure the reserved annotations are supported by
`podman kube play`.

Addtionally fixes a bug where, when inspected, containers created using
the `--publish-all` flag had a field `.HostConfig.PublishAllPorts` whose
value was only evaluated as `false`.

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Copy link
Member

@edsantiago edsantiago left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 18, 2023
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 18, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 18, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: edsantiago, jakecorrenti, Luap99

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Luap99
Copy link
Member

Luap99 commented Jul 18, 2023

force merging so you don't have to rebase

@Luap99 Luap99 merged commit 34a2a48 into containers:main Jul 18, 2023
84 of 87 checks passed
@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 Oct 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants