Skip to content

feat: add location type sync to nautobot operator#1620

Merged
abhimanyu003 merged 1 commit intomainfrom
locationTypes
Jan 22, 2026
Merged

feat: add location type sync to nautobot operator#1620
abhimanyu003 merged 1 commit intomainfrom
locationTypes

Conversation

@abhimanyu003
Copy link
Contributor

Summary

This PR adds Location Type sync support to the Nautobot Operator.

The operator now reads Location Types 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 Type configuration from a Kubernetes ConfigMap.
  2. It processes only the Location Types that are referenced by the Nautobot CRD.
  3. The operator then syncs these Location Types with Nautobot using the Nautobot API.
flowchart
    n1["Nautobot Operator"]
    n2["Kubernetes Location Type ConfigMap"]
    n3["Nautobot API"]

    n1 --> n2
    n2 --> n3
Loading

Example ConfigMap

apiVersion: v1
kind: ConfigMap
metadata:
  name: location-types
  namespace: nautobot
data:
  location-types.yaml: |
    ---
    - name: Global
      description: Global (Root)
      content_types: []
      nestable: false
      children:
        - name: Company
          description: Company
          content_types:
            - "ipam.namespace"
          nestable: false
          children:
            - name: Region
              description: Region
              content_types: []
              nestable: false
              children:
                - name: Site
                  description: Site
                  content_types:
                    - "dcim.device"
                    - "ipam.vlan"
                  nestable: false

Importan

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

Example hierarchy:

Global
└── Company
    └── Region
        └── Site

Copy link
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.

overall LGTM, some minor copy&paste leftover

Copy link
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.

+1, rebase pls

@abhimanyu003 abhimanyu003 added this pull request to the merge queue Jan 22, 2026
Merged via the queue into main with commit d64a0fe Jan 22, 2026
23 checks passed
@abhimanyu003 abhimanyu003 deleted the locationTypes branch January 22, 2026 11:37
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