Skip to content

<.Values.precheck.resources>: nil pointer evaluating interface {}.resources when evaluating orchestra-login-portal-argocd/templates/tests/precheck.yaml #196

@spantaleev

Description

@spantaleev

I'm using the orchestra-login-portal-argocd chart, the default values file for which has no precheck.resources value.

The 2.3.61 chart works, but 2.3.62 reports:

Error: template: orchestra-login-portal-argocd/templates/tests/precheck.yaml:169:19: executing "orchestra-login-portal-argocd/templates/tests/precheck.yaml" at <.Values.precheck.resources>: nil pointer evaluating interface {}.resources

The relevant orchestra/templates/tests/precheck.yaml code is referencing .Values.precheck.resources.

However, there seems to be a precheck section under openunison as well. Other code around there does use openunison.precheck.*.

Perhaps precheck.resources should have also been made to be openunison.precheck.resources?


Interestingly, the precheck.resources value in orchestra/values.yaml is not currently part of master.

It landed in e78c628, but working on #159 and merging it seems to have removed it.


Based on all this, I suppose a fix should:

  • move the resources: {} top-level value definition (which doesn't even exist in master anymore) from orchestra/values.yaml to openunison.precheck.resources
  • adjust the orchestra/templates/tests/precheck.yaml file to start referencing openunison.precheck.resources
  • (not strictly necessary) adjust the values file for orchestra-login-portal-argocd to indicate the existence of this new resources key and its type ({}). Note that this chart work will start working even without doing this, because the new {{ if .Values.openunison.precheck.resources }} check in orchestra/templates/tests/precheck.yaml will not choke anymore (because .Values.openunison.precheck is not nil).

That said, I see various other precheck sections everywhere (and the precheck code is part of the orchestra component), so I'm confused if such a relocation to openunison.precheck.* is correct.


People currently using the orchestra-login-portal-argocd chart who are affected by this issue can currently work around this issue by adding this to their values:

precheck:
  resources: {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions