Skip to content

feat: Add Rack Groups Nautobot Operator#1641

Merged
abhimanyu003 merged 6 commits intomainfrom
rackGroupsNautobotOP
Feb 10, 2026
Merged

feat: Add Rack Groups Nautobot Operator#1641
abhimanyu003 merged 6 commits intomainfrom
rackGroupsNautobotOP

Conversation

@abhimanyu003
Copy link
Copy Markdown
Contributor

Summary

This PR adds Rack Groups sync support to the Nautobot Operator.

The operator now reads Rack Groups defined in a Kubernetes ConfigMap and ensures they are created and kept in sync with Nautobot via the Nautobot API.

How it works

  1. The Nautobot Operator reads the Location configuration from a Kubernetes ConfigMap.
  2. It processes only the Location that are referenced by the Nautobot CRD.
  3. The operator then syncs these Location with Nautobot using the Nautobot API.
flowchart
    n1["Nautobot Operator"]
    n2["Kubernetes Rack Groups ConfigMap"]
    n3["Nautobot API"]

    n1 --> n2
    n2 --> n3
Loading

Example ConfigMap

data:
  rackgroups.yaml: |
    - name: IAD3 STAGING ENV
      description: Staging environment fabric
      location: IAD3
      children:
        - name: IAD3 STAGING CHILD
          description: Staging environment fabric
          location: IAD3
metadata:
  name: rackgroups
  namespace: nautobot

Important

  • This feature uses a new manifest structure based parent-child relationships.
  • Location must be defined using the children field to represent the multiple children.

Example hierarchy:

Global
└── RackGroup
    └── ChildRackGroup

Copy link
Copy Markdown
Collaborator

@skrobul skrobul left a comment

Choose a reason for hiding this comment

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

Please cross check if all resources are named correctly too - i.e. LocationType vs Location in

Comment thread go/nautobotop/internal/nautobot/dcim/location.go Outdated
Comment thread go/nautobotop/internal/nautobot/dcim/location.go Outdated
Comment thread go/nautobotop/internal/nautobot/sync/location.go Outdated
Comment thread go/nautobotop/internal/nautobot/sync/location.go Outdated
Comment thread go/nautobotop/internal/nautobot/sync/location.go Outdated
Comment thread go/nautobotop/internal/nautobot/sync/rackGroup.go Outdated
Comment thread go/nautobotop/internal/nautobot/sync/rackGroup.go Outdated
@skrobul
Copy link
Copy Markdown
Collaborator

skrobul commented Feb 2, 2026

Also, please rebase to remove the CI failure for pyright

Comment thread go/nautobotop/internal/nautobot/sync/rackGroup.go Outdated
@abhimanyu003 abhimanyu003 added this pull request to the merge queue Feb 10, 2026
Merged via the queue into main with commit e22419d Feb 10, 2026
25 checks passed
@abhimanyu003 abhimanyu003 deleted the rackGroupsNautobotOP branch February 10, 2026 14:00
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.

3 participants