Skip to content

Commit ecd20bc

Browse files
committed
chore(release): v0.0.12
1 parent fa5be46 commit ecd20bc

17 files changed

Lines changed: 286 additions & 650 deletions

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# To re-generate a bundle for another specific version without changing the standard setup, you can:
44
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.3)
55
# - use environment variables to overwrite this value (e.g export VERSION=0.0.3)
6-
VERSION ?= 0.0.11
6+
VERSION ?= 0.0.12
77

88
# CHANNELS define the bundle channels used in the bundle.
99
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")

README.md

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Assisted Installer `Agent` objects can appear.
1818
needed.
1919
- Optionally approves matching Assisted Installer `Agent` objects.
2020
- Deletes only owned VMs and stale unbound Agents when scale-down is allowed.
21-
- Supports dry-run mode, status conditions, planned actions, and Kubernetes
22-
Events for operational visibility.
21+
- Reports status conditions, planned actions, and Kubernetes Events for
22+
operational visibility.
2323

2424
## Current Scope
2525

@@ -49,7 +49,7 @@ flowchart TD
4949
reconcile --> fresh["Read latest VsphereAgentPool\nthrough uncached API reader"]
5050
fresh --> discover["Resolve inputs\nAgentMachines, Machines, InfraEnv, matching Agents, owned/adopted VMs"]
5151
discover --> refresh["Refresh ownedVMs status\nProvisioning, Available, Bound, Released"]
52-
refresh --> plan["Build plan\nAgentMachine count, waiting demand, buffer, available Agents, provisioning VMs"]
52+
refresh --> plan["Build plan\nAgentMachine count, waiting demand, available Agents, provisioning VMs"]
5353
5454
plan -->|deficit| iso["Ensure content-addressed ISO cache\nDownload, hash, upload if changed"]
5555
iso --> create["Create vSphere VM\nfolder, datastore cluster, network, CPU, memory, disk, ISO"]
@@ -73,7 +73,7 @@ flowchart TD
7373
7474
plan -->|surplus available owned Agent| surplus{"Any AgentMachine\nstill without an Agent?"}
7575
surplus -->|yes| wait
76-
surplus -->|no| deletefree["Delete extra unbound VM and Agent\nrespect bufferAgents"]
76+
surplus -->|no| deletefree["Delete extra unbound VM and Agent"]
7777
deletefree --> agents
7878
7979
plan -->|no changes| noop["Noop\nstatus and conditions only"]
@@ -91,15 +91,16 @@ At the beginning of each reconcile, the controller reads the
9191
based on the latest recorded `ownedVMs` status instead of stale informer state.
9292

9393
Scale-up is demand driven. The controller counts `AgentMachine` objects for the
94-
NodePool that report `Ready=False` with `Reason=NoSuitableAgents`, adds
95-
`spec.scaling.bufferAgents`, subtracts available matching Agents and
96-
already-provisioning owned VMs, then creates at most
97-
`spec.scaling.maxProvisioning` VMs per reconcile. Each VM boots the active
98-
InfraEnv ISO. The controller records the vSphere BIOS UUID, instance UUID, and
99-
primary MAC address immediately after VM creation. When the Agent appears, it is
100-
matched to the owned VM by BIOS UUID or MAC before any hostname fallback. The
101-
controller then applies the configured labels, role, approval, and VM-name
102-
hostname so the Agent CAPI provider can bind it to a Machine.
94+
NodePool that report `Ready=False` with `Reason=NoSuitableAgents`, subtracts
95+
available matching Agents and already-provisioning owned VMs, and records the
96+
remaining demand in status. The AgentMachine controller creates a
97+
`VsphereAgent` for each waiting AgentMachine; each `VsphereAgent` then creates a
98+
vSphere VM that boots the active InfraEnv ISO. The controller records the
99+
vSphere BIOS UUID, instance UUID, and primary MAC address immediately after VM
100+
creation. When the Agent appears, it is matched to the owned VM by BIOS UUID or
101+
MAC before any hostname fallback. The controller then applies the configured
102+
labels, role, approval, and VM-name hostname so the Agent CAPI provider can bind
103+
it to a Machine.
103104

104105
Existing clusters are adopted through Agents. If a matching Agent already
105106
exists, the controller records it in `status.ownedVMs` using the Agent hostname,
@@ -123,15 +124,15 @@ stale Agent can still be removed.
123124
Install the latest release manifests:
124125

125126
```sh
126-
kubectl apply -f https://github.com/containeroo/agent-forge-operator/releases/download/v0.0.11/crds.yaml
127-
kubectl apply -k github.com/containeroo/agent-forge-operator//config/default?ref=v0.0.11
127+
kubectl apply -f https://github.com/containeroo/agent-forge-operator/releases/download/v0.0.12/crds.yaml
128+
kubectl apply -k github.com/containeroo/agent-forge-operator//config/default?ref=v0.0.12
128129
```
129130

130131
The published manager images are:
131132

132133
```text
133-
ghcr.io/containeroo/agent-forge-operator:v0.0.11
134-
containeroo/agent-forge-operator:v0.0.11
134+
ghcr.io/containeroo/agent-forge-operator:v0.0.12
135+
containeroo/agent-forge-operator:v0.0.12
135136
```
136137

137138
For a local image build:
@@ -144,8 +145,8 @@ make deploy IMG=<registry>/agent-forge-operator:<tag>
144145
## Getting Started
145146

146147
Start with [docs/getting-started.md](docs/getting-started.md). It covers the
147-
required cluster objects, vSphere Secret, a dry-run `VsphereAgentPool`, status
148-
inspection, and switching from dry-run to active reconciliation.
148+
required cluster objects, vSphere Secret, `VsphereAgentPool`, status
149+
inspection, and active VM reconciliation.
149150

150151
For the complete CRD field contract and status model, see
151152
[docs/vsphereagentpool-crd.md](docs/vsphereagentpool-crd.md).
@@ -159,7 +160,6 @@ metadata:
159160
name: demo-worker
160161
namespace: demo
161162
spec:
162-
dryRun: true
163163
hostedClusterRef:
164164
name: demo
165165
nodePoolRef:
@@ -188,10 +188,6 @@ spec:
188188
agentclusterinstalls.extensions.hive.openshift.io/location: lab-a
189189
customer: example
190190
hypershift.openshift.io/nodepool-role: worker
191-
scaling:
192-
bufferAgents: 0
193-
maxProvisioning: 3
194-
deletePolicy: OwnedOnly
195191
iso:
196192
checkInterval: 10m
197193
retainVersions: 2
@@ -240,8 +236,8 @@ The controller uses `govc` for vSphere operations. The container image includes
240236
Releases are built by GoReleaser from pushed tags:
241237

242238
```sh
243-
git tag v0.0.11
244-
git push origin v0.0.11
239+
git tag v0.0.12
240+
git push origin v0.0.12
245241
```
246242

247243
The release workflow publishes multi-architecture images to GHCR and DockerHub

api/v1alpha1/vsphereagentpool_types.go

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -154,34 +154,6 @@ type AgentBindingSpec struct {
154154
Approve *bool `json:"approve,omitempty"`
155155
}
156156

157-
// ScalingPolicySpec contains bridge-side guardrails. It does not replace the
158-
// hosted cluster autoscaler; AgentMachine demand remains the source of truth
159-
// for desired node count.
160-
type ScalingPolicySpec struct {
161-
// BufferAgents is the number of extra matching, unbound Agents to keep
162-
// available beyond current AgentMachine demand. Use 0 for strict cost
163-
// control.
164-
// +kubebuilder:validation:Minimum=0
165-
// +kubebuilder:default=0
166-
// +optional
167-
BufferAgents int32 `json:"bufferAgents,omitempty"`
168-
169-
// MaxProvisioning limits how many VMs this operator creates in one
170-
// reconciliation. It throttles large autoscaler jumps to protect vSphere,
171-
// DHCP, storage, and Assisted Installer.
172-
// +kubebuilder:validation:Minimum=1
173-
// +kubebuilder:default=3
174-
// +optional
175-
MaxProvisioning int32 `json:"maxProvisioning,omitempty"`
176-
177-
// DeletePolicy controls scale-down cleanup. OwnedOnly means only VMs
178-
// recorded in this object's status are destroyed. Retain never destroys VMs.
179-
// +kubebuilder:validation:Enum=OwnedOnly;Retain
180-
// +kubebuilder:default=OwnedOnly
181-
// +optional
182-
DeletePolicy string `json:"deletePolicy,omitempty"`
183-
}
184-
185157
// ISOCacheSpec controls how the InfraEnv discovery ISO is cached in vSphere.
186158
type ISOCacheSpec struct {
187159
// CheckInterval controls how often the operator downloads and hashes the
@@ -221,13 +193,6 @@ type VsphereAgentPoolSpec struct {
221193
// +kubebuilder:validation:MinLength=1
222194
ControlPlaneNamespace string `json:"controlPlaneNamespace"`
223195

224-
// DryRun makes the operator compute and report actions without creating,
225-
// patching, or deleting VMs/Agents. This is the recommended first mode for a
226-
// new hosted cluster.
227-
// +kubebuilder:default=true
228-
// +optional
229-
DryRun bool `json:"dryRun"`
230-
231196
// VSphere configures placement and VM platform settings.
232197
VSphere VspherePlacementSpec `json:"vsphere"`
233198

@@ -237,10 +202,6 @@ type VsphereAgentPoolSpec struct {
237202
// Agent configures Agent labels, hostname assignment, and approval.
238203
Agent AgentBindingSpec `json:"agent"`
239204

240-
// Scaling configures bridge-side buffering, throttling, and deletion safety.
241-
// +optional
242-
Scaling ScalingPolicySpec `json:"scaling,omitempty"`
243-
244205
// ISO configures content-addressed caching of the InfraEnv discovery ISO.
245206
// +optional
246207
ISO ISOCacheSpec `json:"iso,omitempty"`
@@ -294,9 +255,6 @@ type PlannedActionStatus struct {
294255

295256
// Reason explains why the action is needed.
296257
Reason string `json:"reason"`
297-
298-
// DryRun is true when the action was only reported.
299-
DryRun bool `json:"dryRun"`
300258
}
301259

302260
// ISOCacheHistoryEntry records one uploaded content-addressed ISO object.
@@ -359,8 +317,7 @@ type VsphereAgentPoolStatus struct {
359317
// +optional
360318
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
361319

362-
// DesiredReplicas is the observed AgentMachine count plus any configured
363-
// buffer.
320+
// DesiredReplicas is the observed AgentMachine count.
364321
// +optional
365322
DesiredReplicas int32 `json:"desiredReplicas,omitempty"`
366323

@@ -410,7 +367,7 @@ type VsphereAgentPoolStatus struct {
410367
// +optional
411368
ISO ISOCacheStatus `json:"iso,omitempty"`
412369

413-
// Conditions summarizes readiness, dry-run state, discovery, and errors.
370+
// Conditions summarizes readiness, discovery, and errors.
414371
// +patchMergeKey=type
415372
// +patchStrategy=merge
416373
// +listType=map
@@ -425,7 +382,6 @@ type VsphereAgentPoolStatus struct {
425382
// +kubebuilder:printcolumn:name="Waiting",type=integer,JSONPath=`.status.waitingAgentMachines`
426383
// +kubebuilder:printcolumn:name="Desired",type=integer,JSONPath=`.status.desiredReplicas`
427384
// +kubebuilder:printcolumn:name="Agents",type=integer,JSONPath=`.status.matchingAgents`
428-
// +kubebuilder:printcolumn:name="DryRun",type=boolean,JSONPath=`.spec.dryRun`
429385
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
430386

431387
// VsphereAgentPool is a namespace-scoped bridge between a Hypershift Agent

api/v1alpha1/vsphereagentpool_types_test.go

Lines changed: 0 additions & 23 deletions
This file was deleted.

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 0 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/agent-forge.containeroo.ch_vsphereagentpools.yaml

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ spec:
2626
- jsonPath: .status.matchingAgents
2727
name: Agents
2828
type: integer
29-
- jsonPath: .spec.dryRun
30-
name: DryRun
31-
type: boolean
3229
- jsonPath: .metadata.creationTimestamp
3330
name: Age
3431
type: date
@@ -97,13 +94,6 @@ spec:
9794
example demo-demo.
9895
minLength: 1
9996
type: string
100-
dryRun:
101-
default: true
102-
description: |-
103-
DryRun makes the operator compute and report actions without creating,
104-
patching, or deleting VMs/Agents. This is the recommended first mode for a
105-
new hosted cluster.
106-
type: boolean
10797
hostedClusterRef:
10898
description: HostedClusterRef references the Hypershift HostedCluster
10999
this pool serves.
@@ -162,38 +152,6 @@ spec:
162152
required:
163153
- name
164154
type: object
165-
scaling:
166-
description: Scaling configures bridge-side buffering, throttling,
167-
and deletion safety.
168-
properties:
169-
bufferAgents:
170-
default: 0
171-
description: |-
172-
BufferAgents is the number of extra matching, unbound Agents to keep
173-
available beyond current AgentMachine demand. Use 0 for strict cost
174-
control.
175-
format: int32
176-
minimum: 0
177-
type: integer
178-
deletePolicy:
179-
default: OwnedOnly
180-
description: |-
181-
DeletePolicy controls scale-down cleanup. OwnedOnly means only VMs
182-
recorded in this object's status are destroyed. Retain never destroys VMs.
183-
enum:
184-
- OwnedOnly
185-
- Retain
186-
type: string
187-
maxProvisioning:
188-
default: 3
189-
description: |-
190-
MaxProvisioning limits how many VMs this operator creates in one
191-
reconciliation. It throttles large autoscaler jumps to protect vSphere,
192-
DHCP, storage, and Assisted Installer.
193-
format: int32
194-
minimum: 1
195-
type: integer
196-
type: object
197155
template:
198156
description: Template configures the worker VM hardware profile.
199157
properties:
@@ -350,8 +308,7 @@ spec:
350308
format: int32
351309
type: integer
352310
conditions:
353-
description: Conditions summarizes readiness, dry-run state, discovery,
354-
and errors.
311+
description: Conditions summarizes readiness, discovery, and errors.
355312
items:
356313
description: Condition contains details for one aspect of the current
357314
state of this API Resource.
@@ -411,9 +368,7 @@ spec:
411368
- type
412369
x-kubernetes-list-type: map
413370
desiredReplicas:
414-
description: |-
415-
DesiredReplicas is the observed AgentMachine count plus any configured
416-
buffer.
371+
description: DesiredReplicas is the observed AgentMachine count.
417372
format: int32
418373
type: integer
419374
iso:
@@ -613,9 +568,6 @@ spec:
613568
PlannedActionStatus records the latest create/delete/patch actions the
614569
operator planned or executed.
615570
properties:
616-
dryRun:
617-
description: DryRun is true when the action was only reported.
618-
type: boolean
619571
name:
620572
description: Name is the target VM or Agent name when known.
621573
type: string
@@ -628,7 +580,6 @@ spec:
628580
PatchAgent, or Noop.
629581
type: string
630582
required:
631-
- dryRun
632583
- reason
633584
- type
634585
type: object

config/default/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ resources:
3636
images:
3737
- name: controller
3838
newName: ghcr.io/containeroo/agent-forge-operator
39-
newTag: v0.0.11
39+
newTag: v0.0.12
4040

4141
# Uncomment the patches line if you enable Metrics
4242
patches:

0 commit comments

Comments
 (0)