Skip to content

Commit

Permalink
fix(vmware): fallback on single host clusters when no cluster is dete…
Browse files Browse the repository at this point in the history
…cted (#521)

* chore(k8s): Replace version in k8s manifests

* fix(vmware): fallback on single host clusters when no cluster is detected

---------

Co-authored-by: src-csm <[email protected]>
  • Loading branch information
n-rodriguez and src-csm authored Mar 1, 2025
1 parent cf2f4cb commit 745bc71
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
19 changes: 14 additions & 5 deletions internal/source/vmware/vmware.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,20 @@ func (vc *VmwareSource) CreateClusterDataCenterRelation(
finder.SetDatacenter(dc)
clusters, err := finder.ClusterComputeResourceList(ctx, "*")
if err != nil {
return fmt.Errorf(
"finder failed finding clusters for datacenter %s: %s",
dc.InventoryPath,
err,
)
// fallback on single host clusters
clusters, err := finder.ComputeResourceList(ctx, "*")

if err != nil {
return fmt.Errorf(
"finder failed finding clusters for datacenter %s: %s",
dc.InventoryPath,
err,
)
}

for _, cluster := range clusters {
vc.Cluster2Datacenter[cluster.Reference().Value] = dc.Reference().Value
}
}
for _, cluster := range clusters {
vc.Cluster2Datacenter[cluster.Reference().Value] = dc.Reference().Value
Expand Down
2 changes: 1 addition & 1 deletion k8s/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
spec:
containers:
- name: netbox-ssot
image: ghcr.io/src-doo/netbox-ssot:v1.10.4
image: ghcr.io/src-doo/netbox-ssot:v1.11.0
imagePullPolicy: Always
resources:
limits:
Expand Down
2 changes: 1 addition & 1 deletion k8s/cronjob_with_cert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
spec:
containers:
- name: netbox-ssot
image: ghcr.io/src-doo/netbox-ssot:v1.10.4
image: ghcr.io/src-doo/netbox-ssot:v1.11.0
imagePullPolicy: Always
resources:
limits:
Expand Down

0 comments on commit 745bc71

Please sign in to comment.