Skip to content

feat: add virtualization cluster type, group, and cluster sync support#1868

Merged
abhimanyu003 merged 2 commits intomainfrom
nautobotOpUpdates
Mar 26, 2026
Merged

feat: add virtualization cluster type, group, and cluster sync support#1868
abhimanyu003 merged 2 commits intomainfrom
nautobotOpUpdates

Conversation

@abhimanyu003
Copy link
Contributor

This PR introduces full CRUD sync support to three new resource types

  • Cluster Types
  • Cluster Groups
  • Clusters

Sample YAML

Cluster types:

- name: "vmware"
  description: "VMware vSphere cluster"

Cluster groups:

- name: "us-east-production"
  description: "Production clusters in US East"

Clusters:

- name: "prod-cluster-01"
  comments: "Primary production cluster"
  cluster_type: "vmware"
  cluster_group: "us-east-production"
  location: "US-East-DC1"
  devices:
    - "server-01"
    - "server-02"

CR spec additions

The Nautobot custom resource now accepts three new optional refs:

spec:
  clusterTypeRef:
    - configMapSelector:
        name: cluster-types-config
        namespace: default
  clusterGroupRef:
    - configMapSelector:
        name: cluster-groups-config
        namespace: default
  clusterRef:
    - configMapSelector:
        name: clusters-config
        namespace: default

@abhimanyu003 abhimanyu003 changed the title feat: add virtualization cluster type, group, and cluster sync support with device membership management feat: add virtualization cluster type, group, and cluster sync support Mar 25, 2026
// ConfigMapRef defines a reference to a specific ConfigMap
type ConfigMapRef struct {
// Name of this config set (logical name)
Name string `json:"name"`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this Name fields as it's dead weight. It adds a required field to the CRD that users have to fill in but the operator never reads.
It creates confusion too, since both ConfigMapRef.Name and ConfigMapRef.ConfigMapSelector.Name exist as "name" at different nesting levels in the YAML.

@abhimanyu003 abhimanyu003 added this pull request to the merge queue Mar 26, 2026
Merged via the queue into main with commit f792730 Mar 26, 2026
24 of 25 checks passed
@abhimanyu003 abhimanyu003 deleted the nautobotOpUpdates branch March 26, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants