---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
  - ../../../base/netbox

helmCharts:
  - name: netbox
    repo: oci://ghcr.io/netbox-community/netbox-chart
    version: "8.3.40"
    releaseName: netbox
    namespace: netbox
    valuesFile: values.yaml

# The chart always renders a `helm.sh/hook: test` connection Pod. We deploy via
# kustomize+ArgoCD (not `helm test`), so drop it rather than leave an orphan Pod.
patches:
  - target:
      version: v1
      kind: Pod
      name: netbox-test-connection
    patch: |-
      $patch: delete
      apiVersion: v1
      kind: Pod
      metadata:
        name: netbox-test-connection
