Skip to content

feat: nautobot operator #1057

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

Merged
merged 1 commit into from
Jul 16, 2025
Merged

feat: nautobot operator #1057

merged 1 commit into from
Jul 16, 2025

Conversation

abhimanyu003
Copy link
Contributor

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.

@cardoe cardoe requested review from haseebsyed12 and a team July 11, 2025 01:19
Copy link
Contributor

@cardoe cardoe left a comment

Choose a reason for hiding this comment

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

Good to me. Looking for @haseebsyed12's feedback as well.

@cardoe cardoe added this pull request to the merge queue Jul 16, 2025
Merged via the queue into main with commit 5c0be50 Jul 16, 2025
21 checks passed
@cardoe cardoe deleted the understack-crd branch July 16, 2025 16:51
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