Skip to content

Commit

Permalink
Support KubevirtIpamController plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Or Shoval <[email protected]>
  • Loading branch information
oshoval committed Jun 16, 2024
1 parent 0634b4f commit 1cdab3e
Show file tree
Hide file tree
Showing 17 changed files with 7,141 additions and 52 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ gen-manifests: manifest-templator
MACVTAP_CNI_IMAGE=$(MACVTAP_CNI_IMAGE) \
MULTUS_DYNAMIC_NETWORKS_CONTROLLER_IMAGE=$(MULTUS_DYNAMIC_NETWORKS_CONTROLLER_IMAGE) \
KUBE_SECONDARY_DNS_IMAGE=$(KUBE_SECONDARY_DNS_IMAGE) \
KUBEVIRT_IPAM_CONTROLLER_IMAGE=$(KUBEVIRT_IPAM_CONTROLLER_IMAGE) \
CORE_DNS_IMAGE=$(CORE_DNS_IMAGE) \
KUBE_RBAC_PROXY_IMAGE=$(KUBE_RBAC_PROXY_IMAGE) \
./hack/generate-manifests.sh
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ spec:
ovs: {}
macvtap: {}
kubeSecondaryDNS: {}
kubevirtIpamController: {}
imagePullPolicy: Always
```
Expand Down Expand Up @@ -180,6 +181,25 @@ Additionally, container image used to deliver this plugin can be set using
`KUBE_SECONDARY_DNS_IMAGE` environment variable in operator
deployment manifest.

## kubevirtIpamController

[This controller](https://github.com/maiqueb/kubevirt-ipam-claims)
allows to support IPAM for secondary networks.

```yaml
apiVersion: networkaddonsoperator.network.kubevirt.io/v1
kind: NetworkAddonsConfig
metadata:
name: cluster
spec:
multus: {}
kubevirtIpamController: {}
```

Additionally, container image used to deliver this plugin can be set using
`KUBEVIRT_IPAM_CONTROLLER_IMAGE` environment variable in operator
deployment manifest.

## Image Pull Policy

Administrator can specify [image pull policy](https://kubernetes.io/docs/concepts/containers/images/)
Expand Down
1 change: 1 addition & 0 deletions automation/components-functests.setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ spec:
ovs: {}
macvtap: {}
kubeSecondaryDNS: {}
kubevirtIpamController: {}
imagePullPolicy: Always
EOF

Expand Down
6 changes: 6 additions & 0 deletions components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ components:
branch: main
update-policy: tagged
metadata: v0.43.0
kubevirt-ipam-controller:
url: https://github.com/maiqueb/kubevirt-ipam-claims
commit: 81c445c0d7c6841329ac66bba41097733370e0d2
branch: main
update-policy: tagged
metadata: v0.1.0-alpha
linux-bridge:
url: https://github.com/containernetworking/plugins
commit: 14bdce598f9d332303c375c35719c4a158f1e7db
Expand Down
63 changes: 63 additions & 0 deletions data/kubevirt-ipam-controller/000-crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
name: ipamclaims.k8s.cni.cncf.io
spec:
group: k8s.cni.cncf.io
names:
kind: IPAMClaim
listKind: IPAMClaimList
plural: ipamclaims
singular: ipamclaim
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: IPAMClaim is the Schema for the IPAMClaim API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
interface:
description: The pod interface name for which this allocation was
created
type: string
network:
description: The network name for which this persistent allocation
was created
type: string
required:
- interface
- network
type: object
status:
properties:
ips:
description: The list of IP addresses (v4, v6) that were allocated
for the pod interface
items:
type: string
type: array
required:
- ips
type: object
type: object
served: true
storage: true
subresources:
status: {}
Loading

0 comments on commit 1cdab3e

Please sign in to comment.