Skip to content

Commit 0113557

Browse files
committed
fix(charts): sync CRD bundle and operator RBAC with implemented controllers
1 parent 542e28e commit 0113557

10 files changed

Lines changed: 981 additions & 1 deletion

File tree

charts/imp-crds/templates/clusterimpnodeprofiles.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,34 @@ spec:
6262
Range: 0.0–1.0.
6363
pattern: ^(0(\.[0-9]+)?|1(\.0+)?)$
6464
type: string
65+
cpuModel:
66+
description: |-
67+
CPUModel is the CPU model string detected by the node agent at startup
68+
(e.g. "Intel(R) Core(TM) i5-8500T CPU @ 2.10GHz").
69+
Used by the migration scheduler to filter CPU-compatible destination nodes.
70+
Set automatically by the node agent; do not edit manually.
71+
type: string
6572
maxImpVMs:
6673
description: |-
6774
MaxImpVMs is a hard cap on the number of ImpVMs allowed on this node,
6875
regardless of remaining compute headroom.
6976
format: int32
7077
minimum: 0
7178
type: integer
79+
memoryMiB:
80+
description: |-
81+
MemoryMiB is the total memory in MiB available for VMs on this node.
82+
When non-zero, takes precedence over fraction-based scheduling.
83+
format: int64
84+
minimum: 0
85+
type: integer
86+
vcpuCapacity:
87+
description: |-
88+
VCPUCapacity is the total number of vCPUs available for VMs on this node.
89+
When non-zero, takes precedence over fraction-based scheduling.
90+
format: int32
91+
minimum: 0
92+
type: integer
7293
type: object
7394
type: object
7495
served: true

charts/imp-crds/templates/impnetworks.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,68 @@ spec:
8080
Gateway is the default gateway IP for VMs on this network.
8181
Defaults to the first usable host address in Subnet if unset.
8282
type: string
83+
groups:
84+
description: |-
85+
Groups defines named VM groups that share subnets within this network.
86+
VMs not in any group receive an isolated /30 CIDR.
87+
items:
88+
description: NetworkGroupSpec defines a named group of VMs sharing
89+
a subnet within an ImpNetwork.
90+
properties:
91+
connectivity:
92+
default: subnet
93+
description: |-
94+
Connectivity controls L2/L3 adjacency between group members.
95+
"subnet" places all members on the same subnet (default).
96+
"policy-only" uses group identity for policy without L2 adjacency.
97+
enum:
98+
- subnet
99+
- policy-only
100+
type: string
101+
expectedSize:
102+
default: 14
103+
description: |-
104+
ExpectedSize is a hint for CIDR sizing.
105+
The controller rounds up to the next power-of-2 subnet.
106+
Isolated VMs (no group) always receive a /30.
107+
Default: 14 → /28.
108+
format: int32
109+
type: integer
110+
name:
111+
description: Name identifies this group. ImpVMs reference this
112+
name via spec.networkGroup.
113+
type: string
114+
required:
115+
- name
116+
type: object
117+
type: array
118+
ipam:
119+
description: |-
120+
IPAM configures the IP address management backend for this network.
121+
Defaults to "internal" (Imp's built-in allocator).
122+
properties:
123+
cilium:
124+
description: Cilium configures Cilium IPAM. Required when Provider
125+
is "cilium".
126+
properties:
127+
poolRef:
128+
description: PoolRef is the name of the CiliumPodIPPool resource
129+
to allocate from.
130+
type: string
131+
required:
132+
- poolRef
133+
type: object
134+
provider:
135+
default: internal
136+
description: |-
137+
Provider selects the IPAM backend.
138+
"internal" uses Imp's built-in allocator.
139+
"cilium" delegates to a CiliumPodIPPool.
140+
enum:
141+
- internal
142+
- cilium
143+
type: string
144+
type: object
83145
nat:
84146
description: NAT configures masquerade/SNAT for outbound VM traffic.
85147
properties:
@@ -170,6 +232,32 @@ spec:
170232
x-kubernetes-list-map-keys:
171233
- type
172234
x-kubernetes-list-type: map
235+
vtepTable:
236+
description: |-
237+
VTEPTable contains VTEP entries for cross-node VXLAN FDB population.
238+
Each entry maps a VM's IP and MAC to the node IP hosting it.
239+
items:
240+
description: |-
241+
VTEPEntry maps a VM's IP and MAC to the node IP that hosts it.
242+
Used by the VXLAN FDB to route cross-node VM traffic.
243+
properties:
244+
nodeIP:
245+
description: NodeIP is the IP address of the node hosting the
246+
VM.
247+
type: string
248+
vmIP:
249+
description: VMIP is the IP address of the VM.
250+
type: string
251+
vmMAC:
252+
description: VMMAC is the MAC address of the VM's TAP interface.
253+
type: string
254+
required:
255+
- nodeIP
256+
- vmIP
257+
- vmMAC
258+
type: object
259+
type: array
260+
x-kubernetes-list-type: atomic
173261
type: object
174262
type: object
175263
served: true

charts/imp-crds/templates/impvmclasses.yaml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ spec:
7474
format: int32
7575
minimum: 1
7676
type: integer
77+
guestAgent:
78+
description: GuestAgent controls guest agent injection. Overrides
79+
defaults when set.
80+
properties:
81+
enabled:
82+
description: Enabled controls guest agent injection. Defaults
83+
to true when omitted.
84+
type: boolean
85+
type: object
7786
memoryMiB:
7887
description: MemoryMiB is the amount of RAM in mebibytes.
7988
format: int32
@@ -247,6 +256,58 @@ spec:
247256
type: integer
248257
type: object
249258
type: object
259+
restartPolicy:
260+
description: RestartPolicy configures automatic restart for persistent
261+
VMs using this class.
262+
properties:
263+
backoff:
264+
description: Backoff configures exponential backoff between restart
265+
attempts.
266+
properties:
267+
initialDelay:
268+
default: 10s
269+
description: InitialDelay is the delay before the first restart
270+
attempt.
271+
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|ms|s|m|h))+$
272+
type: string
273+
maxDelay:
274+
default: 5m
275+
description: MaxDelay caps the exponential backoff.
276+
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|ms|s|m|h))+$
277+
type: string
278+
maxRetries:
279+
default: 5
280+
description: MaxRetries is the maximum number of restart attempts
281+
before OnExhaustion applies.
282+
format: int32
283+
type: integer
284+
type: object
285+
coolDownPeriod:
286+
default: 1h
287+
description: |-
288+
CoolDownPeriod is the duration before the retry counter resets automatically.
289+
Only used when OnExhaustion is "cool-down".
290+
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|ms|s|m|h))+$
291+
type: string
292+
mode:
293+
default: in-place
294+
description: |-
295+
Mode controls where the VM restarts after failure.
296+
"in-place" restarts on the same node. "reschedule" re-runs the scheduler.
297+
enum:
298+
- in-place
299+
- reschedule
300+
type: string
301+
onExhaustion:
302+
default: fail
303+
description: OnExhaustion controls behaviour once Backoff.MaxRetries
304+
is exhausted.
305+
enum:
306+
- fail
307+
- manual-reset
308+
- cool-down
309+
type: string
310+
type: object
250311
vcpu:
251312
description: VCPU is the number of virtual CPUs allocated to each
252313
VM.
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
"helm.sh/resource-policy": keep
7+
controller-gen.kubebuilder.io/version: v0.20.1
8+
name: impvmmigrations.imp.dev
9+
spec:
10+
group: imp.dev
11+
names:
12+
categories:
13+
- imp
14+
kind: ImpVMMigration
15+
listKind: ImpVMMigrationList
16+
plural: impvmmigrations
17+
shortNames:
18+
- impmig
19+
singular: impvmmigration
20+
scope: Namespaced
21+
versions:
22+
- additionalPrinterColumns:
23+
- jsonPath: .spec.sourceVMName
24+
name: Source
25+
type: string
26+
- jsonPath: .spec.targetNode
27+
name: Target
28+
type: string
29+
- jsonPath: .status.phase
30+
name: Phase
31+
type: string
32+
- jsonPath: .metadata.creationTimestamp
33+
name: Age
34+
type: date
35+
name: v1alpha1
36+
schema:
37+
openAPIV3Schema:
38+
description: |-
39+
ImpVMMigration moves a running ImpVM to another node via Firecracker snapshot/restore.
40+
The destination node must have a compatible CPU model.
41+
properties:
42+
apiVersion:
43+
description: |-
44+
APIVersion defines the versioned schema of this representation of an object.
45+
Servers should convert recognized schemas to the latest internal value, and
46+
may reject unrecognized values.
47+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
48+
type: string
49+
kind:
50+
description: |-
51+
Kind is a string value representing the REST resource this object represents.
52+
Servers may infer this from the endpoint the client submits requests to.
53+
Cannot be updated.
54+
In CamelCase.
55+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
56+
type: string
57+
metadata:
58+
type: object
59+
spec:
60+
description: ImpVMMigrationSpec defines a migration request.
61+
properties:
62+
sourceVMName:
63+
description: SourceVMName is the name of the ImpVM to migrate.
64+
type: string
65+
sourceVMNamespace:
66+
description: SourceVMNamespace is the namespace of the source ImpVM.
67+
type: string
68+
targetNode:
69+
description: |-
70+
TargetNode optionally pins the destination node.
71+
If empty, the controller picks the best-fit CPU-compatible node.
72+
type: string
73+
required:
74+
- sourceVMName
75+
- sourceVMNamespace
76+
type: object
77+
status:
78+
description: ImpVMMigrationStatus reflects the observed migration state.
79+
properties:
80+
completedAt:
81+
description: CompletedAt is the time migration completed or failed.
82+
format: date-time
83+
type: string
84+
conditions:
85+
description: Conditions follow the standard k8s condition convention.
86+
items:
87+
description: Condition contains details for one aspect of the current
88+
state of this API Resource.
89+
properties:
90+
lastTransitionTime:
91+
description: |-
92+
lastTransitionTime is the last time the condition transitioned from one status to another.
93+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
94+
format: date-time
95+
type: string
96+
message:
97+
description: |-
98+
message is a human readable message indicating details about the transition.
99+
This may be an empty string.
100+
maxLength: 32768
101+
type: string
102+
observedGeneration:
103+
description: |-
104+
observedGeneration represents the .metadata.generation that the condition was set based upon.
105+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
106+
with respect to the current state of the instance.
107+
format: int64
108+
minimum: 0
109+
type: integer
110+
reason:
111+
description: |-
112+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
113+
Producers of specific condition types may define expected values and meanings for this field,
114+
and whether the values are considered a guaranteed API.
115+
The value should be a CamelCase string.
116+
This field may not be empty.
117+
maxLength: 1024
118+
minLength: 1
119+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
120+
type: string
121+
status:
122+
description: status of the condition, one of True, False, Unknown.
123+
enum:
124+
- "True"
125+
- "False"
126+
- Unknown
127+
type: string
128+
type:
129+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
130+
maxLength: 316
131+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
132+
type: string
133+
required:
134+
- lastTransitionTime
135+
- message
136+
- reason
137+
- status
138+
- type
139+
type: object
140+
type: array
141+
x-kubernetes-list-map-keys:
142+
- type
143+
x-kubernetes-list-type: map
144+
message:
145+
description: Message is a human-readable description of the current
146+
state.
147+
type: string
148+
phase:
149+
description: Phase is the current migration phase (Pending, Running,
150+
Succeeded, Failed).
151+
type: string
152+
selectedNode:
153+
description: SelectedNode is the node chosen by the scheduler (when
154+
TargetNode was empty).
155+
type: string
156+
snapshotRef:
157+
description: SnapshotRef names the child ImpVMSnapshot created for
158+
this migration.
159+
type: string
160+
targetVMName:
161+
description: TargetVMName is the name of the ImpVM created on the
162+
target node.
163+
type: string
164+
type: object
165+
type: object
166+
served: true
167+
storage: true
168+
subresources:
169+
status: {}

0 commit comments

Comments
 (0)