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

DNM | WIP: PoC of sticky IPs for Kubernetes entities #377

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maiqueb
Copy link
Collaborator

@maiqueb maiqueb commented Aug 14, 2023

What this PR does / why we need it:
This is a proof of concept of implementing sticky IP allocations for whereabouts.

Any interested party can use whereabouts to have persistent IP allocations across their workload lifecycle - e.g. KubeVirt VMs.

You indicate this whereabouts build you want to have persistent IPs for a certain allocation by specifying which enitity owns the allocation - in our case, the allocations are asked for a KubeVirt VM. Thus, the pod must be templated w/ the required CNI args:

kubectl get pods virt-launcher-vm-rhel8-7fmb7 -ojsonpath="{ @.metadata.annotations.k8s\.v1\.cni\.cncf\.io\/networks }" | jq
[
  {
    "name": "whereabouts-conf",
    "namespace": "default",
    "interface": "pod16367aacb67",
    "cni-args": {
      "whereabouts.cni.cncf.io/ownerID": "8d9d6b85-49e1-4722-9b42-3348d8e9b9f6",
      "whereabouts.cni.cncf.io/ownerName": "vm-rhel8",
      "whereabouts.cni.cncf.io/ownerType": "VirtualMachine",
      "whereabouts.cni.cncf.io/ownerVersion": "kubevirt.io/v1"
    }
  }
]

We are using the OverlappingRangeIPReservation to block the IP allocations (it is its purpose at the end of the day ...) but the "real" proposal will probably add a new CRD for the same function.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer (optional):

@maiqueb maiqueb added the enhancement New feature or request label Aug 14, 2023
@maiqueb maiqueb requested a review from dougbtv as a code owner August 14, 2023 11:44
@maiqueb
Copy link
Collaborator Author

maiqueb commented Aug 14, 2023

/cc @oshoval @qinqon

Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant