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

Upgrade fails: values don't meet the specifications #525

Closed
jforman opened this issue Feb 8, 2025 · 5 comments
Closed

Upgrade fails: values don't meet the specifications #525

jforman opened this issue Feb 8, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@jforman
Copy link

jforman commented Feb 8, 2025

The Helm chart version

netbox-5.0.0

Environment Versions

helm:

% helm version
version.BuildInfo{Version:"v3.16.3", GitCommit:"cfd07493f46efc9debd9cc1b02a0961186df7fdf", GitTreeState:"clean", GoVersion:"go1.22.7"}


kubectl:

% ./kubectl --kubeconfig /nas1/code/kubernetes/prod/admin.conf version
Client Version: v1.31.4
Kustomize Version: v5.4.2
Server Version: v1.31.4


k8s: v1.31.4

Custom chart values

% cat /nas1/code/kubernetes/configs/helm/netbox/common.yml
---
image:
    pullpolicy: Always
    tag: v4.1
superuser:
    name: admin
    password: obfuscatedpassword
    email: obfuscated@email.com
email:
    server: 10.10.2.1
loginRequired: true
postgresql:
    enabled: false
metrics:
  enabled: true



NOTE: Various IP/login/passwords have been changed for obvious reasons.

% cat /nas1/code/kubernetes/configs/helm/netbox/prod.yml
image:
    pullPolicy: "Always"
email:
    server: 10.10.2.1
    from: netbox@mylocaldomain.com
externalDatabase:
    host: db1
    database: netbox_db
    username: netbox_user
    password: netbox_password
persistence:
    storageClass: nfs-prod-data
ingress:
    enabled: true
    annotations:
        cert-manager.io/cluster-issuer: letsencrypt-issuer-prod
        kubernetes.io/ingress.class: "nginx"
    hosts:
        - host: netbox.domain
          paths:
          - /
    tls:
    - hosts:
      - netbox.domain
      secretName: netbox-domain-tls
redis:
    global:
        storageClass: nfs-prod-data
    auth:
        password: redispasssword

Current Behavior & Steps to Reproduce

% helm --kubeconfig /nas1/code/kubernetes/prod/admin.conf upgrade netbox --values /nas1/code/kubernetes/configs/helm/netbox/common.yml --values /nas1/code/kubernetes/configs/helm/netbox/prod.yml --reuse-values oci://ghcr.io/netbox-community/netbox-chart/netbox --dry-run

WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /nas1/code/kubernetes/prod/admin.conf
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /nas1/code/kubernetes/prod/admin.conf
Pulled: ghcr.io/netbox-community/netbox-chart/netbox:5.0.26
Digest: sha256:3533b3b335806b84ef4f238dec363e23e15062c1691483264990474624c7f953
Error: UPGRADE FAILED: values don't meet the specifications of the schema(s) in the following chart(s):
netbox:
- releaseCheck.url: Invalid type. Expected: string, given: null
- httpProxies: Invalid type. Expected: object, given: null
- storageBackend: Invalid type. Expected: string, given: null
-

Expected Behavior

Actual upgrade? I'm not sure what the expected output would have looked like.

NetBox Logs


@jforman jforman added the bug Something isn't working label Feb 8, 2025
@LeoColomb LeoColomb changed the title Upgrade to new helm charts 5.0.0 fails: values don't meet the specifications of the schema(s) in the following chart(s) Upgrade fails: values don't meet the specifications Feb 8, 2025
@LeoColomb
Copy link
Member

Thanks for filing this issue, @jforman.

--reuse-values

By using this Helm option, the old, legacy, and incompatible values files are applied.
As per being incompatible, this might raise the error you're encountering.
Is there a specific reason for using this option?
As you already provide your customized value, it does not appear necessary to use it.

@jforman
Copy link
Author

jforman commented Feb 8, 2025

Hi @LeoColomb From the Netbox announcement post (https://netboxlabs.com/blog/netbox-helm-charts-5-0-available/) if you follow to "How do I upgrade", which points to https://github.com/netbox-community/netbox-chart/releases/tag/netbox-5.0.0#breaking-changes, it has the flag in the command line example under "Switch to the New Chart Repository".

@jforman
Copy link
Author

jforman commented Feb 8, 2025

I just did a test without --reuse-values and received a different error:

Pulled: ghcr.io/netbox-community/netbox-chart/netbox:5.0.26
Digest: sha256:3533b3b335806b84ef4f238dec363e23e15062c1691483264990474624c7f953
Error: UPGRADE FAILED: cannot patch "netbox-redis-master" with kind StatefulSet: StatefulSet.apps "netbox-redis-master" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden && cannot patch "netbox-redis-replicas" with kind StatefulSet: StatefulSet.apps "netbox-redis-replicas" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden

@LeoColomb
Copy link
Member

Thanks for your reply.
You're right regarding the upgrade guide.
That being said, in this guide, user custom values are not provided directly to the cli (no --values).
In any case, the second output is already some progress.
There are many ways to pass the Redis error, one of them being disabling then re-enabling redis. This should delete any previous Redis deployment. Redis databases are safe to delete.

@LeoColomb
Copy link
Member

I'm closing the issue as stale.
Don't hesitate to continue the conversation below if the issue still occurs.

@LeoColomb LeoColomb closed this as not planned Won't fix, can't repro, duplicate, stale Feb 22, 2025
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

No branches or pull requests

2 participants