Skip to content

Error on API_TOKEN_PEPPERS dictionary key type #1021

@Atomicbeast101

Description

@Atomicbeast101

The Helm chart version

7.4.0

Environment Versions

Kubernetes: 1.33.2
Helm: 4.1.0
Netbox: 4.5.1

Custom chart values

extraConfig:
  - values:
      API_TOKEN_PEPPERS:
        1: $(netboxPepperKey01)

Current Behavior & Steps to Reproduce

Run helm chart install/update as normal.

Helm chart's generated configuration.yml show's this value for API_TOKEN_PEPPERS:

 extra-0.yaml: |-
    API_TOKEN_PEPPERS:
      "1": j5Qco6h1G9RxewjSozff9eRLzQtQoCBtLCNNFcIR95snxGSqoz

You can see that 1 value gets converted to "1" which is an issue because API_TOKEN_PEPPERS require that key to be an integer and not a string. Netbox documentation on this: https://netboxlabs.com/docs/netbox/configuration/required-parameters/#api_token_peppers

Expected Behavior

Error logs to not state that key is a string and not integer.

Helm chart's generated configmap/app-netbox manifest file to contain this instead:

 extra-0.yaml: |-
    API_TOKEN_PEPPERS:
      1: j5Qco6h1G9RxewjSozff9eRLzQtQoCBtLCNNFcIR95snxGSqoz

or something similar that keeps the key 1 as integer instead of string.

NetBox Logs

django.core.exceptions.ImproperlyConfigured: Invalid API_TOKEN_PEPPERS key: 1. All keys must be integers.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions