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 hostIP to merge key for containers and ephemeralContainer ports #118536

Closed
wants to merge 2 commits into from

Conversation

jpbetz
Copy link
Contributor

@jpbetz jpbetz commented Jun 7, 2023

What type of PR is this?

Add hostIP to merge keys for server side apply operations involving container or ephemeralContainer ports to align merge keys with validation.

/kind bug

Special notes for your reviewer:

Field validation old merge keys new merge keys
Container.Ports name (if present) & {hostPort, protocol, hostIP} containerPort, protocol hostPort, protocol, hostIP
EphemeralContainerCommon.Ports name (if present) & {hostPort, protocol, hostIP} containerPort, protocol hostPort, protocol, hostIP
ServiceSpec.Ports name (name is required if multiple ports exist) port, protocol name

InitContainers already has hostIP correctly included in the set of merge keys and does not need to be updated.

The re-keying of a type requires special review for all the possible skew cases.

Does this PR introduce a user-facing change?

Fix handling of server side apply operations involving container or ephemeralContainer ports with identical port number and protocol to succeed so long as hostIP differs.

/sig api-machinery

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jun 7, 2023
@jpbetz
Copy link
Contributor Author

jpbetz commented Jun 7, 2023

/hold
Until we have confidence that the skew cases will exhibit sane behavior.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 7, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jpbetz
Once this PR has been reviewed and has the lgtm label, please assign liggitt for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@k8s-ci-robot k8s-ci-robot added the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label Jun 7, 2023
@jpbetz jpbetz changed the title Add hostIP to merge key for containers and ephemeralContainer Add hostIP to merge key for containers and ephemeralContainer ports Jun 7, 2023
@jpbetz
Copy link
Contributor Author

jpbetz commented Jun 7, 2023

@apelisse Do we have tests or any other form of evidence that adding an optional field to an existing set of merge keys is safe? I've been starting to reason about it and am not 100% convinced it is safe.

@k8s-ci-robot
Copy link
Contributor

@jpbetz: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-integration a6fc5c2 link true /test pull-kubernetes-integration
pull-kubernetes-e2e-kind-ipv6 a6fc5c2 link true /test pull-kubernetes-e2e-kind-ipv6
pull-kubernetes-e2e-kind a6fc5c2 link true /test pull-kubernetes-e2e-kind
pull-kubernetes-e2e-gce a6fc5c2 link true /test pull-kubernetes-e2e-gce

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@jpbetz
Copy link
Contributor Author

jpbetz commented Jun 7, 2023

This won't work because the {hostPort, protocol, hostIP} fields are only checked for uniqueness if hostIP is set.

@jpbetz jpbetz closed this Jun 7, 2023
@alexzielenski
Copy link
Contributor

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/code-generation cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/bug Categorizes issue or PR as related to a bug. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants