Skip to content

Conversation

@abhimanyu003
Copy link
Contributor

@abhimanyu003 abhimanyu003 commented Nov 20, 2025

Summary
This PR enhances the Nautobot operator so it can read Nautobot credentials from a referenced Secret and load device-type data from one or more ConfigMaps.

What this change does

  • Reads the Nautobot API token (or other keys) from the Secret referenced in the custom resource.
  • Loads device-type definitions from one or more ConfigMaps specified in the custom resource.
  • Supports multiple device-type references.

How it works

  1. Deploy the operator to the cluster.
  2. Create a Nautobot custom resource (example YAML below).
  3. The operator reads the referenced Secret and ConfigMap and sync the device-type data.

Usage example

apiVersion: sync.rax.io/v1alpha1
kind: Nautobot
metadata:
  name: nautobot-sample
spec:
  deviceTypeRef:
    - configMapSelector:
        name: device-types
        namespace: nautobot
      name: device-types
  nautobotSecretRef:
    key: NAUTOBOT_SUPERUSER_API_TOKEN
    name: nautobot-env
    namespace: default
  syncIntervalSeconds: 5

PS

  • You can provide multiple deviceTypeRef entries to load device types from several ConfigMaps.
  • If needed, update the ConfigMap and Secret references in the custom resource to point to the correct resources in your cluster.

Rough Diagram

image

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