Skip to content

Custom certificate mount and volume option or base64 format #602

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
basdscho23 opened this issue Apr 3, 2025 · 1 comment · May be fixed by #603
Open

Custom certificate mount and volume option or base64 format #602

basdscho23 opened this issue Apr 3, 2025 · 1 comment · May be fixed by #603
Labels
bug Something isn't working

Comments

@basdscho23
Copy link

The Helm chart version

0.3.21

Environment Versions

Kubernetes: v1.30.9
Argo CD: v2.14.4

Custom chart values

caCert: "..."

host: "....."
https: true
debug: false

auth:
  apiToken: "....."

netbox:
  enabled: false
  nameOverride: netbox-app

replicaCount: 3

updateStrategy:
  type: RollingUpdate

Current Behavior & Steps to Reproduce

We still have several different Netbox instances running in a Docker container and want to store our Kubernetes instances using the Netbox operator. The connection to the api of the instances works. However, a file is expected in the values file for caCert, which does not accept base64 format (error: filename to long) and there is no mount or volume option to store a custom certificate as a file in the container to which the caCert variable refers.
By accepting base64 formatted certificates or mounting your own custom certificate, Netbox instances that do not run in Kubernets themselves can be addressed via API.

I wanted to specify a custom certificate as a file with the variable caCert.
I tried to mount the certificate in a volume and then call it in the container. Error: "cant find repository or file"

I also tried to specify the certificate as base64. Error: ‘filename to long’

Expected Behavior

It would be nice if you could include a custom certificate either in base64 format or as a mount point in the container so that you can call up the mounted file in caCert.

NetBox Logs

Base64 certificate error:
2025-04-03T13:45:53Z	ERROR	setup	failed to initialize netbox client	{"error": "open <base 64 cert> : file name too long"}
main.main

2025-04-03T13:52:48Z	ERROR	setup	verification of netbox configuration failed	{"error": "Get \"https://<netbox>/api/extras/custom-fields/\": tls: failed to verify certificate: x509: certificate signed by unknown authority"}
main.main
@basdscho23 basdscho23 added the bug Something isn't working label Apr 3, 2025
@LeoColomb LeoColomb linked a pull request Apr 3, 2025 that will close this issue
@LeoColomb
Copy link
Member

Thanks for filing this issue, @basdscho23.
I believe #603 would fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants