Skip to content

feat: nautobot operator #972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

feat: nautobot operator #972

wants to merge 17 commits into from

Conversation

abhimanyu003
Copy link
Contributor

@abhimanyu003 abhimanyu003 commented Jun 10, 2025

Nautobot Operator

Currently its having two kinds

  • GitRepoWatcher: It will sync git repo on specificed time.
  • Nautobot: config and settings about nauto-bot

They are grouped under sync.rax.io

image

Commands used to create controller

kubebuilder init --domain rax.io --repo github.com/rackerlabs/understack/go/sync
kubebuilder create api --group sync --version v1alpha1 --kind GitRepoWatcher --resource --controller
kubebuilder create api --group sync --version v1alpha1 --kind Nautobot --resource --controller

Flow Diagram

image

External Secrets

https://github.com/pvceng-sre/external-secrets-pwsafe

Example

YAML Spec Example

repo-watcher.yaml

apiVersion: sync.rax.io/v1alpha1
kind: GitRepoWatcher
metadata:
  name: main-repo
spec:
  gitOrgName: RSS-Engineering
  ref: main
  repoURL: https://github.com/RSS-Engineering/undercloud-deploy
  secrets:
  - name: username
    secretRef:
      key: username
      name: puppet-dev-prod-svc
      namespace: some-namespace
  - name: password
    secretRef:
      key: password
      name: puppet-dev-prod-svc
      namespace: some-namespace
  syncIntervalSeconds: 10

nautobot.yaml

apiVersion: sync.rax.io/v1alpha1
kind: Nautobot
metadata:
  name: nautobot
spec:
  configFilePath: 22.yaml
  repoWatcher: main-repo
  secrets:
  - name: NAUTOBOT_TOKEN
    secretRef:
      key: token
      name: nautobot-token
      namespace: default
  syncIntervalSeconds: 10

How to run locally.

make && make deploy && make run

After this you have apply yaml files from the above example.

@abhimanyu003 abhimanyu003 changed the title add: nautobot operator feat: nautobot operator Jun 11, 2025
@cardoe
Copy link
Contributor

cardoe commented Jun 13, 2025

We'll definitely want a rebase and to squish things together until we get passing.

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