Skip to content
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

Add the template to deploy extra objects #471

Merged
merged 9 commits into from
Nov 15, 2024
Merged

Add the template to deploy extra objects #471

merged 9 commits into from
Nov 15, 2024

Conversation

ubajze
Copy link
Contributor

@ubajze ubajze commented Oct 25, 2024

Fixes: #462

This PR allows you to deploy additional Kubernetes manifests. These manifests can be defined in the extraObjects list. The following snippet shows an example:

---
nautobot:
  superUser:
    existingSecret: "my-secret"

extraObjects:
  - |
    apiVersion: external-secrets.io/v1beta1
    kind: ExternalSecret
    metadata:
      name: my-secret
      namespace: nautobot
    spec:
      data:
        - remoteRef:
            conversionStrategy: Default
            decodingStrategy: None
            key: secrets/nautobot/superuser
            metadataPolicy: None
            property: SUPERUSER_PASSWORD
          secretKey: SUPERUSER_PASSWORD
        - remoteRef:
            conversionStrategy: Default
            decodingStrategy: None
            key: secrets/nautobot/superuser
            metadataPolicy: None
            property: API_TOKEN
          secretKey: API_TOKEN
      refreshInterval: 1h
      secretStoreRef:
        kind: ClusterSecretStore
        name: vault
      target:
        creationPolicy: Owner
        deletionPolicy: Retain
        name: my-secret
        template:
          data:
            NAUTOBOT_SUPERUSER_PASSWORD: "{{ `{{ .SUPERUSER_PASSWORD | toString }}` }}"
            NAUTOBOT_SUPERUSER_API_TOKEN: "{{ `{{ .API_TOKEN | toString }}` }}"
          engineVersion: v2
          mergePolicy: Replace

@ubajze ubajze requested a review from gertzakis as a code owner October 25, 2024 05:09
@ubajze ubajze marked this pull request as draft October 25, 2024 05:14
@ubajze ubajze self-assigned this Nov 13, 2024
@ubajze ubajze marked this pull request as ready for review November 14, 2024 12:17
Copy link
Contributor

@gertzakis gertzakis left a comment

Choose a reason for hiding this comment

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

Two minor things that happened to notice.
Please update the helm docs though to get the new stuff and pass the CI

@@ -1197,6 +1197,19 @@
}
},
"description": "List of Nautobot objects (matching the Nautobot spec) to create deployments for"
},
"extraObjects": {
"type": "array",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you also add description key as we have in the other ones?

Copy link
Contributor

@gertzakis gertzakis left a comment

Choose a reason for hiding this comment

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

LGTM

@gertzakis gertzakis merged commit 47e406e into develop Nov 15, 2024
5 checks passed
@gertzakis gertzakis deleted the f/issue_462 branch November 15, 2024 06:27
@gertzakis gertzakis mentioned this pull request Nov 15, 2024
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.

Add a field that allows you too deploy extra Kubernetes objects
2 participants